错误
尝试恢复与死ES实例的连接,
{:URL => #http://本地主机:9200 />中 :ERROR_TYPE => LogStash ::输出:: ElasticSearch :: HttpClient的::普尔:: HostUnreachableError, :error =>" 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
答案 0 :(得分:0)
拒绝连接可能表示防火墙阻止了该端口或服务,请确保您的防火墙设置允许您尝试访问的服务。在Linux中有防火墙的GUI界面要启动此应用程序,请从面板中选择系统→管理→防火墙,或在shell提示符下键入system-config-firewall。如果您在Windows中只需在左下角的搜索框中键入防火墙,然后单击防火墙高级设置。尝试启用端口9200,如果elasitcshearch是运行的服务,也可以通过防火墙启用它。
*在Linux中,您可以尝试取消阻止端口9200:
firewall-cmd --permanent --add-port = 9200 / tcp
firewall-cmd --permanent --add-port = 9300 / tcp
*启动服务:
sudo systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service
sudo systemctl daemon-reload
*然后在防火墙中启用该服务:
sudo firewall-cmd --permanent --elasticsearch.service
firewall-cmd --reload