首页 > 其他 > 详细

elastic 账户认证 401 问题?

时间:2020-05-22 19:31:42      阅读:1825      评论:0      收藏:0      [点我收藏+]

elastic 访问9200 认证无法登陆,日志 出现 401 问题?

同样的 访问 kibana http://ip:5601 出现:Kibana server is not ready yet访问异常 ?

es 添加认证 9200 登陆异常,es 日志信息?
[2020-05-22T17:13:30,401][INFO ][o.e.x.s.a.AuthenticationService] [10.10.28.92] Authentication of [elastic] was terminated by realm [reserved] - failed to authenticate user [elastic]
[2020-05-22T17:20:49,401][INFO ][o.e.x.s.a.AuthenticationService] [10.10.28.92] Authentication of [elastic] was terminated by realm [reserved] - failed to authenticate user [elastic]

同时测试 kibana 5601 登陆?

访问 http://ip:5601 出现异常
Kibana server is not ready yet

本地 验证  elastic 账户 

本地 验证 elastic 账户 
curl -u elastic http://localhost:9200/_xpack/security/_authenticate?pretty

技术分享图片

 检查 es 配置;

切换 elastic 主目录
vi config/elasticsearch.yml ### http.cors.enabled: true http.cors.allow-origin: "*" http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type # xpack.ml.enabled: false xpack.security.enabled: true xpack.security.transport.ssl.enabled: true ###

检查 kibana 配置;

切换 kibana 主目录
vi kibana/config/kibana.yml ### elasticsearch.username: "elastic" elasticsearch.password: "elastic" ###

elasticsearch 7.6.2 重置密码;

重置 elastic 账户密码
curl
-u elastic -XPUT http://localhost:9200/_xpack/security/user/elastic/_password?pretty -H Content-Type: application/json -d{ "password" : "elastic" }

如果 重置依然出现问题 ?

切换 es 主目录 执行 elasticsearch-setup-passwords 重置所有密码 

.
/elasticsearch-setup-passwords interactive

技术分享图片

 

elastic 账户认证 401 问题?

原文:https://www.cnblogs.com/sharesdk/p/12938981.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!