# Unable to start HeartBeat

**URL:** <https://discuss.elastic.co/t/unable-to-start-heartbeat/181129>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [May 15, 2019, 8:57am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129 "2019-05-15T08:57:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [May 15, 2019, 8:57am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/1 "2019-05-15T08:57:41Z")

</div>

Hi I am new on this and starting to configure this feature. Unfortunately I am facing some difficulties getting the module to work.

When executing : systemctl start heartbeat  
Results: Failed to start heartbeat.service: Unit heartbeat.service not found.

When executing : service heartbeat start  
Result: Failed to start LBS: High-availability services

Please guide, thanks

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 15, 2019, 10:14am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/2 "2019-05-15T10:14:25Z")

</div>

How did you install it?

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [May 16, 2019, 3:08am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/3 "2019-05-16T03:08:04Z")

</div>

Hi I used apt-get install heartbeat-elastic to install it, and followed by update-rc.d heartbeat-elastic defaults 95 10.

When I try to start the systemctl start heartbeat.service it shows me the following error:  
Failed to start LSB: High-availability services.....

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 16, 2019, 4:27am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/4 "2019-05-16T04:27:24Z")

</div>

Ok. I don't know but I'm moving the question to #beats:heartbeat

---

<div class="post-metadata">

**Author:** ![martinr\_ubi](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@martinr\_ubi](https://discuss.elastic.co/u/martinr_ubi)\
**Post date:** [May 16, 2019, 7:48am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/5 "2019-05-16T07:48:00Z")

</div>

Hi,

Welcome to the club of people who stare at the screen for 3 seconds every time they toy with heartbeat package/service and initially get a problem until they remember... 🙂

Funny story actually:

> <https://github.com/elastic/beats/issues/3765>

I don't use deb packages, but use "heartbeat-elastic" for the service name. That's the right name everywhere, except where it isn't like the binary itself.

This is a useful read to hopefully burn it into your brain enough so that it only takes 3 seconds of starring when you hit this again in six months. I promise, it's a only a very small annoyance once in a while in exchange for a very cool name 🙂

> <https://github.com/elastic/beats/pull/4601>

I believe this page is simply wrong, I guess even the people at Elastic get confused sometimes? Or they use variables to build part of the doc:  
[https://www.elastic.co/guide/en/beats/heartbeat/7.0/running-with-systemd.html](https://www.elastic.co/guide/en/beats/heartbeat/7.0/running-with-systemd.html)

Do you want to open an issue for what I think is bad doc above and reference this thread? Let me know if you can.

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [May 22, 2019, 2:55am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/6 "2019-05-22T02:55:38Z")

</div>

Hi may I know what is "LSB: High-availability services"? Currently I have this error on my log.

Secondly, may I know how can I connect the data to ES?

---

<div class="post-metadata">

**Author:** ![martinr\_ubi](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@martinr\_ubi](https://discuss.elastic.co/u/martinr_ubi)\
**Post date:** [May 22, 2019, 3:32am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/7 "2019-05-22T03:32:24Z")

</div>

> [@skyluke.1987](#):
>
> Hi may I know what is "LSB: High-availability services"? Currently I have this error on my log.

[http://linux-ha.org/wiki/Heartbeat](http://linux-ha.org/wiki/Heartbeat)  
Another completely unrelated software called heartbeat which you are attempting to start by error. The heartbeat software by Elastic has a service name of « heartbeat-elastic » and not « heartbeat ».

Your second question I don’t understand. You have to configure an output in the output section of the config file to ship events to Elasticsearch, that is documented here:

> **[Configure the Elasticsearch output | Heartbeat Reference \[8.11\] | Elastic](https://www.elastic.co/guide/en/beats/heartbeat/current/elasticsearch-output.html)**

Can you be more specific?

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [May 22, 2019, 8:11am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/8 "2019-05-22T08:11:35Z")

</div>

Hi, I think the one I installed using apt is correct, its Heartbeat-elastic. In the directory, there are fields.yml, heartbeat.reference.yml, monitor .yml and monitos.d.

How am I able to verify this is truly correct?

Secondly, why is there "heartbeat.reference.yml and heartbeat.yml.? What are the differences?

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [May 22, 2019, 8:43am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/9 "2019-05-22T08:43:02Z")

</div>

Dear all, I also found that there is this problem, which user should I grant to and what access do I need to grant?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/6/c6327e669defd75cd9eeacd752b3ffd6d8e4a91c.png)

---

<div class="post-metadata">

**Author:** ![martinr\_ubi](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@martinr\_ubi](https://discuss.elastic.co/u/martinr_ubi)\
**Post date:** [May 22, 2019, 10:00am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/10 "2019-05-22T10:00:19Z")

</div>

Dude, you're still interacting with "heartbeat" instead of "heartbeat-elastic".  
Stop doing

```auto
service heartbeat start

```

or

```auto
systemctl start heartbeat

```

Whatever you do, do it with "heartbeat-elastic".

The error you posted is from the heartbeat software and not the heartbeat-elastic software.  
You installed it correctly, "heartbeat-elastic" and you go to the right directory to see the config files but you keep interacting with the wrong service/daemon/systemd unit file.

---

<div class="post-metadata">

**Author:** ![martinr\_ubi](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@martinr\_ubi](https://discuss.elastic.co/u/martinr_ubi)\
**Post date:** [May 22, 2019, 2:11pm UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/11 "2019-05-22T14:11:18Z")

</div>

Sorry for calling you “dude”, not cool of me 😅

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [May 23, 2019, 1:27am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/12 "2019-05-23T01:27:13Z")

</div>

Hi Martin, I realized there are 2 directories, one is /usr/share/heartbeat & the other one is /etc/heartbeat. May I know which is the correct one? Thanks

So this heartbeat and heartbeat-elastic has nothing to do with each other?

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [May 23, 2019, 2:05am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/13 "2019-05-23T02:05:47Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/3/3/33ea8ff93a48be0b302e5ede3bb858a5ec765839.png)

Hi Martin, is this looks more correct?

---

<div class="post-metadata">

**Author:** ![martinr\_ubi](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@martinr\_ubi](https://discuss.elastic.co/u/martinr_ubi)\
**Post date:** [May 23, 2019, 2:21am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/14 "2019-05-23T02:21:18Z")

</div>

> [@skyluke.1987](#):
>
> /usr/share/heartbeat & the other one is /etc/heartbeat

Both are correct. Software files are installed in multiple directories according to what type of files they are. Binaries and config files are installed in different directories and all that is fine. Thats normal.

Indeed the linux-ha heartbeat software has nothing to do with Elastic hearbeat-elastic software. Same as if 2 companies had made a game and both called it “Solitaire”. It could be confusing once both are installed in your system and your start looking at everything named “solitaire” in your machine. The situation is similar.

I still think your system is in a good state if all you did so far is install heartbeat-elastic from the DEB package. Just remember that the package name AND the Service name is heartbeat-elastic. So edit the config file /etc/heartbeat/heartbeat.yml and interact with the service/daemon via the name heartbeat-elastic when you use the “service” command or the “systemctl” command, whichever you use on your system normally.

---

<div class="post-metadata">

**Author:** ![martinr\_ubi](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@martinr\_ubi](https://discuss.elastic.co/u/martinr_ubi)\
**Post date:** [May 23, 2019, 2:28am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/15 "2019-05-23T02:28:30Z")

</div>

Yes your interacting with the right daemon now.  
If you want to know why it’s failing, you need to check the logs.  
I can’t tell you where they are because I don’t know which version of heartbeat-elastic you installed.  
The logs will be either in /var/log/heartbeat/heartbeat  
or they will be in in journald and you should be able to check them with the following command:  
journalctl -u heartbeat-elastic.service

Do share which version you installed.

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [May 23, 2019, 7:33am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/16 "2019-05-23T07:33:22Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/f/7/f7a38c3d507c39948be09c43299d27046fe83044.png)

Martin, do you know what is this error referring to? Is it because logstash cannot connect through the correct port 5044?

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [May 23, 2019, 8:28am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/17 "2019-05-23T08:28:27Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/7/1/71ee63302683b0e65d530743603960ca26aafbae.png)

The version that I am having it now is 7.0.1.

---

<div class="post-metadata">

**Author:** ![martinr\_ubi](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@martinr\_ubi](https://discuss.elastic.co/u/martinr_ubi)\
**Post date:** [May 23, 2019, 8:38am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/18 "2019-05-23T08:38:02Z")

</div>

There is actually no information about the cause of the failure to start in those systemd events.  
As I said above you need to look in the logs to investigate the cause of the failure to start which is most probably a problem with the config you have in the config file. That's because "just" failing to ship the events out to the configured output, either logstash or ES does not prevent the service from starting.

Look at the logs.

Also please dont use images to share logs, terminal outputs or config files. Format it properly as text and use the \</\> button to mark it from the post editor. Or use triple backticks ``` before and after. So it looks like that and is readable.

```auto
yada yada

```

Since you're using version 7.0.1 on an OS using systemd, the logs should be accessible with

```auto
journalctl -u heartbeat-elastic.service

```

---

<div class="post-metadata">

**Author:** ![skyluke.1987](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@skyluke.1987](https://discuss.elastic.co/u/skyluke.1987)\
**Post date:** [May 24, 2019, 4:02am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/19 "2019-05-24T04:02:27Z")

</div>

Hi Martin,

May I know in the heartbeat.yml config file, there is a field called "setup.template.name" & "path" what should I link or direct to?

---

<div class="post-metadata">

**Author:** ![martinr\_ubi](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@martinr\_ubi](https://discuss.elastic.co/u/martinr_ubi)\
**Post date:** [May 24, 2019, 4:33am UTC](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129/20 "2019-05-24T04:33:55Z")

</div>

Please share your full config file if you need help with a config file.  
There are multiple path settings, I don’t know which one your asking about if I can’t see your full config file.

The other setting is probably not required at all, depending on your config. Actually maybe both settings would be best left to default.

You should start with a very basic config, close to the default config file that was delivered in heartbeat.yml. But anyhow, please share it with us if you need help.

[Next page](https://discuss.elastic.co/t/unable-to-start-heartbeat/181129.md?page=2)
