乔克视界 乔克视界
首页
  • 运维
  • 开发
  • 监控
  • 安全
  • 随笔
  • Docker
  • Golang
  • Python
  • AIOps
  • DevOps
  • Kubernetes
  • Prometheus
  • ELK
  • 心情杂货
  • 读书笔记
  • 面试
  • 实用技巧
  • 博客搭建
友链
关于
收藏
  • 分类
  • 标签
  • 归档

乔克

云原生爱好者
首页
  • 运维
  • 开发
  • 监控
  • 安全
  • 随笔
  • Docker
  • Golang
  • Python
  • AIOps
  • DevOps
  • Kubernetes
  • Prometheus
  • ELK
  • 心情杂货
  • 读书笔记
  • 面试
  • 实用技巧
  • 博客搭建
友链
关于
收藏
  • 分类
  • 标签
  • 归档
  • Docker

  • Golang

  • AIOps

  • Python

  • DevOps

  • Kubernetes

  • Prometheus

  • ELK

    • 日志收集方案
    • 日志系统搭建
    • 完整搭建
    • 部署 ECK(Elastic Cloud on Kubernetes)
    • 部署 log-pilot
    • elastic stack 搭建
    • 使用 helm 安装 es 和 kibana
    • elastic 账户认证 401 问题
      • (1)本地 验证 elastic 账户
      • (2)检查 es 配置
      • (3)检查 kibana 配置
      • (4)elasticsearch 7.6.2 重置密码
      • (5)如果 重置依然出现问题
  • 专栏
  • ELK
乔克
2025-07-20
目录

elastic 账户认证 401 问题

elastic 访问 9200 认证无法登陆,日志 出现 401 问题?同样的 访问 kibana http://ip:5601 出现:Kibana server is not ready yet 访问异常 ?

日志信息如下:

[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]
1
2

# (1)本地 验证 elastic 账户

curl -u elastic 'http://localhost:9200/\_xpack/security/\_authenticate?pretty'
1

831f6729173e2319a9c55d21758165be MD5

# (2)检查 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
1
2
3
4
5
6
7

# (3)检查 kibana 配置

切换 kibana 主目录

vi kibana/config/kibana.yml

elasticsearch.username: "elastic"
elasticsearch.password: "elastic"
1
2

# (4)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"
}
'
1
2
3
4
5

# (5)如果 重置依然出现问题

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

./elasticsearch-setup-passwords interactive

eb96fbaa09743f4473db7042ef2448c8 MD5

上次更新: 2025/07/20, 11:26:22
使用 helm 安装 es 和 kibana

← 使用 helm 安装 es 和 kibana

最近更新
01
使用 helm 安装 es 和 kibana
07-20
02
elastic stack 搭建
07-20
03
部署 log-pilot
07-20
更多文章>
Theme by Vdoing | Copyright © 2019-2025 乔克 | MIT License | 渝ICP备20002153号 |
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式