Logstash don't read conf.d settings file when running as daemon

I have alredy read all the previous thread that I found about this problem but they didn't help me so much.

Until now, I have always used the -f option to launch logstash but now I must use it as daemon so I have copied the configuration file into the conf.d folder and started the service.

Nothing, the service is running without error but simply it don't do nothing (elasticsearch don't receive nothing).

So, as suggested in many previous thread, I have try to run it using the --debug option:

/opt/logstash/bin/logstash --debug -f /etc/logstash/conf.d

It works perfectly without any type of error, I can see the data flowing into the DB.
Then I check the configuration file (sysconfig and init.d), the path folder is correct:

LS_CONF_DIR=/etc/logstash/conf.d

I change the permission chmod 777 but nothing change...

I'm out of ideas at the moment...Also because I don't receive back any sort of error...

Suggestion?

Thank you

1 Like

I'm not sure what you mean. Things work when starting Logstash with --debug but not without it?

I have just try again and yes...
When I use the follow command it work:

/opt/logstash/bin/logstash --debug -f /etc/logstash/conf.d

If I try to run logstash as daemon, it starts without any type of error but simply don't do nothing.

Oh, I misread. So the --debug execution is not when running it as a daemon.

Run Logstash as a daemon and inspect its log file. If needed, increase the logging verbosity by passing --verbose or even --debug. You can change that via LS_OPTS (or whatever it's called) in /etc/sysconfig/logstash.

Thank you for your reply.

I have solve my problem, I'm ashamed to tell you what was wrong but I suppose that I must at this point...

Simply logstash was not not allowed to read some configuration file from some directory so, for this reason, when I start as demon it start normally but obviously can't do nothing.
Instead starting it in debug mod (whit root as default user) it work perfectly (it is working as root... seem legit...)

What that really sound strange to me is that from message log and logstash log I did not receive any error or warning of any type.
For this reason I was almost sure that the real problem was some setting about the user or some limit abut the ports.

Thank you again for your reply and sorry for having wasted your time.

Can you tell us what change specifically you did in terms of permission / ownership?

1 Like

Giulio, I am facing the same problem. Could you explain what changes you made?

I did "chmod 644 *.log" in my logs folder.