0
votes

I want to run Elastic Search on an EC2 Instance, and access it globally. But upon changing its config to

cluster.name: elasticsearch
network.host: XX.XXX.XX.XX

(Associated Elastic IP)

It throws an error :

Caused by: java.net.BindException: Cannot assign requested address: bind

I suppose it was unable to bind to the public Ip Address

Then
I tried binding it to 0.0.0.0 as mentioned in Elasticsearch cannot start when bind to public ip address (I had to add discovery.seed_hosts: [] since I am running a single instance). It runs, but locally.

I cannot find any way to access it globally. Help!

Also I have added port 9200 in inbound rules or EC2

PS: Please mention any additional required information in the comments.

1

1 Answers

0
votes

I had to add an inbound rule in windows firewall for port range 9200-9300

Steps :

  1. Open Control Panel.
  2. Open Windows Firewall
  3. In the left panel -> Advance Settings
  4. In the Inbound rules, see on the right panel there should be an option of New Rule
  5. Click on Port then Next
  6. Select TCP Port
  7. In Specific Port option add range 9200-9300
  8. Next-> Allow Connection (You may have to select Allow if secured according to requirement).
  9. Next -> Next -> Give It a name -> Finish

Hope this helps anyone facing the similar problem.