osx docker run elasticsearch for development



我正在使用 docker 在单节点中运行 elasticsearch 进行开发。 它在 Ubuntu 上运行良好,但在 OSX 上出了点问题。

这是我运行 ES 的方式。

docker run --rm --name es 
-p 9200:9200 -p 9300:9300 
-e "discovery.type=single-node" 
-e "xpack.security.enabled=false" 
docker.elastic.co/elasticsearch/elasticsearch:5.5.1

当我使用 curl 查看它是否有效时

curl 127.0.0.1:9200/_health?pretty
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "No endpoint or operation is available at [_health]"
}
],
"type" : "illegal_argument_exception",
"reason" : "No endpoint or operation is available at [_health]"
},
"status" : 400
}

这只发生在OSX上。

正如@Alex所说,我想念_cluter。

curl 127.0.0.1:9200/_cluster/health?pretty

最新更新