LogStash on Docker keeps shutting down after failing to find config

I was running LogStash on Docker using the provided command, and today it crashed. After restarting the Docker, the Logstash silently shuts down after a few minutes, each time.

This is my starting script:

#!/bin/bash
docker run -d --name logstash \
--link elasticsearch:es \
-p 9997:9997 \
-p 9998:9998 \
-p 9999:9999/udp \
-p 9600:9600 \
-v /home/user/elk/:/usr/share/logstash/pipeline/ \
--net elasticsearch_default \
docker.elastic.co/logstash/logstash:7.4.0

And after I run it, my docker logs show the following:

[2019-10-25T05:39:48,023][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"/usr/share/logstash/pipeline/*"}

[2019-10-25T05:39:48,027][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.

[2019-10-25T05:39:49,553][INFO ][logstash.javapipeline    ] Starting pipeline {:pipeline_id=>".monitoring-logstash", "pipeline.workers"=>1, "pipeline.batch.size"=>2, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>2, :thread=>"#<Thread:0x7f84de4 run>"}
[2019-10-25T05:39:49,580][INFO ][logstash.javapipeline    ] Pipeline started {"pipeline.id"=>".monitoring-logstash"}
[2019-10-25T05:39:49,630][INFO ][logstash.agent           ] Pipelines running {:count=>1, :running_pipelines=>[:".monitoring-logstash"], :non_running_pipelines=>[]}
[2019-10-25T05:39:49,808][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}
[2019-10-25T05:39:50,712][INFO ][logstash.javapipeline    ] Pipeline terminated {"pipeline.id"=>".monitoring-logstash"}
[2019-10-25T05:39:51,522][INFO ][logstash.runner          ] Logstash shut down.
root@lightspeed-vlogz:/home/user#

I looked at a lot of different posts, and it looks like /usr/share/logstash/pipeline is the right location for the config file, but it doesn't look like its opened correctly. What is the right fix here?

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