原创

logstash 报错 Unable to retrieve license information from license server {:message=>"No Available connections"}

温馨提示:
本文最后更新于 2024年12月17日,已超过 36 天没有更新。若文章内的图片失效(无法正常加载),请留言反馈或直接联系我

部署的logstash报错

[2024-11-30T03:39:19,749][INFO ][logstash.licensechecker.licensereader] Failed to perform request {:message=>"elasticsearch: Name or service not known", :exception=>Manticore::ResolutionFailure, :cause=>java.net.UnknownHostException: elasticsearch: Name or service not known}
[2024-11-30T03:39:19,751][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"}
[2024-11-30T03:39:49,358][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=>"No Available connections"}

开始只配置了   logstash.conf

input {
tcp {
mode => "server"
host => "0.0.0.0"
port => 4560
codec => json_lines
}
}
output {
elasticsearch {
hosts => ["xxx.xxxx.xxxx.xxxx:9200"]
index => "application-%{+YYYY.MM.dd}"
ssl_certificate_verification => false
}
}

还是报错 。连不上 。。

参考这篇文章  https://www.cnblogs.com/likecoke/p/18107776

重新配置了logstash.conf  添加了  logstash.yml  就可以连上了


原文内容如下  : 原文文章  https://www.cnblogs.com/likecoke/p/18107776

8.2编辑logstash.conf配置文件

vim /home/data/logstash/config/logstash.conf

input {  
  tcp {  
    mode => "server"  
    host => "0.0.0.0"  
    port => 5044  
    codec => json_lines  
  }  
}  
  
output {  
  elasticsearch {  
    hosts => ["http://172.16.112.3:9200"]  
    index => "%{[spring.application.name]}-%{+YYYY.MM.dd}"  
    ssl_certificate_verification => false
  }  
}

8.3编辑logstash.yml配置文件

vim /home/data/logstash/config/logstash.yml

http.host: "0.0.0.0"
xpack.monitoring.elasticsearch.hosts: ["http://172.16.112.3:9200"]
xpack.monitoring.elasticsearch.ssl.verification_mode: none

正文到此结束
本文目录