elasticsearch - 将 Elasticsearch 的 http_port 号改为 80
问题描述
我正在尝试在 Ubuntu 18.04 上设置 ELK,我现在只有端口 80 来测试 Elasticsearch 仪表板,所以我修改了 elasticsearch.yml,如下所示
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: x.x.x.x
#
# Set a custom port for HTTP:
#
http.port: 80
#
# For more information, consult the network module documentation.
#
但是在logstash日志中它说
[2019-05-10T08:46:01,216][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://x.x.x.x:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://x.x.x.x:9200/][Manticore::SocketException] Connection refused (Connection refused)"}
我认为它试图在 9200 上找到 elasticsearch ..
对此的任何帮助将不胜感激
解决方案
You need to edit the output port of logstash, you can look it up here.
input { stdin { } }
filter {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}" }
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
}
output {
elasticsearch { hosts => ["localhost:9200"] } <-- change this
stdout { codec => rubydebug }
}
推荐阅读
- macos - 如何使用 brew 从 Mac osx 卸载 twilio-cli
- java - 如何在java中以升序显示这个练习的数字?
- c++ - 尝试树实现
- reactjs - 如何传递我可以访问 API 的身份验证令牌?(反应问题)
- jquery - 在 Liferay 7.2 中更新 jquery 版本
- swift - 如何从 SwiftUI 推送到现有的 UINavigationController 堆栈?
- python - 将值 n 拉到 df 中的最后一个值之前
- windows - 批处理 - 获取两个字符串之间的内容
- vb.net - Visual Studio ;新 System.Data.OleDb.OleDbConnection(strConString); 代码失败 - 我错过了什么?
- java - IntelliJ 2020.3 中未命中断点