启动时的logstash问题(在kubernetes Pod中)

6mzjoqzu  于 2023-01-15  发布在  Logstash
关注(0)|答案(1)|浏览(321)

我通过kubernetes Pod在容器中启动了一个logstash服务,然后我自愿更改了配置以查看其行为。现在,服务的配置文件不是

output {
 elasticsearch {
   hosts => ["elasticsearch:9200"]
 }

但是

output {
 elasticsearch {
   hosts => ["elasticsearch1:9200"]
 }

然后,当我启动容器时,日志是:

[2023-01-13T14:26:49,474][INFO ][logstash.outputs.elasticsearch][main] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://elasticsearch1:9200/]}}
[2023-01-13T14:26:50,076][WARN ][logstash.outputs.elasticsearch][main] Restored connection to ES instance {:url=>"http://elasticsearch1:9200/"}

因此引用elasticsearch1,然后突然引用elasticsearch

[2023-01-13T14:27:01,405][WARN ][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error {:url=>"http://elasticsearch:9200/", :exception=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :message=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::ResolutionFailure] elasticsearch: Name or service not known"}

为甚么?

c3frrgcw

c3frrgcw1#

除了插件中定义的任何elasticsearch示例之外,logstash还将尝试连接到logstash.yml中xpack.monitoring.elasticsearch.hosts定义的elasticsearch示例,以检查您使用的是什么许可证。

相关问题