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

**URL:** <https://discuss.elastic.co/t/logstash-dont-read-conf-d-settings-file-when-running-as-daemon/50423>\
**Category:** Logstash\
**Created:** [May 19, 2016, 10:38am UTC](https://discuss.elastic.co/t/logstash-dont-read-conf-d-settings-file-when-running-as-daemon/50423 "2016-05-19T10:38:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giulio](https://avatars.discourse-cdn.com/v4/letter/g/45deac/32.png) [@Giulio](https://discuss.elastic.co/u/Giulio)\
**Post date:** [May 19, 2016, 10:38am UTC](https://discuss.elastic.co/t/logstash-dont-read-conf-d-settings-file-when-running-as-daemon/50423/1 "2016-05-19T10:38:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 19, 2016, 10:43am UTC](https://discuss.elastic.co/t/logstash-dont-read-conf-d-settings-file-when-running-as-daemon/50423/2 "2016-05-19T10:43:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Giulio](https://avatars.discourse-cdn.com/v4/letter/g/45deac/32.png) [@Giulio](https://discuss.elastic.co/u/Giulio)\
**Post date:** [May 19, 2016, 10:49am UTC](https://discuss.elastic.co/t/logstash-dont-read-conf-d-settings-file-when-running-as-daemon/50423/3 "2016-05-19T10:49:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 19, 2016, 1:06pm UTC](https://discuss.elastic.co/t/logstash-dont-read-conf-d-settings-file-when-running-as-daemon/50423/4 "2016-05-19T13:06:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Giulio](https://avatars.discourse-cdn.com/v4/letter/g/45deac/32.png) [@Giulio](https://discuss.elastic.co/u/Giulio)\
**Post date:** [May 20, 2016, 10:39am UTC](https://discuss.elastic.co/t/logstash-dont-read-conf-d-settings-file-when-running-as-daemon/50423/5 "2016-05-20T10:39:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mke](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@mke](https://discuss.elastic.co/u/mke)\
**Post date:** [June 4, 2016, 11:57am UTC](https://discuss.elastic.co/t/logstash-dont-read-conf-d-settings-file-when-running-as-daemon/50423/6 "2016-06-04T11:57:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Edely\_Gomes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/edely_gomes/32/9872_2.png) [@Edely\_Gomes](https://discuss.elastic.co/u/Edely_Gomes)\
**Post date:** [June 14, 2016, 12:13pm UTC](https://discuss.elastic.co/t/logstash-dont-read-conf-d-settings-file-when-running-as-daemon/50423/7 "2016-06-14T12:13:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jonathanpmartins](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@jonathanpmartins](https://discuss.elastic.co/u/jonathanpmartins)\
**Post date:** [February 20, 2017, 11:22am UTC](https://discuss.elastic.co/t/logstash-dont-read-conf-d-settings-file-when-running-as-daemon/50423/8 "2017-02-20T11:22:29Z")

</div>

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

---

<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:** [July 6, 2017, 4:28am UTC](https://discuss.elastic.co/t/logstash-dont-read-conf-d-settings-file-when-running-as-daemon/50423/9 "2017-07-06T04:28:27Z")

</div>


