【Error】elasticsearch修改密码报错,elasticsearch-setup-passwords interactive

这篇具有很好参考价值的文章主要介绍了【Error】elasticsearch修改密码报错,elasticsearch-setup-passwords interactive。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

执行命令:./bin/elasticsearch-setup-passwords interactive后报错。

报错信息:

Failed to authenticate user 'elastic' against http://172.16.xxx.xxx:9200/_security/_authenticate?pretty
Possible causes include:
 * The password for the 'elastic' user has already been changed on this cluster
 * Your elasticsearch node is running against a different keystore
   This tool used the keystore at /usr/local/elasticsearch-7.2.0/config/elasticsearch.keystore

ERROR: Failed to verify bootstrap password

解决方法

需要删除.security-7索引文件

  1. elasticsearch.yml配置文件中的xpack.security.enabled: true注释掉

  2. 重启es

  3. 查看索引
    curl -XGET "127.0.0.1:9200/_cat/indices" -H 'Content-Type: application/json'

    如果显示connection refused,将127.0.0.1替换成真实ip地址

    执行成功后会看见.security-7的索引文件

    green open .security-7       UTccV8nQSmC4Y3FW4VjQLQ 1 1 7 1 9.6kb 9.6kb
    
  4. 删除.security-7
    curl -XDELETE 127.0.0.1:9200/.security-7
    看到{"acknowledged":true},表示删除成功

  5. 把在第1步中的被注释的配置打开

  6. 重启es

  7. 执行bin目录下的文件./bin/elasticsearch-setup-passwords interactive

  8. 之后就是按照提示输入密码

    future versions of Elasticsearch will require Java 11; your Java version from [/kaysen/tools/java/jre] does not meet this requirement
    Initiating the setup of passwords for reserved users elastic,apm_system,kibana,logstash_system,beats_system,remote_monitoring_user.
    You will be prompted to enter passwords as the process progresses.
    Please confirm that you would like to continue [y/N]y

    Enter password for [elastic]:
    Reenter password for [elastic]:
    Enter password for [apm_system]:
    Reenter password for [apm_system]:
    Enter password for [kibana]:
    Reenter password for [kibana]:
    Enter password for [logstash_system]:
    Reenter password for [logstash_system]:
    Enter password for [beats_system]:
    Reenter password for [beats_system]:
    Enter password for [remote_monitoring_user]:
    Reenter password for [remote_monitoring_user]:
    Changed password for user [apm_system]
    Changed password for user [kibana]
    Changed password for user [logstash_system]
    Changed password for user [beats_system]
    Changed password for user [remote_monitoring_user]
    Changed password for user [elastic]文章来源地址https://www.toymoban.com/news/detail-625155.html

到了这里,关于【Error】elasticsearch修改密码报错,elasticsearch-setup-passwords interactive的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包