logstash service does not find config files in /etc/logstash/conf.d

Created on 21 Oct 2015  路  3Comments  路  Source: elastic/logstash

I installed logstash via centos rpm and placed a valid logstash configuration file into /etc/logstash/conf.d. Starting the service it fails with following error message:

{:timestamp=>"2015-10-21T08:11:06.939000+0000", :message=>"Error: No config files found: /etc/logstash/conf.d/pipe.conf\nCan you make sure this path is a logstash config file?", :file=>"logstash/agent.rb", :line=>"159", :method=>"execute"}
{:timestamp=>"2015-10-21T08:11:06.948000+0000", :message=>"You may be interested in the '--configtest' flag which you can\nuse to validate logstash's configuration before you choose\nto restart a running system.", :file=>"logstash/agent.rb", :line=>"161", :method=>"execute"}

there is definitely a file in this location read/write to anyone

[root@logserv logstash]# ls -al /etc/logstash/conf.d/
total 12
drwxr-xr-x. 2 root root 4096 Oct 21 08:00 .
drwx------. 4 root root 4096 Oct 21 07:54 ..
-rwxrwxrwx. 1 root root  234 Oct 21 07:56 pipe.conf

and its content is valid

[root@logserv logstash]# bin/logstash -f /etc/logstash/conf.d/pipe.conf --configtest
Configuration OK

I tried 1.5.3 and 1.5.4 without any success. Is it better to use a 1.4.x version?

Any points would be much appreciated, it looks like a bug to me.

Most helpful comment

I did manage to get this working after changing the ownership permissions of the config directory and files.

chown -R logstash:root /etc/logstash/conf.d
chmod 0750 /etc/logstash/conf.d
chmod 0640 /etc/logstash/conf.d/*

All 3 comments

Same thing happening to me using RancherOS v4.2

I did manage to get this working after changing the ownership permissions of the config directory and files.

chown -R logstash:root /etc/logstash/conf.d
chmod 0750 /etc/logstash/conf.d
chmod 0640 /etc/logstash/conf.d/*

Given I managed to find a solution, I am going to close this problem.

Was this page helpful?
0 / 5 - 0 ratings