skip to Main Content

When using Localhost it’s working fine

root@ip-172-16-0-102:/home/ubuntu# curl localhost:9200

{   
  "name" : "ip-172-16-0-102",   
  "cluster_name" : "elasticsearch",  
  "cluster_uuid" : "xXGFhvjvR_qbJK_oC0YPSg",  
  "version" : {    
  "number" : "8.13.4",   
  "build_flavor" : "default",     
  "build_type" : "deb",     
  "build_hash" : "da95df118650b55a500dcc181889ac35c6d8da7c",     
  "build_date" : "2024-05-06T22:04:45.107454559Z",     
  "build_snapshot" : false,     
  "lucene_version" : "9.10.0",    
  "minimum_wire_compatibility_version" : "7.17.0",     
  "minimum_index_compatibility_version" : "7.0.0"   },   
  "tagline" : "You Know, for Search" 
}

root@ip-172-16-0-102:/home/ubuntu# curl xx.xxx.xxx.xxx:9200

curl: (7) Failed to connect to xx.xxx.xxx.xxx port 9200 after 2 ms: Couldn't connect to server

My Config File: elasticsearch.yml

2

Answers


  1. Chosen as BEST ANSWER

    Yaml File

    Please refer this, Please see this


    1. Check Local Firewall:
    sudo ufw allow 9200/tcp
    sudo ufw reload
    
    1. Add AWS/Azure Security Groups

    AWS -> EC2 -> Security Groups -> Add an inbound rule for port 9200 with the appropriate source – allow all

    1. Test from a Remote Machine:
    curl http://xx.xxx.xxx.xxx:9200
    telnet xx.xxx.xxx.xxx 9200
    
    1. Elasticsearch Logs
     sudo tail -f /var/log/elasticsearch/elasticsearch.log
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search