# Problem with accessing elasticsearch remotly

**URL:** <https://discuss.elastic.co/t/problem-with-accessing-elasticsearch-remotly/134779>\
**Category:** Elasticsearch\
**Created:** [June 6, 2018, 10:05am UTC](https://discuss.elastic.co/t/problem-with-accessing-elasticsearch-remotly/134779 "2018-06-06T10:05:01Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Muneer\_Ahmad](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@Muneer\_Ahmad](https://discuss.elastic.co/u/Muneer_Ahmad)\
**Post date:** [June 6, 2018, 10:05am UTC](https://discuss.elastic.co/t/problem-with-accessing-elasticsearch-remotly/134779/1 "2018-06-06T10:05:01Z")

</div>

Hi,

i am trying to access elastic search using my server public ip address since last week but not able to do so. i have tried so many solutions but not succeeded. My elasticsearch.yml file settings are like:

**http.host: _my server public ip address_**  
**http.port: 9200**  
**cluster.name: pld**

i want to access like this:  
[http://myserverip:9200/](http://myserverip:9200/)

Please someone help me  
Thanks in advance  
Muneer Hassan

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 6, 2018, 10:46am UTC](https://discuss.elastic.co/t/problem-with-accessing-elasticsearch-remotly/134779/2 "2018-06-06T10:46:27Z")

</div>

Share your elasticsearch logs.

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

---

<div class="post-metadata">

**Author:** ![Muneer\_Ahmad](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@Muneer\_Ahmad](https://discuss.elastic.co/u/Muneer_Ahmad)\
**Post date:** [June 6, 2018, 11:37am UTC](https://discuss.elastic.co/t/problem-with-accessing-elasticsearch-remotly/134779/3 "2018-06-06T11:37:24Z")

</div>

Thanks for reply, my log is look like

```
[2018-06-06 11:33:46,932][INFO][node] [node-1] version[2.4.2], pid[23359],                     
build[161c65a/2016-11-17T11:51:03Z]
[2018-06-06 11:33:46,932][INFO][node] [node-1] initializing ...
[2018-06-06 11:33:47,434][INFO][plugins] [node-1] modules [reindex, lang-expression, lang- 
groovy], plugins [], sites []
[2018-06-06 11:33:47,453][INFO][env] [node-1] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable_space [197.9gb], net total_space [295.1gb], spins? [no], types [ext4]
[2018-06-06 11:33:47,453][INFO][env] [node-1] heap size [1007.3mb], compressed ordinary object pointers [true]
[2018-06-06 11:33:49,149][INFO][node] [node-1] initialized
[2018-06-06 11:33:49,149][INFO][node] [node-1] starting ...
[2018-06-06 11:33:49,218][INFO][transport] [node-1] publish_address {172.31.55.82:9300}, bound_addresses {[::]:9300}
[2018-06-06 11:33:49,223][INFO][discovery] [node-1] pld/y745dyoASHiNx75h08es4w
[2018-06-06 11:33:52,262][INFO][cluster.service] [node-1] new_master {node-1}{y745dyoASHiNx75h08es4w}{172.31.55.82}{172.31.55.82:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2018-06-06 11:33:52,269][INFO][http] [node-1] publish_address {172.31.55.82:9200}, bound_addresses {[::]:9200}
[2018-06-06 11:33:52,269][INFO][node] [node-1] started
[2018-06-06 11:33:52,538][INFO][gateway] [node-1] recovered [22] indices into cluster_state
[2018-06-06 11:33:55,049][INFO][cluster.routing.allocation] [node-1] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[searchterms_1512644811][0], [searchterms_1512644811][2], [searchterms_1512644811][0]] ...]).
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 6, 2018, 11:55am UTC](https://discuss.elastic.co/t/problem-with-accessing-elasticsearch-remotly/134779/4 "2018-06-06T11:55:19Z")

</div>

What gives:

```
curl 172.31.55.82:9200/

```

?

---

<div class="post-metadata">

**Author:** ![Muneer\_Ahmad](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@Muneer\_Ahmad](https://discuss.elastic.co/u/Muneer_Ahmad)\
**Post date:** [June 6, 2018, 12:01pm UTC](https://discuss.elastic.co/t/problem-with-accessing-elasticsearch-remotly/134779/5 "2018-06-06T12:01:04Z")

</div>

it replies fine from same server, but its private ip and not accessable from browser and another server

response of (curl 172.31.55.82:9200) from same server  
{  
"name" : "node-1",  
"cluster\_name" : "pld",  
"cluster\_uuid" : "xOIcIrBYTceO5NEybm01KQ",  
"version" : {  
"number" : "2.4.2",  
"build\_hash" : "161c65a337d4b422ac0c805f284565cf2014bb84",  
"build\_timestamp" : "2016-11-17T11:51:03Z",  
"build\_snapshot" : false,  
"lucene\_version" : "5.5.2"  
},  
"tagline" : "You Know, for Search"  
}

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 6, 2018, 12:17pm UTC](https://discuss.elastic.co/t/problem-with-accessing-elasticsearch-remotly/134779/6 "2018-06-06T12:17:53Z")

</div>

Can you bind to the public ip then?

I hope that it's not public on internet though.

---

<div class="post-metadata">

**Author:** ![Muneer\_Ahmad](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@Muneer\_Ahmad](https://discuss.elastic.co/u/Muneer_Ahmad)\
**Post date:** [June 7, 2018, 5:29am UTC](https://discuss.elastic.co/t/problem-with-accessing-elasticsearch-remotly/134779/7 "2018-06-07T05:29:33Z")

</div>

I have bind

```
network.host: 0.0.0.0
http.host: public_ip

```

but not work, throw following exception on elasticsearch restart

```
BindHttpException[Failed to bind to [9200]]; nested: ChannelException[Failed to bind to: /54.210.102.235:9200]; nested: BindException[Cannot assign requested address];
	at org.elasticsearch.http.netty.NettyHttpServerTransport.bindAddress(NettyHttpServerTransport.java:391)
	at org.elasticsearch.http.netty.NettyHttpServerTransport.createBoundHttpAddress(NettyHttpServerTransport.java:289)
	at org.elasticsearch.http.netty.NettyHttpServerTransport.doStart(NettyHttpServerTransport.java:275)
	at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
	at org.elasticsearch.http.HttpServer.doStart(HttpServer.java:107)
	at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
	at org.elasticsearch.node.Node.start(Node.java:289)
	at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:222)
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:288)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: /public_ip:9200
	at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)
	at org.elasticsearch.http.netty.NettyHttpServerTransport$1.onPortNumber(NettyHttpServerTransport.java:379)
	at org.elasticsearch.common.transport.PortsRange.iterate(PortsRange.java:58)
	at org.elasticsearch.http.netty.NettyHttpServerTransport.bindAddress(NettyHttpServerTransport.java:374)
	... 9 more
Caused by: java.net.BindException: Cannot assign requested address
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Net.java:433)
	at sun.nio.ch.Net.bind(Net.java:425)
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
	at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)
	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391)
	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315)
	at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
	at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
	at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
