Elasticsearch working fine with localhost but not able to connect over Browser by using IP address


Generally in Elasticsearch  people face this issue when trying to access elasticsearch related url from browser by using IP address  while everything working fine with localhost.

Suppose your System IP is 10.0.0.31 and trying to run below query in browser.You will get below screen on different browsers

http://10.0.0.31:9200/_cluster/health?pretty

IE:

IE Not connected

IE Browser

Chrome:

Chrome Not Connected

Chrome Browser

Solution:

Go to command prompt and use below command to get ipv4 address as mentioned in below screen.

Window  :

ipconfig

Unix/Linux:

ifconfig

ipconfig

Update Your IPV4 address in config/elasticsearch.yml file for property

network.host: 10.0.0.31

if  your IP is static IP then you can update same as above or if it’s dynamic then update it as below.

network.host:0.0.0.0

For testing above configuration restart your eleasticsearch and try in elasticsearch on your browser address bar after updating server ip. You will get result like below.

http://localhost:9200/_cluster/health?pretty

or as below if network.host configured

http://elasticseverIp:9200/_cluster/health?pretty

Issues Solution

For more Elasticsearch issues solution follow link Common Elasticsearch Issues.

Integration

Integrate Filebeat, Kafka, Logstash, Elasticsearch and Kibana

About Saurabh Gupta

My Name is Saurabh Gupta, I have approx. 10 Year of experience in Information Technology World manly in Java/J2EE. During this time I have worked with multiple organization with different client, so many technology, frameworks etc.
This entry was posted in Elasticsearch and tagged , , . Bookmark the permalink.

2 Responses to Elasticsearch working fine with localhost but not able to connect over Browser by using IP address

  1. Pingback: Elasticsearch Installation in Linux | Facing Issues On IT

  2. Pingback: Elasticsearch Installation in Window | Facing Issues On IT

Comments are closed.