【问题标题】:Curl Could not resolve host in ElasticsearchCurl 无法解析 Elasticsearch 中的主机
【发布时间】:2017-06-13 23:07:39
【问题描述】:

我最近正在学习在 Windows 上使用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,但问题仍然存在。

【问题讨论】:

    标签: curl elasticsearch


    【解决方案1】:

    就我而言,curl 不知何故无法识别' 符号。

    ' 更改为" 可以解决此问题。

    curl -XGET "localhost:9200/?pretty"
    

    【讨论】:

    • 因为你在 Windows 上
    • 是的,在 Windows 中我们应该使用 ",而在 Linux 中是 '。本教程没有更新 Windows 的命令。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-09-12
    • 1970-01-01
    • 1970-01-01
    • 2010-11-23
    • 2011-05-20
    相关资源
    最近更新 更多