Config filter not found when using Logstash docker image

When I run Logstash directly on my PC (Windows) it runs fine. Everything works.

Then when I try to use logstash official image ( it gives me this error:

[2020-03-09T15:14:46,291][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"/usr/share/logstash/test/*"}
[2020-03-09T15:14:46,295][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.

My docker compose:

container_name: logstash
command: logstash
- ELASTIC_SEARCH_HOST=localhost:9200
- ENV_NAME=test
- PATH_CONFIG=/usr/share/logstash/test
- elastic-search
- localstack
#- ./logstash-pipelines.yml:/usr/share/logstash/config/pipelines.yml
- ./logstash-filter.conf:/usr/share/logstash/test/logstash-filter.conf

There is no error regarding my logstash-filter.conf volume. The file is present in the source directory.
I've tried to put the log level to "debug" but still no clue. Also, I've tried adding "-f <path_to_config>", change the PATH_CONFIG to several other stuff (like specifying the actual file instead of a path, etc) and the same error happens.
Even when I run the image using the default config file it starts fine.
This should be a very stupid mistake which I cannot find for several hours. I really appreciate the help.

If you attach to the container can you see the file where you expect it to be? That would confirm that the bind mounted volume is actually working as expected.

Hi Rob,
I did what you suggested and I found out the file was created as a folder inside the container!

I've changed the volume to copy the whole folder content to destination, not only the config file path, and it worked!
Like this:


Thank you very much.

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