Logstash binding to a port already in use
Solution 1:
I had a similar problem myself this evening. What I found is that I had concatenated the config files together in the conf.d folder to investigate another issue and forgot about them. When the conf.d/ folder was reevaluated on restart, it tried to bind the port twice causing the EADDRINUSE.
Solution 2:
I experienced an "Address already in use" error the second time I installed Logstash. This error came up when I had somehow started multiple instances of Logstash. Manually stopping the Logstash processes and then starting Logstash again resolved my issue.
Solution 3:
try stop logstash-web service before
in ubuntu sudo service logstash-web stop
Solution 4:
I had too faced the same issue, /etc/init.d/logstash was unable to stop the daemon. I had to kill it manually and restart the services.
root@vikas027:~# ps -aef | grep [l]ogstash
logstash 3752 1 37 02:55 pts/0 00:00:34 /usr/bin/java -Djava.io.tmpdir=/var/lib/logstash -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava. awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Xmx500m -Xss2048k -Djffi.boot.library. path=/opt/logstash/vendor/jruby/lib/jni -Djava.io.tmpdir=/var/lib/logstash -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true - XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Xbootclasspath/a:/opt/logstash/vendor/jruby/lib/jruby.jar -classpath : - Djruby.home=/opt/logstash/vendor/jruby -Djruby.lib=/opt/logstash/vendor/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main --1.9 /opt/logstash/lib/logstash/runner.rb agent -f /etc/logstash/conf.d -l /var/log/logstash/logstash.log
root@vikas027:~# kill -9 3752
root@vikas027:~# /etc/init.d/logstash start