# Querying Elasticsearch Remotely

**URL:** <https://discuss.elastic.co/t/querying-elasticsearch-remotely/38691>\
**Category:** Elasticsearch\
**Created:** [January 8, 2016, 4:48am UTC](https://discuss.elastic.co/t/querying-elasticsearch-remotely/38691 "2016-01-08T04:48:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ninjada](https://avatars.discourse-cdn.com/v4/letter/n/5daacb/32.png) [@ninjada](https://discuss.elastic.co/u/ninjada)\
**Post date:** [January 8, 2016, 4:48am UTC](https://discuss.elastic.co/t/querying-elasticsearch-remotely/38691/1 "2016-01-08T04:48:18Z")

</div>

Have recently updated to latest ES along with Logstash & Kibana latest. I was previously running a script from an external server that would search an IP list in elasticsearch. Since updating the script hasn't been able to connect properly and I can't seem to troubleshoot it.

the ES port 9200 is firewalled down to two servers, but im only receiving the following:

curl -XGET [http://myserver.com:9200/\_count?pretty](http://myserver.com:9200/_count?pretty)  
curl: (52) Empty reply from server

The same works fine to the old server eg.

curl -XGET [http://myserver.old:9200/\_count?pretty](http://myserver.old:9200/_count?pretty)  
{  
"count" : 198372412,  
"\_shards" : {  
"total" : 33,  
"successful" : 33,  
"failed" : 0  
}  
}

I assumed it might be an elasticsearch config option such as the network.bind.host or network.publish.host but I've tried every combo of network.bind.host and the latter seems to be cluster specific and I only have a single node.

What needs to be set for elasticsearch 2.x to respond remotely to search queries?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 8, 2016, 4:57am UTC](https://discuss.elastic.co/t/querying-elasticsearch-remotely/38691/2 "2016-01-08T04:57:47Z")

</div>

Check out [Connectivity issues with a new/upgraded 2.X cluster? Read here first :)](https://discuss.elastic.co/t/connectivity-issues-with-a-new-upgraded-2-x-cluster-read-here-first/35699)

---

<div class="post-metadata">

**Author:** ![ninjada](https://avatars.discourse-cdn.com/v4/letter/n/5daacb/32.png) [@ninjada](https://discuss.elastic.co/u/ninjada)\
**Post date:** [January 8, 2016, 5:30am UTC](https://discuss.elastic.co/t/querying-elasticsearch-remotely/38691/3 "2016-01-08T05:30:28Z")

</div>

thanks man. was using the ec2 discovery stuff for network.bind.host: _ec2:ipv4_ -- seems this should now be network.bind\_host: _ec2:ipv4_

it works remotely but then elasticsearch cant connect locally. unfortunately, I can't seem to get elasticsearch to work locally & remotely at the same time, ie. localhost and be queryable remotely via it's eth0/public IP

can't workout the config setting for this?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 8, 2016, 5:59am UTC](https://discuss.elastic.co/t/querying-elasticsearch-remotely/38691/4 "2016-01-08T05:59:34Z")

</div>

Try `network.host: 0.0.0.0`.

---

<div class="post-metadata">

**Author:** ![ninjada](https://avatars.discourse-cdn.com/v4/letter/n/5daacb/32.png) [@ninjada](https://discuss.elastic.co/u/ninjada)\
**Post date:** [January 8, 2016, 6:02am UTC](https://discuss.elastic.co/t/querying-elasticsearch-remotely/38691/5 "2016-01-08T06:02:15Z")

</div>

oh doh! that works, thanks man!

---

<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, 2017, 11:26pm UTC](https://discuss.elastic.co/t/querying-elasticsearch-remotely/38691/6 "2017-07-05T23:26:09Z")

</div>


