Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Curl Could not resolve host in Elasticsearch

I am learning to using ElasticSearch on Windows recently.

I followed the instructions as this page said and got stuck at Checking that Elasticsearch is running.

I had downloaded the latest curl binary executable (7.54.0) for windows, but when I copied the following line using the button COPY AS CURL:

curl -XGET 'localhost:9200/?pretty'

It gave the error:

curl: (6) Could not resolve host: 'localhost

I had tried the solution here to disable IPV6 but the problem still remains.

like image 764
J3soon Avatar asked Sep 18 '25 22:09

J3soon


1 Answers

In my case, curl somehow doesn't recognize the ' symbol.

Changing ' to " can fix the problem.

curl -XGET "localhost:9200/?pretty"
like image 177
J3soon Avatar answered Sep 21 '25 08:09

J3soon