2017-06-13 64 views
0

我正在學習最近在Windows上使用ElasticSearchCurl無法解析Elasticsearch中的主機

我按照說明this page說,卡在Checking that Elasticsearch is running

我已經下載了最新的Windows curl二進制可執行文件(7.54.0),但是當我使用按鈕COPY AS CURL複製以下行:

curl -XGET 'localhost:9200/?pretty' 

它給了錯誤:

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

我曾嘗試解決方案here禁用IPV6,但問題仍然存在。

回答

2

在我的情況下,curl不知何故不承認'符號。

'更改爲"可以解決問題。

curl -XGET "localhost:9200/?pretty"