kibana-无法从 Elasticsearch 节点检索版本信息。缺少 REST 请求的身份验证凭据

Lul*_*Ka. 12 rest elasticsearch kibana

我正在尝试在 windows10 上安装 kibana 8.1.1,问题是当它开始安装时,它会因类似错误而停止 [2022-04-16T01:16:59.744+00:00][ERROR][elasticsearch-service] Unable to retrieve version information from Elasticsearch nodes. security_exception: [security_exception] Reason: missing authentication credentials for REST request [/_nodes? filter_path=nodes..version%2Cnodes..http.publish_address%2Cnodes.*.ip]

我尝试了很多解决方案,例如我确实更改了 elastisearch.yml 文件 xpack.security.enabled: false

但它仍然不起作用,我在 kibana.yml 上也做了同样的事情,我也添加了以下几行

`xpack.security.enabled: true  
xpack.monitoring.enabled: true  
xpack.monitoring.ui.enabled: true  
xpack.security.encryptionKey: "XXX"`
Run Code Online (Sandbox Code Playgroud)

依然没有。

我在之前也删除了 kibana.yml 上的 # elasticsearch.hosts: ["http://localhost:9200"]

kibana.yml 仍然没有任何内容: server.port: 5601 server.host: "localhost" server.name: "your-hostname" elasticsearch.hosts: ["http://localhost:9200"]

弹性搜索.yml:

`cluster.name: my-application  
network.host: 192.168.0.1  
node.name: node-1  
discovery.seed_hosts: ["host1", "host2"]  
cluster.initial_master_nodes: ["node-1", "node-2"]` 
Run Code Online (Sandbox Code Playgroud)

我对我的英语感到非常抱歉,它不是我的第一语言,也不知道该做什么来完成学习项目,而且我还是一个初学者,谷歌也没有提供帮助,
谢谢你帮助我

Sat*_*nja 22

更详细的步骤如下,

仅当您对两个 yml 文件进行一些更改时才需要执行步骤 1。

  1. 在 elastic 和 Kibana yml 中注释所有内容并保存
  2. 启动弹性搜索
  3. 从目录 elasticsearch-8.0.0\bin 打开另一个命令提示符并运行以下命令。

注意:我们正在为用户“kibana_system”而不是“elastic”重置密码。

.\elasticsearch-reset-password.bat -u kibana_system --auto
Run Code Online (Sandbox Code Playgroud)

此命令将为您提供用户“kibana_system”的密码。复制密码并将其存储在某处。

  1. 通过设置以下值编辑 kibana-8.0.0\bin 目录中的 kibana yml 文件。
elasticsearch.username: "kibana_system"
elasticsearch.password: "the kibana_system password generated above, not the elastic password"
Run Code Online (Sandbox Code Playgroud)

然后保存yml文件。

  1. 启动 kibana,等到你看到一切正常并且没有错误。

  2. 在浏览器中打开http://localhost:5601/app/home#/。输入用户名“elastic” 输入密码“elastic 密码,而不是 kibana 密码”

  • 我还完成了解决该错误所需的一个步骤:取消注释“kibana.yaml”中的“elasticsearch.ssl.verificationMode: *none*”,并将值设置为 **none**。然后只有我可以看到 kibana 仪表板屏幕。(根据文档注意:**无**对于产品来说是不可取的。 (2认同)

小智 1

elasticsearch.username: "kibana_system"
elasticsearch.password: <my-kibana_system-password>
Run Code Online (Sandbox Code Playgroud)