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

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 -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?

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.

Sorry, I can't find any format error.

} ';

Remove ;

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

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

Can you answer the other questions I asked?

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

@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
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.


Ok, thanks a lot.

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