I have deployed elasticsearch(7.3 version) service on my EC2 instance.
curl localhost:9200it gave me correct response but when I accessed the same service by hitting request:http://{{public-ip-address-ec2-instance}}:9200It is giving error as :
This site can’t be reached : {{public-ip-address-ec2-instance}} connection refused.
9200 and is open to 0.0.0.0/0.Currently I haven't modified elasticsearch.yml and it has default values only.
So how can I access elasticsearch through public IP of EC2 instance? Do I need to make any changes in elasticsearch configuration file?
So the solution was simply to modify the following settings in elasticsearch.yml:
network.host: 0.0.0.0
discovery.type: single-node
Note: The second setting is only necessary if you have a single node.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With