试图复活连接到死ES例如,
{:URL => #http://本地主机:9200 />, :ERROR_TYPE => LogStash ::输出:: ElasticSearch :: HttpClient的::普尔:: HostUnreachableError, :误差=> “Elasticsearch无法访问: [http://localhost:9200/][Manticore::SocketException]连接 拒绝(拒绝连接)”}
这是我的文件。
Logstash.conf:
input
{
tcp
{
port => 5000
}
}
output {
elasticsearch
{
hosts => "elasticsearch:9200"
}
}
elasticsearch.yml:
cluster.name: "docker-cluster"
network.host: 0.0.0.0
discovery.zen.minimum_master_nodes: 1
discovery.type: single-node
xpack.security.enabled: false
xpack.monitoring.enabled: false
xpack.ml.enabled: false
xpack.graph.enabled: false
xpack.watcher.enabled: false
logstash.yml
http.host: "0.0.0.0"
path.config: /usr/share/logstash/pipeline
xpack.monitoring.enabled: false
Kibana.yml:
server.name: kibana
server.host: "0"
elasticsearch.url:http://elasticsearch:9200
xpack.security.enabled: false
xpack.monitoring.enabled: false
xpack.ml.enabled: false
xpack.graph.enabled: false
xpack.reporting.enabled: false
我已经添加了3个端口5601,9200/tcp&9300/tcp,但它引发了同样的错误。是否需要做任何其他更改... – Farn
是的,需要在filrewall中启用弹性搜索服务,首先启动该服务:sudo/bin/systemctl daemon-reload; sudo/bin/systemctl enable elasticsearch.service; sudo/bin/systemctl start elasticsearch.service;然后在防火墙启用服务,sudo firewall-cmd --permanent --elasticsearch.service – AbelSurace
@Farn看到我编辑的解决方案,我添加了更多步骤可能会对你有所帮助 – AbelSurace