I wanted to know where does elasticsearch writes the log when run as service.
I tried starting the elasticsearch as service and it fails. Theres no data in /var/log/elasticsearch/elasticsearch.log
[root@sample test]# service elasticsearch status
ā elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendo r preset: disabled)
Active: failed (Result: exit-code) since Fri 2018-01-26 02:51:38 EST; 1h 16mi n ago
Docs: http://www.elastic.co
Process: 32581 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_D IR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 32581 (code=exited, status=1/FAILURE)
Jan 26 02:51:38 sample elasticsearch[32581]: ^
Jan 26 02:51:38 sample elasticsearch[32581]: at [Source: sun.ni...
Jan 26 02:51:38 sample elasticsearch[32581]: in 'reader', line ...
Jan 26 02:51:38 sample elasticsearch[32581]: network.host: 142....
Jan 26 02:51:38 sample elasticsearch[32581]: ^
Jan 26 02:51:38 sample [32581]: ];
Jan 26 02:51:38 sample elasticsearch[32581]: at org.elasticsear...
Jan 26 02:51:38 sample systemd[1]: elasticsearch.service: main...E
Jan 26 02:51:38 sample systemd[1]: Unit elasticsearch.service ....
Jan 26 02:51:38 sample[1]: elasticsearch.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@test]#
I would like to know why my service failed to start, thuss i am looking to some sort of log file for me to debug
Jan 26 02:51:38 sample elasticsearch[32581]: ^
Jan 26 02:51:38 sample elasticsearch[32581]: at [Source: sun.ni...
Jan 26 02:51:38 sample elasticsearch[32581]: in 'reader', line ...
Jan 26 02:51:38 sample elasticsearch[32581]: network.host: 142....
Jan 26 02:51:38 sample elasticsearch[32581]: ^
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
I just remove the space before path.data & path.logs and its now working.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.