我对这个问题很困惑。
我有一个启用了 x-pack 安全性的 Elasticsearch 服务器。具有 Filebeat 的客户端将输出发送到该服务器。一切正常,无需启用 x-pck 安全性,但在执行此操作时,我会收到此错误消息。
./filebeat test config -v
Exiting: error loading config file: yaml: line 157: did not find expected key
Run Code Online (Sandbox Code Playgroud)
导致错误的行是“用户名”和“密码”。注释时,配置测试正常,但是当用户名和密码取消注释时,出现错误
#-------------------------- 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>"
Run Code Online (Sandbox Code Playgroud)
连接与 XGET 请求正常工作,如下所示:
curl -XGET 'http://X.X.X.X:9200/_all/_search?q=*&pretty' -u elastic:<password_generated_in_server>
Run Code Online (Sandbox Code Playgroud)
我需要激活任何 x-pack 模块、选项或手动创建用户吗?
我启用的模块是system、elasticsearch …
亲爱的 StackOverflow 社区,
在安装 Kibana 插件之前,我运行 Kibana/Elasticsearch 没有任何问题。然后服务失败,我注意到问题是 Elasticsearch 停止了。我尝试了多种方法来修复它,然后甚至重新安装了所有方法。但问题仍然是避免启动 Elasticsearch,即使是全新安装。
使用 apt install 在 Debian 9 上安装。
systemctl start elasticsearch.service
结果:
Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
[0.000s][error][logging] Error opening log file '/gc.log': Permission denied
完整日志journalctl -xe
-- Unit elasticsearch.service has begun starting up.
Feb 07 14:09:06 Debian-911-stretch-64-minimal kibana[576]: {"type":"log","@timestamp":"2020-02-07T13:09:06Z","tags":["warning","elasticsearch","admin"],"pid":576,"message":"Unable to revive connection: http://localhost:9200/"}
Feb 07 14:09:06 Debian-911-stretch-64-minimal kibana[576]: {"type":"log","@timestamp":"2020-02-07T13:09:06Z","tags":["warning","elasticsearch","admin"],"pid":576,"message":"No living connections"}
Feb 07 14:09:06 Debian-911-stretch-64-minimal kibana[576]: {"type":"log","@timestamp":"2020-02-07T13:09:06Z","tags":["warning","elasticsearch","admin"],"pid":576,"message":"Unable to revive connection: http://localhost:9200/"}
Feb 07 …Run Code Online (Sandbox Code Playgroud)