Unable to access Elasticsearch 6.3.1 outside server

Hi,

I have Elasticsearch 6.3.1 installed on Digitalocean droplet running Ubuntu 14.04.5 LTS.

I am able to curl Elasticsearch on localhost, but unable to access it from outside network.

Here is the snapshot of my netstat

I tried updating the elasticsearch.yml, but that also did not help.

Hi

Set the "network.host" or "network.bind.host" such as "0.0.0.0".
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html

Otherwise, your host's network/security setting issue maybe.

regards

Hi Makoto,

Thanks a lot for your reply.

I have set "network.host" to 0.0.0.0 in my elasticsearch.yml file. I can curl elasticsearch in localhost, but not from other computer(my personal machine)

kindly help me to connect to elasticsearch sever from outside the network.

Ravi,

The following link should get you connected. I'm making the assumption you want to SSH into your droplet.

The link.

Hi Thomas,

I can connect to my Digitalocean droplet via SSH. I have also successfully installed Elasticsearch on the droplet. I can curl Elasticsearch on the droplet localhost, but when I try to curl the droplet from my local machine (from outside the droplet), it throws me a curl error. I need a way to curl my Elasticsearch server from outside the network.

Check your ES node initialization logs for publish_address and bound_address to verify that your configuration is really applied. If your publish_address is not a loopback address, your configuration should be ok and host security is blocking the connection from outside.

Hi Sharju,

Thanks a lot for your reply,

As suggested, I checked the elasticseach logs and found two lines with publish_address and bound_address.

[2018-07-27T14:56:07,013][INFO ][o.e.t.TransportService ] [VH1h1RB] publish_address {159.65.145.59:9300}, bound_addresses {[::]:9300}

and another one,

[2018-07-27T14:56:10,153][INFO ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [VH1h1RB] publish_address {159.65.145.59:9200}, bound_addresses {[::]:9200}

It seems like publish_address is not a loopback address, and problem is with host security.

Please find the Nmap results for the server below.
Starting Nmap 6.40 ( http://nmap.org ) at 2018-07-27 15:00 IST
Nmap scan report for 159.65.145.59
Host is up (0.0000080s latency).
Not shown: 991 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
53/tcp open domain
80/tcp open http
110/tcp open pop3
143/tcp open imap
443/tcp open https
9200/tcp open wap-wsp

Nmap done: 1 IP address (1 host up) scanned in 2.46 seconds

If you need any other information please let me know.

I would be very helpful if you can provide me with a solution or a link to some tutorial which shows how to access elasticsearch from out side network

This doesnt seem to be a problem with elasticsearch. Check if your ubuntu has a firewall up:
sudo ufw status

If its up and running, add ports:
sudo ufw allow 9200/tcp
sudo ufw allow 9300/tcp
sudo ufw status

I have no experience with DO droplets. If your ubuntu aint blocking connections, I suggest looking through DO guide materials and forums.

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