You are not logged in.
I noticed elasticsearch moving from aur to community during the latest upgrade. Ever since that upgrade I couldn't get elasticsearch to start with systemd.
$ systemctl status elasticsearch -l
Dec 13 10:50:56 devbox systemd[1]: Failed to start ElasticSearch.
Dec 13 10:50:56 devbox systemd[1]: Unit elasticsearch.service entered failed state.
Dec 13 10:50:56 devbox systemd[1]: elasticsearch.service holdoff time over, scheduling restart.
Dec 13 10:50:56 devbox systemd[1]: Stopping ElasticSearch...
Dec 13 10:50:56 devbox systemd[1]: Starting ElasticSearch...
Dec 13 10:50:56 devbox systemd[1]: elasticsearch.service start request repeated too quickly, refusing to start.
Dec 13 10:50:56 devbox systemd[1]: Failed to start ElasticSearch.
Dec 13 10:50:56 devbox systemd[1]: Unit elasticsearch.service entered failed state.
I tried removing and reinstalling es and jre and it didn't help. Did I miss something?
Any help would be greatly appreciated.
Thanks
Offline
Offline
[dev@devbox ~]$ ls /etc/profile.d
jre.csh* jre.sh* locale.sh* perlbin.csh* perlbin.sh*
[dev@devbox ~]$ grep -rn JAVA /etc/profile.d
/etc/profile.d/jre.sh:1:export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-openjdk/jre}
/etc/profile.d/jre.sh:4:#export _JAVA_AWT_WM_NONREPARENTING=1
/etc/profile.d/jre.csh:1:setenv JAVA_HOME "/usr/lib/jvm/java-7-openjdk/jre"
/etc/profile.d/jre.csh:4:#setenv _JAVA_AWT_WM_NONREPARENTING 1
[dev@devbox ~]$ sudo journalctl -aeu elasticsearch
Dec 16 00:27:10 devbox elasticsearch[755]: You must set the ES_CLASSPATH var
Dec 16 00:27:10 devbox systemd[1]: elasticsearch.service: control process exited, code=exited status=1
Dec 16 00:27:10 devbox systemd[1]: Failed to start ElasticSearch.
Dec 16 00:27:10 devbox systemd[1]: Unit elasticsearch.service entered failed state.
Dec 16 00:27:10 devbox systemd[1]: elasticsearch.service holdoff time over, scheduling restart.
Dec 16 00:27:10 devbox systemd[1]: Stopping ElasticSearch...
Dec 16 00:27:10 devbox systemd[1]: Starting ElasticSearch...
Dec 16 00:27:10 devbox systemd[1]: elasticsearch.service start request repeated too quickly, refusing t
Dec 16 00:27:10 devbox systemd[1]: Failed to start ElasticSearch.
Dec 16 00:27:10 devbox systemd[1]: Unit elasticsearch.service entered failed state.
Hmm, where do i set the ES_CLASSPATH?
Offline
You shouldn't have to.
/usr/bin/elasticsearch should source /usr/share/elasticsearch/elasticsearch.in.sh where the ES_CLASSPATH is already set for you.
Everything should be working correctly if you have not modified the systemd service file providing environment variables such as ES_INCLUDE or modified /usr/bin/elasticsearch or /usr/share/elasticsearch/elasticsearch.in.sh and /usr/share/elasticsearch/elasticsearch.in.sh is readable by the elasticsearch user (it should be world-readable).
What output do you get if you try starting it manually?
sudo -u elasticsearch elasticsearch -f
Offline
Running manually seems to be working.
Looking at /etc/systemd/system/elasticsearch.service.d/env.conf the ES_INCLUDE path is wrong:
[Service]
Environment=PATH=/opt/java/bin:/usr/local/sbin:/usr/local/bin:/usr/bin
Environment=ES_HOME=/usr/share/elasticsearch
Environment=ES_INCLUDE=/usr/share/elasticsearch/bin/elasticsearch.in.sh
After fixing that I can start the service normally with systemd.
Was that a leftover from the AUR package I had installed before?
Thanks for the help!
Offline
Offline