gpt4 book ai didi

文件拍子 "error loading config file: yaml: did not find expected key"

转载 作者:行者123 更新时间:2023-12-05 02:07:56 25 4
gpt4 key购买 nike

我正在处理这个问题。

我有一个启用了 x-pack 安全性的 Elasticsearch 服务器。带有 Filebeat 的客户端正在将输出发送到该服务器。在没有启用 x-pck 安全性的情况下一切正常,但是当这样做时,在 lient 中我收到此错误消息。

./filebeat test config -v
Exiting: error loading config file: yaml: line 157: did not find expected key

导致错误的行是“用户名”和“密码”。注释的时候,配置测试是可以的,但是当用户名和密码取消注释时,出现错误

#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch.hosts: ["X.X.X.X:9200"]

# Array of hosts to connect to.
#hosts: ["localhost:9200"]

# Protocol - either `http` (default) or `https`.
#protocol: "http"

# Authentication credentials - either API key or username/password.
#api_key: "id:api_key"
username: "elastic"
password: "<password_generated_in_server>"

连接可以正常处理 XGET 请求,如下所示:

curl -XGET 'http://X.X.X.X:9200/_all/_search?q=*&pretty' -u elastic:<password_generated_in_server>

我是否需要激活任何 x-pack 模块、选项或手动创建用户?

我启用的模块是 system、elasticsearch 和 auditd。我在客户端使用 go build for arm。

谢谢

最佳答案

已解决。

似乎配置文件的语法非常严格......这种方式工作正常:

setup.kibana:
host: "http://X.X.X.X:5601"

output.elasticsearch:
hosts: ["http://X.X.X.X:9200"]
username: "elastic"
password: "<passwd>"

关于文件拍子 "error loading config file: yaml: did not find expected key",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61415359/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com