# Curl -X GET http://localhost:9200 is working BUT not http//127.0.0.1:9200

**URL:** <https://discuss.elastic.co/t/curl-x-get-http-localhost-9200-is-working-but-not-http-127-0-0-1-9200/199758>\
**Category:** Elasticsearch\
**Created:** [September 17, 2019, 5:35am UTC](https://discuss.elastic.co/t/curl-x-get-http-localhost-9200-is-working-but-not-http-127-0-0-1-9200/199758 "2019-09-17T05:35:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elmismo999](https://avatars.discourse-cdn.com/v4/letter/e/edb3f5/32.png) [@elmismo999](https://discuss.elastic.co/u/elmismo999)\
**Post date:** [September 17, 2019, 5:35am UTC](https://discuss.elastic.co/t/curl-x-get-http-localhost-9200-is-working-but-not-http-127-0-0-1-9200/199758/1 "2019-09-17T05:35:11Z")

</div>

Hello, I have installed Elasticsearch on Hortonworks Sandbox with HDP 2.2.4.2

- YES I could start elastic search
- YES curl is working

[alumno@sandbox ~]$ curl -X GET [http://localhost:9200](http://localhost:9200)  
{  
"name" : "[sandbox.hortonworks.com](http://sandbox.hortonworks.com)",  
"cluster\_name" : "elasticsearch",  
"cluster\_uuid" : "yrpFq-ltSaq51zj7Von79w",  
"version" : {  
"number" : "7.3.1",  
"build\_flavor" : "default",  
"build\_type" : "tar",  
"build\_hash" : "4749ba6",  
"build\_date" : "2019-08-19T20:19:25.651794Z",  
"build\_snapshot" : false,  
"lucene\_version" : "8.1.0",  
"minimum\_wire\_compatibility\_version" : "6.8.0",  
"minimum\_index\_compatibility\_version" : "6.0.0-beta1"  
},  
"tagline" : "You Know, for Search"  
}

- I tried different configuration in elasticsearch.yml But still curl is working but not http

#network.host: 192.168.0.1  
#network.host: 0.0.0.0  
network.bind\_host: 127.0.0.1  
#network.bind\_host: localhost

- I open the ports 9200 and 9300 in Hortonworks Sandbox with HDP 2.2.4.2

- I saw in internet that we have to configure network.host: 0.0.0.0  
BUT when I do this, then elasticsearch don´t start.

Can someone have an idea of what I could try ?

Thank You -

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 17, 2019, 5:39am UTC](https://discuss.elastic.co/t/curl-x-get-http-localhost-9200-is-working-but-not-http-127-0-0-1-9200/199758/2 "2019-09-17T05:39:27Z")

</div>

To use `network.host : 0.0.0.0` requires additional settings perhaps take a look at [this post](https://discuss.elastic.co/t/n00b-trying-to-set-up-on-windows/197514/4)

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 17, 2019, 5:43am UTC](https://discuss.elastic.co/t/curl-x-get-http-localhost-9200-is-working-but-not-http-127-0-0-1-9200/199758/3 "2019-09-17T05:43:22Z")

</div>

You are missing a colon in the second URL. Is that just a typo here?

---

<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 15, 2019, 5:43am UTC](https://discuss.elastic.co/t/curl-x-get-http-localhost-9200-is-working-but-not-http-127-0-0-1-9200/199758/4 "2019-10-15T05:43:25Z")

</div>

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