赞
踩
./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索引文件
将elasticsearch.yml
配置文件中的xpack.security.enabled: true
注释掉
重启es
查看索引
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
删除.security-7
curl -XDELETE 127.0.0.1:9200/.security-7
看到{"acknowledged":true}
,表示删除成功
把在第1步中的被注释的配置打开
重启es
执行bin目录下的文件./bin/elasticsearch-setup-passwords interactive
之后就是按照提示输入密码
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]
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。