# Error loading config file when running Heartbeat without --path.config flag

**URL:** <https://discuss.elastic.co/t/error-loading-config-file-when-running-heartbeat-without-path-config-flag/106874>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [November 8, 2017, 1:49pm UTC](https://discuss.elastic.co/t/error-loading-config-file-when-running-heartbeat-without-path-config-flag/106874 "2017-11-08T13:49:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon\_D](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jon_d/32/25657_2.png) [@Jon\_D](https://discuss.elastic.co/u/Jon_D)\
**Post date:** [November 8, 2017, 1:49pm UTC](https://discuss.elastic.co/t/error-loading-config-file-when-running-heartbeat-without-path-config-flag/106874/1 "2017-11-08T13:49:44Z")

</div>

I installed Heartbeat using RPM.

Now, when I try to run it without any options it gives the following error:

```
[elastic@local-central bin]$ ./heartbeat
heartbeat2017/11/08 13:27:44.630019 beat.go:346: CRIT Exiting: error loading config file: stat heartbeat.yml: no 
such file or directory
Exiting: error loading config file: stat heartbeat.yml: no such file or directory

```

The yml file is in /etc/heartbeat (default path for RPM installations):

```
[elastic@local-central bin]$ ll /etc/heartbeat/
total 60
-rw-r--r--. 1 root root 29709 Oct 6 22:31 heartbeat.full.yml
-rw-r--r--. 1 root root 4996 Oct 6 22:31 heartbeat.template-es2x.json
-rw-r--r--. 1 root root 4164 Oct 6 22:31 heartbeat.template-es6x.json
-rw-r--r--. 1 root root 4164 Oct 6 22:31 heartbeat.template.json
-rw-------. 1 root root 3065 Nov 8 13:38 heartbeat.yml

```

As far as I can see the ownership and permissions are ok too. Anyhow, I tried using _--strict.perms=false_ but that didn't help. I also added the -e and -d "\*" flags but that doesn't give me more information.

The only way to get it to run is by explicitly setting the --path.config option **and** using sudo :

```
[elastic@local-central bin]$ sudo ./heartbeat --path.config /etc/heartbeat/

```

So I'm a bit confused now: am I supposed to leave my heartbeat.yml file in /etc/logstash (which is the default config directory for RPM installations according to the documentation) or will he go looking for it in the home directory (/usr/share/heartbeat/)?

Thanks in advance for clarifying this 🙂

---

<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:** [December 6, 2017, 1:49pm UTC](https://discuss.elastic.co/t/error-loading-config-file-when-running-heartbeat-without-path-config-flag/106874/2 "2017-12-06T13:49:50Z")

</div>

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