Today i've tried to make filebeat (that is on one of my servers) send logs to another server, that have logstash, elasticsearch and kibana.
I've got some problems and one in particular that i can't find a solution, here the logs of it :
ERROR logstash/async.go:235 Failed to publish events caused by: write tcp 192.168.250.88:50022->192.168.250.224:5044: write: connection reset by peer
I've seen some posts with the same problem, and some say that updating a plugin will solve this, but i never installed any plugin, or is there included plugins when installing logstash ?
So yet i can't resolve this, look forward for your help
Each input/filter/output is a plugin to Logstash. Many are bundled with Logstash (e.g. logstash-input-beats). They updatable independent of the main Logstash install. See Updating the Beats Input Plugin for Logstash.
Have you testing the connection via filebeat test output?
Or tested it via telnet?
If neither of those tests are able to connected then log onto the Logstash server and verify that it is listening with a command like sudo netstat -anp | grep 5033.
The Filebeat test output is ok, but telnet do not look ok, can't connect, tried why telnet myip and telnet myip 5044 , the first don't work and with 5044, when i type something it close the connection (i use iptables on my ELK server, and i authorize ports 22, 9200, 5601 and 5044, is there an other one to authorize for filebeat ?
When doing sudo netstat -anp | grep 5033 no output.
Also, in my filebeat log, sometime there is : ERROR logstash/async.go:235 Failed to publish events caused by: write tcp IPclient:41148->IPserver:5044: write: connection reset by peer ERROR pipeline/output.go:92 Failed to publish events: write tcp IPclient:41148->IPserver:5044: write: connection reset by peer
(Sorry for the late answer, was working on something else)
But if filebeat test output is passing and telnet <ip> 5044 connects (it's normal to have it disconnect you after you type something because it rejects that input and resets the connection) then it seems like connection is being established OK.
So the next step is to inspect the Logstash logs (start LS with -debug) and see if there are any errors while Filebeat is sending data. It would be useful if you shared the LS configuration that you are using too.
Another test you can do is to disable all outputs in your Logstash config and add only a single stdout output. This way the outputs cannot block the pipeline.
Now i can't find anything like bin/logstash, there is a dir /opt/logstash/bin, but nothing in there, the only one that seem like that is in /usr/share, does it matter ? Or i need to install something ?
For the configuration : (in /etc/logstash/conf.d/logstash.conf)
Your config deviates from what we recommend. Specifically the index name differs. We include the version there an the default index template only apply to indexes containing a version.
Actually i don't see any error when sending directly to elasticsearch, just when sending to logstash, just many Non-zero metrics in the last 30s.
Anyway, i can't figure out why my ELK server, on Kibana, don't receive logs (he receive, but in discover i can see like 1 count per day), maybe my tested servers are just not active enought ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.