0
votes

I have installed Elastic Search on Linux instance. Elastic Search is accessible on instance curl -XGET 'http://localhost:9200/_nodes?pretty' by this. But When I try to access this on remote http://MY_INSTANCE_IP_ADDRESS:9200 then it is not accessible Here is my elastic search configuration file

# ======================== Elasticsearch Configuration =========================
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ---------------------------------- Network -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
#network.host: 192.168.0.1
#transport.host: localhost
#transport.tcp.port: 9300
#http.port: 9200 
network.host: 0.0.0.0 
discovery.seed_hosts: 0.0.0.0
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# For more information, consult the discovery and cluster formation module documentation.
2
fyi it's Elasticsearch, not Elastic Search :) what do your Elasticsearch logs show? what is the response when you open MY_INSTANCE_IP_ADDRESS:9200?Mark Walkom
When I hit MY_INSTANCE_IP_ADDRESS:9200. It says "could not send request" Error: Request timed outAbdul Rehman Aziz

2 Answers

1
votes

Port 9200 was not allowed on AWS console, after adding the rule, it solved my problem.

0
votes

In the comment of the file you have send :

# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
#network.host: 192.168.0.1
#transport.host: localhost
#transport.tcp.port: 9300