# Curl Problems with ElasticSearch on Ubuntu 10.04 Server

**URL:** <https://discuss.elastic.co/t/curl-problems-with-elasticsearch-on-ubuntu-10-04-server/5505>\
**Category:** Elasticsearch\
**Created:** [October 3, 2011, 7:13pm UTC](https://discuss.elastic.co/t/curl-problems-with-elasticsearch-on-ubuntu-10-04-server/5505 "2011-10-03T19:13:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh\_JRG](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/josh_jrg/32/3113_2.png) [@Josh\_JRG](https://discuss.elastic.co/u/Josh_JRG)\
**Post date:** [October 3, 2011, 7:13pm UTC](https://discuss.elastic.co/t/curl-problems-with-elasticsearch-on-ubuntu-10-04-server/5505/1 "2011-10-03T19:13:50Z")

</div>

I've got an Ubuntu 10.04 Server instance running on Amazon EC2 and I'm  
having some problems.

I followed this tutorial to the letter to install ElasticSearch:  
[http://www.elasticsearch.org/tutorials/2010/07/02/setting-up-elasticsearch-on-debian.html](http://www.elasticsearch.org/tutorials/2010/07/02/setting-up-elasticsearch-on-debian.html)

Whenever I attempt to interact with ElasticSearch via curl I get this  
error:  
curl: (7) couldn't connect to host

The service is running, but I can't even index any data at this point.  
Does anyone have any idea what might be going on? Has anyone  
encountered any this problem?

---

<div class="post-metadata">

**Author:** ![Curtis\_Caravone](https://avatars.discourse-cdn.com/v4/letter/c/e47c2d/32.png) [@Curtis\_Caravone](https://discuss.elastic.co/u/Curtis_Caravone)\
**Post date:** [October 3, 2011, 7:23pm UTC](https://discuss.elastic.co/t/curl-problems-with-elasticsearch-on-ubuntu-10-04-server/5505/2 "2011-10-03T19:23:16Z")

</div>

I believe the elasticsearch logs will tell you when the HTTP listener starts  
up and what port it is using. That should be a good starting point.

Curtis

On Mon, Oct 3, 2011 at 12:13 PM, Josh JRG [pac78275@gmail.com](mailto:pac78275@gmail.com) wrote:

> I've got an Ubuntu 10.04 Server instance running on Amazon EC2 and I'm  
> having some problems.
> 
> I followed this tutorial to the letter to install Elasticsearch:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/tutorials/2010/07/02/setting-up-elasticsearch-on-debian.html)
> 
> Whenever I attempt to interact with Elasticsearch via curl I get this  
> error:  
> curl: (7) couldn't connect to host
> 
> The service is running, but I can't even index any data at this point.  
> Does anyone have any idea what might be going on? Has anyone  
> encountered any this problem?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [October 3, 2011, 8:52pm UTC](https://discuss.elastic.co/t/curl-problems-with-elasticsearch-on-ubuntu-10-04-server/5505/3 "2011-10-03T20:52:15Z")

</div>

Yea, check the logs, it should tell you which address it bound to (which you  
can explicitly control by setting the network.host setting).

On Mon, Oct 3, 2011 at 9:23 PM, Curtis Caravone [caravone@gmail.com](mailto:caravone@gmail.com) wrote:

> I believe the elasticsearch logs will tell you when the HTTP listener  
> starts up and what port it is using. That should be a good starting point.
> 
> Curtis
> 
> On Mon, Oct 3, 2011 at 12:13 PM, Josh JRG [pac78275@gmail.com](mailto:pac78275@gmail.com) wrote:
> 
> > I've got an Ubuntu 10.04 Server instance running on Amazon EC2 and I'm  
> > having some problems.
> > 
> > I followed this tutorial to the letter to install Elasticsearch:
> > 
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/tutorials/2010/07/02/setting-up-elasticsearch-on-debian.html)
> > 
> > Whenever I attempt to interact with Elasticsearch via curl I get this  
> > error:  
> > curl: (7) couldn't connect to host
> > 
> > The service is running, but I can't even index any data at this point.  
> > Does anyone have any idea what might be going on? Has anyone  
> > encountered any this problem?

---

<div class="post-metadata">

**Author:** ![Tarun\_Jangra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tarun_jangra/32/1426_2.png) [@Tarun\_Jangra](https://discuss.elastic.co/u/Tarun_Jangra)\
**Post date:** [October 4, 2011, 9:07pm UTC](https://discuss.elastic.co/t/curl-problems-with-elasticsearch-on-ubuntu-10-04-server/5505/4 "2011-10-04T21:07:45Z")

</div>

I believe, you need to open the port under associated Security Group with your node. You can do that from terminal commands or you can local amazon web console go to "Ec2" and there you will find "Security Group".

---

<div class="post-metadata">

**Author:** ![dungtc](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@dungtc](https://discuss.elastic.co/u/dungtc)\
**Post date:** [November 8, 2011, 6:42pm UTC](https://discuss.elastic.co/t/curl-problems-with-elasticsearch-on-ubuntu-10-04-server/5505/5 "2011-11-08T18:42:43Z")

</div>

I have a trouble with Elastic search:  
After installing and running elastic search 0.17.6 by command  
bin/elasticsearch -f -Des.network.host=myIPAdress

Elastic search function very well

When I type this command on the machine of installed Elastic Search, called machine A (Fedora 13):  
curl - XGET [http://localhost:9200/myquery](http://localhost:9200/myquery)  
or curl - XGET [http://myIPAdress:9200/myquery](http://myIPAdress:9200/myquery)

it is OK, I always receive correct answer

But When I type this command  
curl - XGET [http://myIPAdress:9200/myquery](http://myIPAdress:9200/myquery)  
on another machine B (Fedora 13 too), I always receive the response:  
couldn't connect to the host although this machine B can always "ping" to the machine A

Elastic search log also let me know that, bound address is myIPAdress:9200, publish addresse is also myIPAdress:9200 (for http, and 9300 for transport).

Please help me solve this problem  
Thanks a lot

---

<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 6, 2017, 3:49am UTC](https://discuss.elastic.co/t/curl-problems-with-elasticsearch-on-ubuntu-10-04-server/5505/6 "2017-07-06T03:49:30Z")

</div>


