4

enter image description hereHello all,

I cannot connect to my CentOS server on port 9200, the port ElasticSearch uses. This is my iptables file (see image above).

As you can see I tried to open port 9200, but apparently without success. I can curl localhost:9200 on the CentOS server successfully. But when I try to curl 192.168.2.229:9200 (which is the ip address of eth0) I receive an error (curl:(7) couldn't connect to host).

And ofcourse, when I try to connect the address 192.168.2.229:9200 form my windows machine I cannot connect either. Does someone no the problem?

And the netstat results:

enter image description here

5

The error you get is due to your ES instance be listening on localhost only. To change that on a CentOS instance, you can add into the following lines into the file /etc/elasticsearch/elasticsearch.yml and restart the service.

network :
    host : 192.168.2.229

Check more here: https://www.elastic.co/guide/en/elasticsearch/reference/2.4/setup-configuration.html#settings

  • Link is broken :( – AlikElzin-kilaka Jan 18 '18 at 14:09
  • 1
    @AlikElzin-kilaka Fixed! – PMG Jul 5 '18 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.