I'm using an Ubuntu VM, and following the instructions listed here:
Here is a complete list of the commands I've executed (post Ubuntu installation):
apt-get update apt-get -y install wget unzip git apt-transport-https add-apt-repository -y ppa:webupd8team/java apt-get update apt-get install oracle-java8-installer wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | \ apt-key add - echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | \ tee -a /etc/apt/sources.list.d/elastic-5.x.list apt-get -y install elasticsearch
At that point, edit /etc/elasticsearch/elasticsearch.yml, and find the line that reads (line 212):
Uncomment it, and replace with localhost.
At that point, I try to start the service, as instructed:
sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable elasticsearch.service
This gives me the message that
elasticsearch.service is not a native service, redirecting to systemd-sysv-install
Executing /lib/systemd/systemd_sysv-install enable elasticsearch
When i try to curl my localhost:9200 i get nothing (connection refused).
Just for laughs, I've also tried the SysV way of doing things:
sudo update-rc.d elasticsearch defaults 95 10 sudo -i service elasticsearch start
Also to no avail.
HOWEVER, if i run the binary as a normal user, it at least attempts to execute, gives me an error about
IllegalStateException[Failed to create node environment]:
If i run it as the as root, though, it works:
And then open a new terminal and run
curl localhost:9200, i get the expected result (JSON array, status 200, version 1.7.3, lucene 4.10.4)
This is also wierd, because I followed Digital Oceans much older instructions from 2015 (available here: https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-14-04), and A) it works like a charm, and B) the elastic search version is 2.45 and the lucene version is 5.5.4.
Needless to say, I'm quite confused that following the current verson of ES in 2017 is giving me an older version than a set of instruction from 2015, and that the instructions here don't seem to work, period.
Any help or pointers would be appreciated. I apologize for the length of this, I've just spent a bit on this so far with no result, so I thought I would provide everything anyone could possibly ask for in advance!
Look forward to your replies so I can get on track!