Default location of Error Log Elasticsearch

Viewed 10168

I need to find the default location for the Elasticsearch error log for Ubuntu. When I start the service it states it is okay but when I ask for the service this comes up:

Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendo
   Active: inactive (dead) since Thu 2017-11-23 05:49:46 CST; 3min ago
     Docs: http://www.elastic.co
 Main PID: 81608 (code=exited, status=0/SUCCESS)

I need to figure out why this is happening but I don't know where the error log is located. I haven't been on this computer in a few years and I did not change it from the default location.

2 Answers

try journalctl -u elasticsearch.service -xe first.

If this is not good look at /usr/lib/systemd/system/elasticsearch.service file, work out where the config is and find the log.

If that doesn't work install lsof and search for the log in the list of open file

sudo su
cd /var/log/elasticsearch 
tail elasticsearch.log
Related