Logstash is creating problems, I am using it with filebeat to send logs to elastic. When I start it, it says every thing is ok,
luvpreet@DHARI-Inspiron-3542:/usr/share/logstash$ sudo bin/logstash --path.settings /etc/logstash/ -f /etc/logstash/conf.d/02-beats--input.conf
Sending Logstash's logs to /var/log/logstash which is now configured via log4j2.properties
Configuration OK
And this is the filebeat.yml file ,
filebeat.prospectors:
- input_type: log
paths:
- /var/log/nginx/kibana_access.log
document_type: nginx
output.logstash:
hosts: ["127.0.0.1:5044"]
And this is the logstash conf file,
input {
beats {
port => 5044
}
}
output {
elasticsearch {
hosts => ["127.0.0.1:9200"]
manage_template => false
index => "%{type}-index"
document_type => "[type]"
}
}
But then in the logs of filebeat, I see this,
2017-04-24T12:46:21+05:30 ERR Connecting error publishing events (retrying): dial tcp 127.0.0.1:5044: getsockopt: connection refused
When I see sudo netstat -ntlp
, the port 5044 is not open.
Why the port is not opened ?