On ubuntu 16 lts server system, a newly installed
elasticsearch instance won't start up with
systemctl restart elasticsearch (or with start).
No logs are created, manually running
/usr/share/elasticsearch/bin/elasticsearch as user elasticsearch WORKS, so permissions or the configuration file are not the issue (I think), and there's no logs in /var/log/elasticsearch when I run the
systemctl commands, so I assume systemctl just fails silently to do anything.
I have no idea what to check next. Is there some /etc/init.d/##elasticsearch script or something that is bad and needs to be replaced?
What does systemctl do on ubuntu? Does it find and run /etc/rc4.d/S01elasticsearch? Something else?
systemctl status elasticsearch says:
● elasticsearch.service - LSB: Starts elasticsearch Loaded: loaded (/etc/init.d/elasticsearch; bad; vendor preset: enabled) Active: active (exited) since Mon 2016-11-07 16:29:25 EST; 2min 26s ago Docs: man:systemd-sysv-generator(8) Process: 1151 ExecStart=/etc/init.d/elasticsearch start (code=exited, status=0 Nov 07 16:29:25 webci systemd: Starting LSB: Starts elasticsearch... Nov 07 16:29:25 webci elasticsearch: * Starting Elasticsearch Server Nov 07 16:29:25 webci elasticsearch: ...done. Nov 07 16:29:25 webci systemd: Started LSB: Starts elasticsearch.
I think the above means it started and silently exited giving no useful log output. No additional logging from journalctl either.
If I use
journalctl -xe I get a pile of clock noise, but nothing interesting:
Nov 07 16:33:44 webci elasticsearch: * Starting Elasticsearch Server Nov 07 16:33:44 webci elasticsearch: ...done. Nov 07 16:33:44 webci systemd: Started LSB: Starts elasticsearch. -- Subject: Unit elasticsearch.service has finished start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit elasticsearch.service has finished starting up. -- -- The start-up result is done. Nov 07 16:33:44 webci sudo: pam_unix(sudo:session): session closed for use Nov 07 16:34:08 webci smbd: pam_unix(samba:session): session closed for us Nov 07 16:35:01 webci CRON: pam_unix(cron:session): session opened for use Nov 07 16:35:01 webci CRON: (root) CMD (command -v debian-sa1 > /dev/null Nov 07 16:35:01 webci CRON: pam_unix(cron:session): session closed for use lin
It looks like a success, but the elasticsearch process is not running, and has exited.