0

I have an Elastic Search running on 9200 on rhel 6. I cannot reach to it in aws with private/public ip. On the other hand, i try it with curl localhost:9200, it is good. I can also ping google.

I have given the necessary port access from the security group.

sec inbound allowed port:

sec inbound allowed port

My /etc/resolv.conf is :

generated by /sbin/dhclient-script
search ec2.internal
nameserver 172.31.0.2

UPDATE: I have also installed an apache webserver on 80 port. And it is responding from the public and private IPs. So the main problem is mainly with Elasticsearch or 9200 port. Any idea?

MoonHorse
  • 107
  • 7

1 Answers1

0

By default http transport and internal elasticsearch transport only listens to localhost. If you want to access Elasticsearch from the host other than localhost then try adding following configurations in config/elasticsearch.yml.

transport.host: localhost 
transport.tcp.port: 9300 
http.port: 9200 
network.host: 0.0.0.0

Here, network.host as 0.0.0.0 allow access from any host within the network.

https://stackoverflow.com/questions/33696944/how-do-i-enable-remote-access-request-in-elasticsearch-2-0

MoonHorse
  • 107
  • 7