logstash 报错 Unable to retrieve license information from license server {:message=>"No Available connections"}
部署的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
- 本文标签: Linux Java
- 本文链接: https://www.sqhelp.cn/article/11
- 版权声明: 本文由沙丘原创发布,转载请遵循《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》许可协议授权