# Logstash not fetching conf file during startup

**URL:** <https://discuss.elastic.co/t/logstash-not-fetching-conf-file-during-startup/147051>\
**Category:** Logstash\
**Created:** [September 3, 2018, 10:34am UTC](https://discuss.elastic.co/t/logstash-not-fetching-conf-file-during-startup/147051 "2018-09-03T10:34:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anokpe](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@anokpe](https://discuss.elastic.co/u/anokpe)\
**Post date:** [September 3, 2018, 10:34am UTC](https://discuss.elastic.co/t/logstash-not-fetching-conf-file-during-startup/147051/1 "2018-09-03T10:34:40Z")

</div>

OS : ubuntu 16.04  
Logstash version : 6.4

I have recently installed logstash with apt package repository.

Every thing is as default, I have added /etc/logstash/conf.d/filebeat.conf where it should listen to port 5044 for incoming beat.

If logstash is started normally, it does not listen to port 5044. netstat -tulnp does not show the listening port. And I am confused to which port logstash is listening by default. log does not show any error as well.

But if i specify the conf file location, the intended port is listening and every thing works fine.

# bin/logstash -f /etc/logstash/conf.d/filebeat.conf

Do i have to specify anything in logstash.yml or pipelines.yml or anywhere else? so that I do not have to specify the conf file.

---

<div class="post-metadata">

**Author:** ![rijinmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rijinmp/32/24634_2.png) [@rijinmp](https://discuss.elastic.co/u/rijinmp)\
**Post date:** [September 3, 2018, 11:35am UTC](https://discuss.elastic.co/t/logstash-not-fetching-conf-file-during-startup/147051/2 "2018-09-03T11:35:54Z")

</div>

What is your path.config: in logstash.yml ?

---

<div class="post-metadata">

**Author:** ![rijinmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rijinmp/32/24634_2.png) [@rijinmp](https://discuss.elastic.co/u/rijinmp)\
**Post date:** [September 3, 2018, 11:37am UTC](https://discuss.elastic.co/t/logstash-not-fetching-conf-file-during-startup/147051/3 "2018-09-03T11:37:28Z")

</div>

in logstash.yml

add

path.config: /etc/logstash/conf.d/filebeat.conf

Then run ./bin/logstash

---

<div class="post-metadata">

**Author:** ![anokpe](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@anokpe](https://discuss.elastic.co/u/anokpe)\
**Post date:** [September 3, 2018, 2:30pm UTC](https://discuss.elastic.co/t/logstash-not-fetching-conf-file-during-startup/147051/4 "2018-09-03T14:30:43Z")

</div>

I did as you said but the result gives me following error, some how it is unable to fetch logstash.yml and log4j2 files under /etc/logstash. I never had such issue with version 6.3. Do you think logstash 6.4 has some issue or different way of configuring?

Error/Warning

WARNING: Could not find logstash.yml which is typically located in $LS\_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults  
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console  
ERROR: Failed to read pipelines yaml file. Location: /usr/share/logstash/config/pipelines.yml  
usage:  
bin/logstash -f CONFIG\_PATH [-t] [-r] [] [-w COUNT] [-l LOG]  
bin/logstash --modules MODULE\_NAME [-M "MODULE\_NAME.var.PLUGIN\_TYPE.PLUGIN\_NAME.VARIABLE\_NAME=VALUE"] [-t] [-w COUNT] [-l LOG]  
bin/logstash -e CONFIG\_STR [-t] [--log.level fatal|error|warn|info|debug|trace] [-w COUNT] [-l LOG]  
bin/logstash -i SHELL [--log.level fatal|error|warn|info|debug|trace]  
bin/logstash -V [--log.level fatal|error|warn|info|debug|trace]  
bin/logstash --help  
[ERROR] 2018-09-03 20:09:59.018 [LogStash::Runner] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

---

<div class="post-metadata">

**Author:** ![anokpe](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@anokpe](https://discuss.elastic.co/u/anokpe)\
**Post date:** [September 4, 2018, 6:12am UTC](https://discuss.elastic.co/t/logstash-not-fetching-conf-file-during-startup/147051/5 "2018-09-04T06:12:36Z")

</div>

Finally, I have updated the file /etc/systemd/system/logstash.service to include

EnvironmentFile=-/etc/logstash

Restarted the services and everything is ready to go.

---

<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:** [October 2, 2018, 6:12am UTC](https://discuss.elastic.co/t/logstash-not-fetching-conf-file-during-startup/147051/6 "2018-10-02T06:12:48Z")

</div>

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