I am following the steps here to install and get elasticsearch to work.
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-elasticsearch-on-ubuntu-16-04
I have a ubuntu 17 and i am logged in as non root user with sudo rights.
I did the following steps
sudo apt-get update
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.1.1.deb
sudo dpkg -i elasticsearch-6.1.1.deb
sudo systemctl enable elasticsearch.service
sudo systemctl start elasticsearch
Finally when i test using
curl -X GET 'http://localhost:9200'
I get the following error
curl: (7) Failed to connect to localhost port 9200: Connection refused
Also when i do
service --status-all
i donot see elasticsearch service listed in the services list.
Please note that i have ufw installed and i have the following ports open
To Action From
-- ------ ----
22/tcp ALLOW Anywhere
443/tcp ALLOW Anywhere
80/tcp ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
could this be preventing the 9200 port but that doesnt seem likely since internal communications should be allowed.
UPDATE:
Here is the output i am getting with sudo journalctl -f
-- Logs begin at Fri 2017-12-29 10:27:23 +0545. --
Dec 30 13:31:40 elasticsearch[29595]: #
Dec 30 13:31:40 elasticsearch[29595]: # There is insufficient memory for the Java Runtime Environment to continue.
Dec 30 13:31:40 elasticsearch[29595]: # Native memory allocation (mmap) failed to map 986513408 bytes for committing reserved memory.
Dec 30 13:31:40 elasticsearch[29595]: # An error report file with more information is saved as:
I checked the free memory using free -m command
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…