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:in
new'", "/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:in
register'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:353:in start_inputs'", "org/jruby/RubyArray.java:1613:in
each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:352:in start_inputs'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:228:in
start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:183:in run'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:292:in
start_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:in
new'", "/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:in
register'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:353:in start_inputs'", "org/jruby/RubyArray.java:1613:in
each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:352:in start_inputs'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:228:in
start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:183:in run'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:292:in
start_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:in
new'", "/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:in
register'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:353:in start_inputs'", "org/jruby/RubyArray.java:1613:in
each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:352:in start_inputs'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:228:in
start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:183:in run'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:292:in
start_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"}