Problem :
I downloaded the latest ES rpm and installed on centos. When tried running the script in foreground, i see that the logging is not enabled.
tried both /etc/init.d/elasticsearch -f and /usr/share/elasticsearch/bin/ -f both.
log4j:WARN No appenders could be found for logger (node).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/ log4j/1.2/faq.html#noconfig for more info.
and nothing gets logged.
Tried the following in vain :
But, Nothing seems to fix the logging problem
Solution:
I downloaded the latest ES rpm and installed on centos. When tried running the script in foreground, i see that the logging is not enabled.
tried both /etc/init.d/elasticsearch -f and /usr/share/elasticsearch/bin/ -f both.
log4j:WARN No appenders could be found for logger (node).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/
and nothing gets logged.
Tried the following in vain :
- export ES_CLASSPATH=/etc/
elasticsearch/logging.yml - changed patch.conf, path.data in elasticsearch.yml file
But, Nothing seems to fix the logging problem
Solution:
edit /usr/share/elasticsearch/bin/ elasticsearch
give absolute paths for the home, and all files.
This file should be changed, so "any" startup of elasticsearch will work in foreground without errors
ES_JAVA_OPTS="-Des.config=/ etc/elasticsearch/ elasticsearch.yml -Des.path.conf=/etc/ elasticsearch/ -Des.path.home=/usr/share/ elasticsearch -Des.path.logs=/var/log/ elasticsearch -Des.path.data=/var/lib/ elasticsearch -Des.path.work=/tmp/ elasticsearch -Des.path.plugins=/usr/share/ elasticsearch/plugins"
Hi,
ReplyDeleteThanks a lot, this post save my life :)....
Have a nice day.
Fabrice
You've provided a very valuable tip here , please share it on StackOverflow in case you didn't; thank you !
ReplyDelete