Logstash container in Docker starts and then stops with no obvious error


(Fred) #1

I'm a newbie to Elkstack, and I'm having trouble setting up an Elkstack in Docker. The problem I'm having is that my container runs for about 20 seconds, then exits. I don't see any obvious errors in the log (see below).

I'm at a loss to explain why this is happening.

System: Centos7
Docker command: docker run -d -p 5044:5044 -v ~var/log/logstash:/var/log/logstash -v /etc/logstash/:/etc/logstash/ -v /etc/pki/tls/:/etc/pki/tls/ --name=logstash logstash
My pipeline is copy/pasted from this tutorial. https://www.digitalocean.com/community/tutorials/how-to-use-logstash-and-kibana-to-centralize-logs-on-centos-6

------------------------excerpt from /var/log/logstash/logstash-plain.log------------------------

[2016-11-14T20:48:59,282][DEBUG][logstash.agent ] starting pipeline {:id=>"main"}
[2016-11-14T20:48:59,301][INFO ][logstash.pipeline ] Starting pipeline {"id"=>"main", "pipeline.workers"=>2, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>250}
[2016-11-14T20:48:59,303][DEBUG][logstash.inputs.stdin ] stopping {:plugin=>"LogStash::Inputs::Stdin"}
[2016-11-14T20:48:59,304][DEBUG][logstash.inputs.stdin ] closing {:plugin=>"LogStash::Inputs::Stdin"}
[2016-11-14T20:48:59,305][INFO ][logstash.pipeline ] Pipeline main started
[2016-11-14T20:48:59,306][DEBUG][logstash.pipeline ] Input plugins stopped! Will shutdown filter/output workers.
[2016-11-14T20:48:59,323][DEBUG][logstash.agent ] Starting puma
[2016-11-14T20:48:59,324][DEBUG][logstash.agent ] Trying to start WebServer {:port=>9600}
[2016-11-14T20:48:59,326][DEBUG][logstash.api.service ] [api-service] start
[2016-11-14T20:48:59,355][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2016-11-14T20:48:59,423][DEBUG][logstash.pipeline ] Pushing flush onto pipeline
[2016-11-14T20:48:59,423][DEBUG][logstash.pipeline ] Pushing shutdown {:thread=>"#<Thread:0x4be321fd run>"}
[2016-11-14T20:48:59,425][DEBUG][logstash.pipeline ] Pushing shutdown {:thread=>"#<Thread:0x416c357f run>"}
[2016-11-14T20:48:59,425][DEBUG][logstash.pipeline ] Shutdown waiting for worker thread #Thread:0x4be321fd
[2016-11-14T20:48:59,425][DEBUG][logstash.pipeline ] Shutdown waiting for worker thread #Thread:0x416c357f
[2016-11-14T20:48:59,434][DEBUG][logstash.outputs.stdout ] closing {:plugin=>"LogStash::Outputs::Stdout"}
[2016-11-14T20:48:59,434][DEBUG][logstash.pipeline ] Pipeline main has been shutdown
[2016-11-14T20:49:00,041][DEBUG][logstash.instrument.collector] Collector: Sending snapshot to observers {:created_at=>2016-11-14 20:49:00 +0000}
[2016-11-14T20:49:01,045][DEBUG][logstash.instrument.collector] Collector: Sending snapshot to observers {:created_at=>2016-11-14 20:49:01 +0000}
[2016-11-14T20:49:02,048][DEBUG][logstash.instrument.collector] Collector: Sending snapshot to observers {:created_at=>2016-11-14 20:49:02 +0000}
[2016-11-14T20:49:02,323][DEBUG][logstash.instrument.periodicpoller.os] PeriodicPoller: Stopping
[2016-11-14T20:49:02,323][DEBUG][logstash.instrument.periodicpoller.jvm] PeriodicPoller: Stopping
[2016-11-14T20:49:02,327][WARN ][logstash.agent ] stopping pipeline {:id=>"main"}
[2016-11-14T20:49:02,328][DEBUG][logstash.pipeline ] Closing inputs
[2016-11-14T20:49:02,329][DEBUG][logstash.inputs.stdin ] stopping {:plugin=>"LogStash::Inputs::Stdin"}
[2016-11-14T20:49:02,329][DEBUG][logstash.pipeline ] Closed inputs


(system) #2

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