# Elasticsearch could not run on public ip on AWS

**URL:** <https://discuss.elastic.co/t/elasticsearch-could-not-run-on-public-ip-on-aws/248354>\
**Category:** Elasticsearch\
**Created:** [September 11, 2020, 3:54pm UTC](https://discuss.elastic.co/t/elasticsearch-could-not-run-on-public-ip-on-aws/248354 "2020-09-11T15:54:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankitdevnalkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankitdevnalkar/32/46158_2.png) [@ankitdevnalkar](https://discuss.elastic.co/u/ankitdevnalkar)\
**Post date:** [September 11, 2020, 3:54pm UTC](https://discuss.elastic.co/t/elasticsearch-could-not-run-on-public-ip-on-aws/248354/1 "2020-09-11T15:54:25Z")

</div>

I am trying to bind my public ip on Elasticsearch but it does not working. however, it is working ok while doing curl from localhost, but giving connection timed out on browser.  
I read almost every article here in community as well as stack overflow but non of them helped address this issue. My **elasticsearch.yml** file is as follows. Can anyone help ?

# ======================== Elasticsearch Configuration =========================

# 

# NOTE: Elasticsearch comes with reasonable defaults for most settings.

# Before you set out to tweak and tune the configuration, make sure you

# understand what are you trying to accomplish and the consequences.

# 

# The primary way of configuring a node is via this file. This template lists

# the most important settings you may want to configure for a production cluster.

# 

# Please consult the documentation for further information on configuration options:

# [https://www.elastic.co/guide/en/elasticsearch/reference/index.html](https://www.elastic.co/guide/en/elasticsearch/reference/index.html)

# 

# ---------------------------------- Cluster -----------------------------------

# 

# Use a descriptive name for your cluster:

# 

cluster.name: aws-elastic

# 

# ------------------------------------ Node ------------------------------------

# 

# Use a descriptive name for the node:

# 

node.name: aws-node

# 

# Add custom attributes to the node:

# 

#node.attr.rack: r1

# 

# ----------------------------------- Paths ------------------------------------

# 

# Path to directory where to store the data (separate multiple locations by comma):

# 

path.data: /var/lib/elasticsearch

# 

# Path to log files:

# 

path.logs: /var/log/elasticsearch

# 

# ----------------------------------- Memory -----------------------------------

# 

# Lock the memory on startup:

# 

#bootstrap.memory\_lock: true

# 

# Make sure that the heap size is set to about half the memory available

# on the system and that the owner of the process is allowed to use this

# limit.

# 

# Elasticsearch performs poorly when the system is swapping the memory.

# 

# ---------------------------------- 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

# 

# 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: ["172.31.15.53"]

# 

# For more information, consult the discovery and cluster formation module documentation.

# 

# ---------------------------------- Gateway -----------------------------------

# 

# Block initial recovery after a full cluster restart until N nodes are started:

# 

#gateway.recover\_after\_nodes: 3

# 

# For more information, consult the gateway module documentation.

# 

# ---------------------------------- Various -----------------------------------

# 

# Require explicit names when deleting indices:

# 

#action.destructive\_requires\_name: true

**Following is my log output**

[2020-09-11T15:38:14,244][INFO][o.e.e.NodeEnvironment] [aws-node] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable\_space [31.5gb], net total\_space [33.8gb], types [ext4]  
[2020-09-11T15:38:14,245][INFO][o.e.e.NodeEnvironment] [aws-node] heap size [1gb], compressed ordinary object pointers [true]  
[2020-09-11T15:38:14,324][INFO][o.e.n.Node] [aws-node] node name [aws-node], node ID [GkYwmSeDQ5S8p-\_STKhK0g], cluster name [aws-elastic]  
[2020-09-11T15:38:18,049][INFO][o.e.x.m.p.l.CppLogMessageHandler] [aws-node] [controller/23414] [Main.cc@114] controller (64 bit): Version 7.9.1 (Build 6ed2566ba11bb5) Copyright (c) 2020 Elasticsearch BV  
[2020-09-11T15:38:18,913][INFO][o.e.x.s.a.s.FileRolesStore] [aws-node] parsed [0] roles from file [/etc/elasticsearch/roles.yml]  
[2020-09-11T15:38:20,037][INFO][o.e.d.DiscoveryModule] [aws-node] using discovery type [zen] and seed hosts providers [settings]  
[2020-09-11T15:38:20,505][WARN][o.e.g.DanglingIndicesState] [aws-node] gateway.auto\_import\_dangling\_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually  
[2020-09-11T15:38:20,948][INFO][o.e.n.Node] [aws-node] initialized  
[2020-09-11T15:38:20,948][INFO][o.e.n.Node] [aws-node] starting ...  
[2020-09-11T15:38:21,081][INFO][o.e.t.TransportService] [aws-node] publish\_address {172.31.15.53:9300}, bound\_addresses {[::]:9300}  
[2020-09-11T15:38:21,501][INFO][o.e.b.BootstrapChecks] [aws-node] bound or publishing to a non-loopback address, enforcing bootstrap checks  
[2020-09-11T15:38:21,536][INFO][o.e.c.c.Coordinator] [aws-node] cluster UUID [8nED9dpUQb6gOSOyepDqZQ]  
[2020-09-11T15:38:21,720][INFO][o.e.c.s.MasterService] [aws-node] elected-as-master ([1] nodes joined)[{aws-node}{GkYwmSeDQ5S8p-\_STKhK0g}{h74TrcL3QfSaVHuPPk3UXA}{172.31.15.53}{172.31.15.53:9300}{dilmrt}{ml.machine\_memory=8369885184, xpack.installed=true, transform.node=true, ml.max\_open\_jobs=20} elect leader, _BECOME\_MASTER\_TASK_, _FINISH\_ELECTION_], term: 12, version: 65, delta: master node changed {previous , current [{aws-node}{GkYwmSeDQ5S8p-\_STKhK0g}{h74TrcL3QfSaVHuPPk3UXA}{172.31.15.53}{172.31.15.53:9300}{dilmrt}{ml.machine\_memory=8369885184, xpack.installed=true, transform.node=true, ml.max\_open\_jobs=20}]}  
[2020-09-11T15:38:21,808][INFO][o.e.c.s.ClusterApplierService] [aws-node] master node changed {previous , current [{aws-node}{GkYwmSeDQ5S8p-\_STKhK0g}{h74TrcL3QfSaVHuPPk3UXA}{172.31.15.53}{172.31.15.53:9300}{dilmrt}{ml.machine\_memory=8369885184, xpack.installed=true, transform.node=true, ml.max\_open\_jobs=20}]}, term: 12, version: 65, reason: Publication{term=12, version=65}  
[2020-09-11T15:38:21,856][INFO][o.e.h.AbstractHttpServerTransport] [aws-node] publish\_address {172.31.15.53:9200}, bound\_addresses {[::]:9200}  
[2020-09-11T15:38:21,857][INFO][o.e.n.Node] [aws-node] started  
[2020-09-11T15:38:22,076][INFO][o.e.l.LicenseService] [aws-node] license [ef716b16-b4a2-44f0-b6b9-6565980d79b5] mode [basic] - valid  
[2020-09-11T15:38:22,079][INFO][o.e.x.s.s.SecurityStatusChangeListener] [aws-node] Active license is now [BASIC]; Security is disabled  
[2020-09-11T15:38:22,091][INFO][o.e.g.GatewayService] [aws-node] recovered [0] indices into cluster\_state

---

<div class="post-metadata">

**Author:** ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)\
**Post date:** [September 12, 2020, 4:02am UTC](https://discuss.elastic.co/t/elasticsearch-could-not-run-on-public-ip-on-aws/248354/2 "2020-09-12T04:02:55Z")

</div>

> [@ankitdevnalkar](#):
>
> network.host: "0.0.0.0"

What are you trying to do, as the above 0.0.0.0 is all you need to do, but this will bind to the PRIVATE IP of the AWS node - the public IP is not normally on the VM or an interface the node can listen on, that's provided via EIP and should just work once you attach the EIP - so can you give us more info?

---

<div class="post-metadata">

**Author:** ![ankitdevnalkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankitdevnalkar/32/46158_2.png) [@ankitdevnalkar](https://discuss.elastic.co/u/ankitdevnalkar)\
**Post date:** [September 12, 2020, 7:42am UTC](https://discuss.elastic.co/t/elasticsearch-could-not-run-on-public-ip-on-aws/248354/3 "2020-09-12T07:42:05Z")

</div>

It is resolved. It was my router which were not supporting IPv6. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 10, 2020, 7:42am UTC](https://discuss.elastic.co/t/elasticsearch-could-not-run-on-public-ip-on-aws/248354/4 "2020-10-10T07:42:13Z")

</div>

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