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

**URL:** <https://discuss.elastic.co/t/logstash-container-in-docker-starts-and-then-stops-with-no-obvious-error/66132>\
**Category:** Logstash\
**Created:** [November 15, 2016, 4:02pm UTC](https://discuss.elastic.co/t/logstash-container-in-docker-starts-and-then-stops-with-no-obvious-error/66132 "2016-11-15T16:02:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schadenfred](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@Schadenfred](https://discuss.elastic.co/u/Schadenfred)\
**Post date:** [November 15, 2016, 4:02pm UTC](https://discuss.elastic.co/t/logstash-container-in-docker-starts-and-then-stops-with-no-obvious-error/66132/1 "2016-11-15T16:02:40Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 13, 2016, 4:02pm UTC](https://discuss.elastic.co/t/logstash-container-in-docker-starts-and-then-stops-with-no-obvious-error/66132/2 "2016-12-13T16:02:46Z")

</div>

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