[2018-06-07 05:21:12,845][INFO][node] [node-1] stopping ...
[2018-06-07 05:21:13,087][INFO][gateway] [node-1] recovered [22] indices into cluster_state
[2018-06-07 05:21:13,093][INFO][node] [node-1] stopped
[2018-06-07 05:21:13,093][INFO][node] [node-1] closing ...
[2018-06-07 05:21:13,098][INFO][node] [node-1] closed

```

then i set

```
network.host: public_ip
http.host: 0.0.0.0

```

i receive following exception on elasticsearch restart

```
BindTransportException[Failed to bind to [9300-9400]]; nested: ChannelException[Failed to bind to: /public_ip:9400]; nested: BindException[Cannot assign requested address];
	at org.elasticsearch.transport.netty.NettyTransport.bindToPort(NettyTransport.java:489)
	at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:451)
	at org.elasticsearch.transport.netty.NettyTransport.doStart(NettyTransport.java:332)
	at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
	at org.elasticsearch.transport.TransportService.doStart(TransportService.java:182)
	at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
	at org.elasticsearch.node.Node.start(Node.java:278)
	at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:222)
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:288)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: /public_ip:9400
	at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)
	at org.elasticsearch.transport.netty.NettyTransport$1.onPortNumber(NettyTransport.java:471)
	at org.elasticsearch.common.transport.PortsRange.iterate(PortsRange.java:69)
	at org.elasticsearch.transport.netty.NettyTransport.bindToPort(NettyTransport.java:467)
	... 9 more
Caused by: java.net.BindException: Cannot assign requested address
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Net.java:433)
	at sun.nio.ch.Net.bind(Net.java:425)
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
	at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)
	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391)
	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315)
	at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
	at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
	at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
[2018-06-07 05:26:31,647][INFO][node] [node-1] stopping ...
[2018-06-07 05:26:31,648][INFO][node] [node-1] stopped
[2018-06-07 05:26:31,648][INFO][node] [node-1] closing ...
[2018-06-07 05:26:31,652][INFO][node] [node-1] closed
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 7, 2018, 6:13am UTC](https://discuss.elastic.co/t/problem-with-accessing-elasticsearch-remotly/134779/8 "2018-06-07T06:13:17Z")

</div>

So you don't have a network card exposing `54.210.102.235` IP.  
You probably need to change some network settings (not on elasticsearch side) and "route" whatever is coming to the public IP to this private IP where elasticsearch is bound.

---

<div class="post-metadata">

**Author:** ![Muneer\_Ahmad](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@Muneer\_Ahmad](https://discuss.elastic.co/u/Muneer_Ahmad)\
**Post date:** [June 7, 2018, 7:23am UTC](https://discuss.elastic.co/t/problem-with-accessing-elasticsearch-remotly/134779/10 "2018-06-07T07:23:51Z")

</div>

I have set

```
network.host: 0.0.0.0
http.host: 0.0.0.0

```

and set inbound rule for port 9200 on my server, now its working..

Thank You so much for supporting

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 7, 2018, 8:35am UTC](https://discuss.elastic.co/t/problem-with-accessing-elasticsearch-remotly/134779/11 "2018-06-07T08:35:24Z")

</div>

Did you look at [https://www.elastic.co/cloud](https://www.elastic.co/cloud) ?

Cloud by elastic is the way to have access to X-Pack. Think about what is there yet like Security, Monitoring, Reporting and what is coming like Canvas, SQL...  
And everything is managed for you.

---

<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:** [July 5, 2018, 8:35am UTC](https://discuss.elastic.co/t/problem-with-accessing-elasticsearch-remotly/134779/12 "2018-07-05T08:35:31Z")

</div>

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