I installed ELasticsearch 6 and JDK 1.8.0_161 on my ARM Odroid XU4 running Ubuntu 16.04 LTS. No errors.
When I attempt to start Elasticsearch as a service, I can't connect to localhost on port 9200 and the service status prints:
~ $ > sudo service elasticsearch status
● elasticsearch.service - LSB: Starts elasticsearch
Loaded: loaded (/etc/init.d/elasticsearch; bad; vendor preset: enabled)
Active: active (exited) since Mon 2018-01-22 10:43:18 UTC; 9min ago
Docs: man:systemd-sysv-generator(8)
Jan 22 10:43:18 lego systemd[1]: Starting LSB: Starts elasticsearch...
Jan 22 10:43:18 lego systemd[1]: Started LSB: Starts elasticsearch.
Jan 22 10:44:07 lego systemd[1]: Started LSB: Starts elasticsearch.
No logs. No clue where to look. nofile limits are set to 65536 in /etc/security/limits.conf
. I don't know where else to look for diagnostics.
Although, when I start Elasticsearch manually via sudo /usr/shared/elasticsearch/bin/elasticsearch
, it works as expected:
~ $ > sudo /usr/share/elasticsearch/bin/elasticsearch
[2018-01-22 10:55:55,944][WARN ][bootstrap ] jvm uses the client vm, make sure to run `java` with the server vm for best performance by adding `-server` to the command line
[2018-01-22 10:55:56,073][INFO ][node ] [Ariel] version[1.7.3], pid[1126], build[NA/NA]
[2018-01-22 10:55:56,074][INFO ][node ] [Ariel] initializing ...
[2018-01-22 10:55:56,521][INFO ][plugins ] [Ariel] loaded [], sites []
[2018-01-22 10:55:56,638][INFO ][env ] [Ariel] using [1] data paths, mounts [[/ (/dev/mmcblk0p2)]], net usable_space
[54.4gb], net total_space [57.2gb], types [ext4]
[2018-01-22 10:56:01,853][INFO ][node ] [Ariel] initialized
[2018-01-22 10:56:01,854][INFO ][node ] [Ariel] starting ...
[2018-01-22 10:56:02,080][INFO ][transport ] [Ariel] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.0.103:9300]}
[2018-01-22 10:56:02,125][INFO ][discovery ] [Ariel] elasticsearch/FtFOljAORnevIAOAFabptg
[2018-01-22 10:56:05,933][INFO ][cluster.service ] [Ariel] new_master [Ariel][FtFOljAORnevIAOAFabptg][lego]
[inet[/192.168.0.103:9300]], reason: zen-disco-join (elected_as_master)
[2018-01-22 10:56:05,987][INFO ][http ] [Ariel] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/192.168.0.103:9200]}
[2018-01-22 10:56:05,988][INFO ][node ] [Ariel] started
[2018-01-22 10:56:06,014][INFO ][gateway ] [Ariel]
recovered [0] indices into cluster_state
What important step am I missing? I followed everything here: https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html
EDIT: I tried setting START_DAEMON=true
in /etc/default/elasticsearch
, which is important indeed, but that did not do the trick either. Looking deeper into the values set inside /etc/default/elasticsearch
, I found the problem in my case. See my final answer for a complete breakdown of the total solution.