Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch - '127.0.0.1:9200' and 'localhost:9200' are unable to connect on the browser

When I try curl -XGET 'http://localhost:9200' on my terminal it is working fine.enter image description here

But, When I try http://localhost:9200/ or 127.0.0.1:9200/ on my browser it showsenter image description here

How can I fix this problem ?

like image 844
Henrique Carvalho Avatar asked Dec 20 '25 23:12

Henrique Carvalho


1 Answers

I understand it is too late to answer, but "late" is relative.

As you are using curl in virtual machine, where elasticsearch is running, it is returning result in terminal. But to see it in the browser of the parent OS, You need to do this:

  • Get the ip address of the linux machine where elasticsearch is running. (ifconfig), let's say it is 10.75.108.136
  • Now open elasticsearch.yml in config directory and change below two properties a. network.host: "linux virtual machine ipaddress" b. uncomment http.port: 9200
  • start elasticsearch
  • In Parent OS go to http://10.75.108.136:9200/

:)

like image 96
Jyoti Ranjan Avatar answered Dec 23 '25 11:12

Jyoti Ranjan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!