Elasticsearch URL not accessible outside of the server publicly

Hi there,
I installed elasticsearch following the article on https://www.howtoforge.com/tutorial/how-to-install-elastic-stack-on-ubuntu-16-04/. I manage to run it successfully on my local machine because I was accessing it from my local environment.
I have installed it on my dev server and I want to access it from another server. I can access it with localhost:9200 in my dev server but not from outside the server. I tried updating the elasticsearch.yml file with following settings:

bootstrap.mlockall: true
http.port: 9200

Enabled port 9200 to be accessed publicly with "ufw enable"
sudo netstat -plnt shows the port is listening.
But still I am not able to access the URL publicly.
Can you please suggest me what I need to do to make it work?

Thank you,
Bishwadeep KC

Can you show your elasticsearch logs?

Hi David,
There were not any errors in the log file (only stopping.. closing.. starting). The service restart works completely fine. I was able to access the localhost:9200 from the server.

I'm not looking for errors. I'm looking for your logs.

Hi Bishwadeep,

Can you access the URL with IP of your node on which elastic search is installed outside of local server?
Please share your /etc/hosts file snapshot.

For accessing the elasticsearch URL outside of local server you have to make some changes in hosts file.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.