Unable to access Elasticsearch outside server

I have an openstack server running on linux, where i have installed Elasticsearch 5.2.2. I am able to start elasticsearch locally and while inside server, curl localhost:9200 returns response that elasticsearch is up and running. But while trying to access server-ip:9200 from web browser, it is unable to connect.
This is my elasticsearch.yml file

    # ======== Elasticsearch Configuration ======
    # ---------------- Cluster ---------------
    cluster.name: test

    # ---------------------- Node -------------
    node.name: node-1

    # ------------------- Network -------------
    # Set the bind address to a specific IP (IPv4 or IPv6):
    network.host: 0.0.0.0
    # Set a custom port for HTTP:
    http.port: 9200

    transport.tcp.port: 9300-9400

explore this params for configuration file:
network.host
network.bind_host
network.publish_host

1 Like

What interfaces does Elasticsearch show that it is bound to in the startup logs? You can find this in the startup logs between "initializing" and "started".

This is what i get for bound address in logs
bound_addresses {[::]:9200}

Okay, good. What does ifconfig show for the IP addresses for this machine? What happens if you curl port 9200 on one of those IP addresses from the machine itself?

The IP address, that i get by hitting ifconfig, with that i am able to do a curl inside the machine. However, outside the machine, when i hit through browser i get a request timed out (ERR_CONNECTION_TIMED_OUT) response.

EDIT
Apparently, seems like I had a firewall issue blocking the particular port. so, as soon as i unblocked the 9200 port, i was able to access ES from outside the machine.

1 Like

If this is the case, the problem is not Elasticsearch but a firewall or other network configuration.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.