elasticsearch xpack - 无法更改默认密码

时间:2017-06-05 12:27:15

标签: elasticsearch

我为elasticsearch安装了Xpack,并尝试更改密码,如下所示: https://www.elastic.co/guide/en/x-pack/current/security-getting-started.html

运行此:

curl -XPUT -u elastic localhost:9200/_xpack/security/user/elastic/_password -H Content-Type: application/json -d {"password" : "elasticpassword"}

让我:

{"error":{"root_cause":[{"type":"json_parse_exception","reason":"Unexpected character ('p' (code 112)): was expecting double-quote to start field name\n
at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@4a142671; line: 1, column: 3]"}],"type":"json_parse_exception","reason":"Unexpected character ('p' (code 112)): was expecting double-quote to start field name\n 
at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@4a142671; line: 1, column: 3]"},"status":500}curl: (6) Could not resolve host: application
curl: (3) Bad URL, colon is first character
curl: (3) [globbing] unmatched close brace/bracket in column 16


或者,运行这个:

curl -XPUT -u elastic "localhost:9200/_xpack/security/user/elastic/_password" -H "Content-Type: application/json -d {"password" : "elasticpassword"}

告诉我这个:

{"error":{"root_cause":[{"type":"not_x_content_exception","reason":"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"}],"type":"not_x_content_exception","reason":"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"},"status":500}

无论是什么组合,我都无法得到它。或者'我正在使用。请帮忙!

由于

1 个答案:

答案 0 :(得分:0)

这是Windows用户的一般问题。您可以改用Sense Chrome插件或Kibana Dev Tools。

curl -XPUT -u elastic localhost:9200/_xpack/security/user/elastic/_password -H "Content-Type: application/json" -d "{\"password\" : \"elasticpassword\"}"

请检查弹性开发人员对此情况的回应: https://discuss.elastic.co/t/index-a-new-document/35281/8