# Curl: (6) Couldn't resolve host ''

**URL:** <https://discuss.elastic.co/t/curl-6-couldnt-resolve-host/100745>\
**Category:** Elasticsearch\
**Created:** [September 16, 2017, 3:26am UTC](https://discuss.elastic.co/t/curl-6-couldnt-resolve-host/100745 "2017-09-16T03:26:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![saliormoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saliormoon/32/21499_2.png) [@saliormoon](https://discuss.elastic.co/u/saliormoon)\
**Post date:** [September 16, 2017, 3:26am UTC](https://discuss.elastic.co/t/curl-6-couldnt-resolve-host/100745/1 "2017-09-16T03:26:33Z")

</div>

Elasticsearch version:5.5.2  
OS version: Suse Linux

When I create a index and its mapping with the command line as follow :

curl -XPUT [http://10.62.179.32:9200/shakespeare](http://10.62.179.32:9200/shakespeare) -d ' {  
"mappings" : {  
"_default_" : {  
"properties" : {  
"speaker" : {"type": "string", "index" : "not\_analyzed" },  
"play\_name" : {"type": "string", "index" : "not\_analyzed" },  
"line\_id" : { "type" : "integer" },  
"speech\_number" : { "type" : "integer"  
}  
}  
}  
}  
} ';  
But It throws a error like this:  
curl: (6) Couldn't resolve host 'l0.62.179.32'  
Could anyone can give me any advice?

---

<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:** [September 16, 2017, 4:12am UTC](https://discuss.elastic.co/t/curl-6-couldnt-resolve-host/100745/2 "2017-09-16T04:12:35Z")

</div>

> [@saliormoon](#):
>
> curl: (6) Couldn't resolve host 'l0.62.179.32'

Is that the exact error?

If not please copy and paste the command with the error and then use the code format tags - `</>` - to made it properly formatted.

---

<div class="post-metadata">

**Author:** ![saliormoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saliormoon/32/21499_2.png) [@saliormoon](https://discuss.elastic.co/u/saliormoon)\
**Post date:** [September 16, 2017, 6:20am UTC](https://discuss.elastic.co/t/curl-6-couldnt-resolve-host/100745/3 "2017-09-16T06:20:01Z")

</div>

Sorry, I can't find any format error.

---

<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:** [September 16, 2017, 6:39am UTC](https://discuss.elastic.co/t/curl-6-couldnt-resolve-host/100745/4 "2017-09-16T06:39:56Z")

</div>

```
} ';

```

Remove `;`

What are your elasticsearch logs?  
Are you running that from the same LAN as your elasticsearch node? 10.x is a private IP.

---

<div class="post-metadata">

**Author:** ![saliormoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saliormoon/32/21499_2.png) [@saliormoon](https://discuss.elastic.co/u/saliormoon)\
**Post date:** [September 18, 2017, 1:32am UTC](https://discuss.elastic.co/t/curl-6-couldnt-resolve-host/100745/5 "2017-09-18T01:32:37Z")

</div>

When I remove ;, it still throws the same error.

---

<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:** [September 18, 2017, 3:31am UTC](https://discuss.elastic.co/t/curl-6-couldnt-resolve-host/100745/6 "2017-09-18T03:31:11Z")

</div>

Can you answer the other questions I asked?

---

<div class="post-metadata">

**Author:** ![saliormoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saliormoon/32/21499_2.png) [@saliormoon](https://discuss.elastic.co/u/saliormoon)\
**Post date:** [September 18, 2017, 3:38am UTC](https://discuss.elastic.co/t/curl-6-couldnt-resolve-host/100745/7 "2017-09-18T03:38:45Z")

</div>

Of course, the network.host in elasticsearch.yml of the node is 10.62.179.32. And I run the command line in the 10.62.179.32 server, So I think they are in the same LAN.

---

<div class="post-metadata">

**Author:** ![poojagupta](https://avatars.discourse-cdn.com/v4/letter/p/5daacb/32.png) [@poojagupta](https://discuss.elastic.co/u/poojagupta)\
**Post date:** [September 18, 2017, 4:51am UTC](https://discuss.elastic.co/t/curl-6-couldnt-resolve-host/100745/8 "2017-09-18T04:51:46Z")

</div>

@saliormoon As it seems that there is an issue for resolving host issue.  
unable to resolving host on which you are running Elasticsearch.

Your curl request is getting failed due to this. Firstly check you are able to access elasticsearch url.  
Via following command:  
curl [http://ElastisearchIP:9200](http://ElastisearchIP:9200)  
if it is getting error then issue is with your host .  
for this make an entry in /etc/hosts also.  
Please share Elasticsearch logs for better understanding.

---

<div class="post-metadata">

**Author:** ![saliormoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saliormoon/32/21499_2.png) [@saliormoon](https://discuss.elastic.co/u/saliormoon)\
**Post date:** [September 19, 2017, 12:58am UTC](https://discuss.elastic.co/t/curl-6-couldnt-resolve-host/100745/9 "2017-09-19T00:58:15Z")

</div>

Ok, 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:** [October 17, 2017, 12:58am UTC](https://discuss.elastic.co/t/curl-6-couldnt-resolve-host/100745/10 "2017-10-17T00:58:25Z")

</div>

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