# Filebeat not starting properly after host start

**URL:** https://discuss.elastic.co/t/filebeat-not-starting-properly-after-host-start/253410
**Category:** Beats
**Tags:** filebeat
**Created:** [October 27, 2020, 9:23am UTC](https://discuss.elastic.co/t/filebeat-not-starting-properly-after-host-start/253410 "2020-10-27T09:23:37Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![adsr](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@adsr](https://discuss.elastic.co/u/adsr)
#### Post date: [October 27, 2020, 9:23am UTC](https://discuss.elastic.co/t/filebeat-not-starting-properly-after-host-start/253410/1 "2020-10-27T09:23:37Z")

</div>

Hi everyone, I am running filebeat 7.5.0 on centos with systemd and everything works fine except when I restart the host (the filebeat service is `enabled`).

According to systemd the service is running fine, yet it does nothing.  
In the filebeat log I can only see the following:

```auto
2020-10-26T15:03:09.092+0100	INFO	instance/beat.go:610	Home path: [/usr/share/filebeat] Config path: [/etc/filebeat] Data path: [/var/lib/filebeat] Logs path: [/var/log/filebeat]
2020-10-26T15:03:09.114+0100	INFO	instance/beat.go:618	Beat ID: 44a5a206-408b-48ed-8629-c2265aa22133

```

If I restart the service (`systemctl restart filebeat`) everything is fine and the log has more entries:

```auto

2020-10-26T16:03:09.092+0100	INFO	instance/beat.go:610	Home path: [/usr/share/filebeat] Config path: [/etc/filebeat] Data path: [/var/lib/filebeat] Logs path: [/var/log/filebeat]
2020-10-26T16:03:09.114+0100	INFO	instance/beat.go:618	Beat ID: 44a5a206-408b-48ed-8629-c2265aa22133
2020-10-26T16:03:09.214+0100	INFO	seccomp/seccomp.go:124 Syscall filter successfully installed
2020-10-26T16:03:09.214+0100	INFO	[beat] instance/beat.go:841 ...
...

```

---

<div class="post-metadata">

### Author: ![ChrsMark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrsmark/32/55858_2.png) [@ChrsMark](https://discuss.elastic.co/u/ChrsMark)
#### Post date: [October 27, 2020, 10:40am UTC](https://discuss.elastic.co/t/filebeat-not-starting-properly-after-host-start/253410/2 "2020-10-27T10:40:48Z")

</div>

Hi!

Can you provide more information about your environment and your setup (what process do you follow to setup fb) so as to try to reproduce it?

---

<div class="post-metadata">

### Author: ![adsr](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@adsr](https://discuss.elastic.co/u/adsr)
#### Post date: [October 27, 2020, 10:58am UTC](https://discuss.elastic.co/t/filebeat-not-starting-properly-after-host-start/253410/3 "2020-10-27T10:58:35Z")

</div>

Thanks for your reply. Not sure what information you need but I will provide some stuff:

**OperatingSystem**

```auto
CentOS Linux release 7.6.1810 (Core)
Kernel: 3.10.0-1127.19.1.el7.x86_64

```

**Filebeat**

- Installed via `yum`
- Systemd unit

```auto
[Unit]
Description=Filebeat sends log files to Logstash or directly to Elasticsearch.
Documentation=https://www.elastic.co/products/beats/filebeat
Wants=network-online.target
After=network-online.target

[Service]

Environment="BEAT_LOG_OPTS=-e"
Environment="BEAT_CONFIG_OPTS=-c /etc/filebeat/filebeat.yml"
Environment="BEAT_PATH_OPTS=-path.home /usr/share/filebeat -path.config /etc/filebeat -path.data /var/lib/filebeat -path.logs /var/log/filebeat"
ExecStart=/usr/share/filebeat/bin/filebeat $BEAT_LOG_OPTS $BEAT_CONFIG_OPTS $BEAT_PATH_OPTS
Restart=always

[Install]
WantedBy=multi-user.target

```

---

<div class="post-metadata">

### Author: ![ChrsMark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrsmark/32/55858_2.png) [@ChrsMark](https://discuss.elastic.co/u/ChrsMark)
#### Post date: [October 27, 2020, 12:35pm UTC](https://discuss.elastic.co/t/filebeat-not-starting-properly-after-host-start/253410/4 "2020-10-27T12:35:15Z")

</div>

Thanks for providing the info!

Tested on GCP with Centos 7 following the steps of [https://www.elastic.co/guide/en/beats/filebeat/current/setup-repositories.html](https://www.elastic.co/guide/en/beats/filebeat/current/setup-repositories.html).

I cannot see a similar behaviour after stoping and restarting the VM.

Here is the service spec:

```auto
[user@centos-test ~]$ cat /usr/lib/systemd/system/filebeat.service
[Unit]
Description=Filebeat sends log files to Logstash or directly to Elasticsearch.
Documentation=https://www.elastic.co/products/beats/filebeat
Wants=network-online.target
After=network-online.target
[Service]
Environment="BEAT_LOG_OPTS="
Environment="BEAT_CONFIG_OPTS=-c /etc/filebeat/filebeat.yml"
Environment="BEAT_PATH_OPTS=--path.home /usr/share/filebeat --path.config /etc/filebeat --path.data /var/lib/filebeat --path.logs /var/log/filebeat"
ExecStart=/usr/share/filebeat/bin/filebeat --environment systemd $BEAT_LOG_OPTS $BEAT_CONFIG_OPTS $BEAT_PATH_OPTS
Restart=always
[Install]
WantedBy=multi-user.target

```

---

<div class="post-metadata">

### Author: ![adsr](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@adsr](https://discuss.elastic.co/u/adsr)
#### Post date: [October 28, 2020, 7:58am UTC](https://discuss.elastic.co/t/filebeat-not-starting-properly-after-host-start/253410/5 "2020-10-28T07:58:08Z")

</div>

Hi there, thanks for your effort!  
Unfortunately you couldn't reproduce it - I also noticed that this does only happen every now and then.  
No idea what else I could provide / what it could be.

---

<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: [November 25, 2020, 9:58am UTC](https://discuss.elastic.co/t/filebeat-not-starting-properly-after-host-start/253410/6 "2020-11-25T09:58:09Z")

</div>

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