Logstash endless loop with starting and stopping

Logstash 5.x keeps starting and stopping....
Here is my conf:
input {
tcp {
port => 4560
codec => json_lines
}
beats {
port => 5044
codec => "json"
}
}
output {
if [type] == "biz"
{
elasticsearch
{
user => logstash_internal
password => changeme
hosts => "localhost:9200"
index => "business-index-%{+YYYY.MM.dd}"
}
}

else if [logenv]
{
	elasticsearch 
	{ 
		user => logstash_internal
		password => changeme
		hosts => "localhost:9200"
		index => "logstash-%{logenv}-%{+YYYY.MM.dd}"
	}
}

stdout{
codec => rubydebug
}
}

log

[2016-12-23T21:52:52,514][INFO ][logstash.inputs.tcp ] Starting tcp input listener {:address=>"0.0.0.0:4560"}
[2016-12-23T21:52:52,979][INFO ][logstash.inputs.beats ] Beats inputs: Starting input listener {:address=>"0.0.0.0:5044"}
[2016-12-23T21:52:53,030][INFO ][logstash.inputs.tcp ] Starting tcp input listener {:address=>"0.0.0.0:4560"}
[2016-12-23T21:52:53,031][ERROR][logstash.inputs.tcp ] Could not start TCP server: Address in use {:host=>"0.0.0.0", :port=>4560}
[2016-12-23T21:52:53,057][INFO ][org.logstash.beats.Server] Starting server on port: 5044
[2016-12-23T21:52:53,083][ERROR][logstash.agent ] Pipeline aborted due to error {:exception=>#<Errno::EADDRINUSE: Address already in use - bind - Address already in use>, :backtrace=>["org/jruby/ext/socket/RubyTCPServer.java:118:in initialize'", "org/jruby/RubyIO.java:871:innew'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-tcp-4.1.0/lib/logstash/inputs/tcp.rb:279:in new_server_socket'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-tcp-4.1.0/lib/logstash/inputs/tcp.rb:89:inregister'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:353:in start_inputs'", "org/jruby/RubyArray.java:1613:ineach'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:352:in start_inputs'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:228:instart_workers'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:183:in run'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:292:instart_pipeline'"]}
[2016-12-23T21:52:53,145][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2016-12-23T21:52:56,099][WARN ][logstash.agent ] stopping pipeline {:id=>"main"}
[2016-12-23T21:53:41,007][INFO ][logstash.inputs.tcp ] Starting tcp input listener {:address=>"0.0.0.0:4560"}
[2016-12-23T21:53:41,549][INFO ][logstash.inputs.beats ] Beats inputs: Starting input listener {:address=>"0.0.0.0:5044"}
[2016-12-23T21:53:41,590][INFO ][logstash.inputs.tcp ] Starting tcp input listener {:address=>"0.0.0.0:4560"}
[2016-12-23T21:53:41,591][ERROR][logstash.inputs.tcp ] Could not start TCP server: Address in use {:host=>"0.0.0.0", :port=>4560}
[2016-12-23T21:53:41,599][ERROR][logstash.agent ] Pipeline aborted due to error {:exception=>#<Errno::EADDRINUSE: Address already in use - bind - Address already in use>, :backtrace=>["org/jruby/ext/socket/RubyTCPServer.java:118:in initialize'", "org/jruby/RubyIO.java:871:innew'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-tcp-4.1.0/lib/logstash/inputs/tcp.rb:279:in new_server_socket'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-tcp-4.1.0/lib/logstash/inputs/tcp.rb:89:inregister'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:353:in start_inputs'", "org/jruby/RubyArray.java:1613:ineach'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:352:in start_inputs'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:228:instart_workers'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:183:in run'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:292:instart_pipeline'"]}
[2016-12-23T21:53:41,606][INFO ][org.logstash.beats.Server] Starting server on port: 5044
[2016-12-23T21:53:41,649][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2016-12-23T21:53:44,613][WARN ][logstash.agent ] stopping pipeline {:id=>"main"}
[2016-12-23T21:54:31,006][INFO ][logstash.inputs.tcp ] Starting tcp input listener {:address=>"0.0.0.0:4560"}
[2016-12-23T21:54:31,569][INFO ][logstash.inputs.beats ] Beats inputs: Starting input listener {:address=>"0.0.0.0:5044"}
[2016-12-23T21:54:31,612][INFO ][logstash.inputs.tcp ] Starting tcp input listener {:address=>"0.0.0.0:4560"}
[2016-12-23T21:54:31,613][ERROR][logstash.inputs.tcp ] Could not start TCP server: Address in use {:host=>"0.0.0.0", :port=>4560}
[2016-12-23T21:54:31,657][ERROR][logstash.agent ] Pipeline aborted due to error {:exception=>#<Errno::EADDRINUSE: Address already in use - bind - Address already in use>, :backtrace=>["org/jruby/ext/socket/RubyTCPServer.java:118:in initialize'", "org/jruby/RubyIO.java:871:innew'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-tcp-4.1.0/lib/logstash/inputs/tcp.rb:279:in new_server_socket'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-tcp-4.1.0/lib/logstash/inputs/tcp.rb:89:inregister'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:353:in start_inputs'", "org/jruby/RubyArray.java:1613:ineach'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:352:in start_inputs'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:228:instart_workers'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:183:in run'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:292:instart_pipeline'"]}
[2016-12-23T21:54:31,662][INFO ][org.logstash.beats.Server] Starting server on port: 5044
[2016-12-23T21:54:31,711][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2016-12-23T21:54:34,656][WARN ][logstash.agent ] stopping pipeline {:id=>"main"}

God...This is caused by having an logstash.conf.bak under /etc/logstash/conf.d
But I don't know how to close this topic.

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.