elasticsearch - X-Pack 401 Logstash 无法连接到 Elasticsearch
问题描述
重新启动 Elasticsearch 后,我更改了 JVM 堆大小并且 Logstash 无法连接到 Elasticsearch
日志存储.yml
xpack.monitoring.enabled: true
xpack.monitoring.elasticsearch.hosts: ["es:9200"]
xpack.monitoring.elasticsearch.username: logstash_system
xpack.monitoring.elasticsearch.password: pass
Logstash 的日志
[WARN][logstash.outputs.elasticsearch][main] 尝试恢复与死掉的 ES 实例的连接,但出现错误。{:url=>" http://es:9200/ ", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError, :error=>"得到响应代码 '401' 联系 Elasticsearch在 URL ' http://es:9200/ '"}
使用相同的凭据从 logstash 卷曲到 es
logstash: curl -ulogstash_system es:9200
Enter host password for user 'logstash_system':
{
"name" : "elasticsearch",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "",
"version" : {
"number" : "7.5.0",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "",
"build_date" : "2019-11-26T01:06:52.518245Z",
"build_snapshot" : false,
"lucene_version" : "8.3.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
解决方案
推荐阅读
- javascript - Angular:如何在调用 ngOnDestroy 之前检查 queryParams 的变化
- javascript - JavaScript 保存 div 元素的值
- python - 如何在 arangodb 上存储聚合
- sql-server - 基于列值的透视,在多列中输出
- r - 闪亮:应用发布时看起来不同
- r - 在函数中按组将文本添加到 ggplot 条形图
- swift - Xcode Playgrounds:源文件无法互相访问
- git - Git:仅显示功能分支中引入的差异
- selenium-webdriver - 使用 Appium 进行测试时,Webview 上下文不再显示
- php - 一类得到“PHP 致命错误:未捕获的错误:类...”,但其他类没有