简体   繁体   English

docker Elasticsearch 5.6.10 如何删除用户名和密码

[英]docker Elasticsearch 5.6.10 how to remove username & password

I've ran this command我已经运行了这个命令

docker pull docker.elastic.co/elasticsearch/elasticsearch:5.6.10

and then up the docker by this command然后通过这个命令启动 docker

docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:5.6.10

But seems this version will set an default user name & password: elastic:changeme但似乎这个版本会设置一个默认的用户名和密码:elastic:changeme

Do anyone how to remove the username password?有没有人如何删除用户名密码?

It shouldn't until, you enable the x-pack basic security, can you share how its asking for the username and password and share the startup logs by using below command.直到您启用 x-pack 基本安全性,您才能分享它如何要求用户名和密码并使用以下命令共享启动日志。

docker logs <your-es-conatiner-id>

Edit: I tried it myself and saw x-pack plugin is loaded as shown in below log编辑:我自己尝试过,看到 x-pack 插件已加载,如下面的日志所示

[2020-08-27T10:50:24,913][INFO ][o.e.p.PluginsService     ] [IioZz2W] loaded plugin [ingest-user-agent]
[2020-08-27T10:50:24,913][INFO ][o.e.p.PluginsService     ] [IioZz2W] loaded plugin [x-pack]

Also its asking me same username/password, so you need to disable the x-pack while running the docker conatiner.它还询问我相同的用户名/密码,因此您需要在运行 docker conatiner 时禁用 x-pack。

Adding -e "xpack.security.enabled=false" in your docker run command will fix the issue.-e "xpack.security.enabled=false" run 命令中添加-e "xpack.security.enabled=false"将解决该问题。

So your run command will be like below所以你的运行命令将如下所示

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM