ruby on rails – Elasticsearch – 127.0.0.1:9200 and localhost:9200 are unable to connect on the browser

ruby on rails – Elasticsearch – 127.0.0.1:9200 and localhost:9200 are unable to connect on the browser

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), lets 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/

🙂

ruby on rails – Elasticsearch – 127.0.0.1:9200 and localhost:9200 are unable to connect on the browser

Leave a Reply

Your email address will not be published.