# Metricbeat failed to start at system reboot

**URL:** <https://discuss.elastic.co/t/metricbeat-failed-to-start-at-system-reboot/116256>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [January 19, 2018, 2:39pm UTC](https://discuss.elastic.co/t/metricbeat-failed-to-start-at-system-reboot/116256 "2018-01-19T14:39:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ijazadm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ijazadm/32/26662_2.png) [@ijazadm](https://discuss.elastic.co/u/ijazadm)\
**Post date:** [January 19, 2018, 2:39pm UTC](https://discuss.elastic.co/t/metricbeat-failed-to-start-at-system-reboot/116256/1 "2018-01-19T14:39:47Z")

</div>

Hi ,

Metricbeat is running fine , and is enabled to start at system boot through systemd, rhel7.

but when I reboot the system , it fails to start and I have to restart is manually.

Any ideas?

log:

[root@wp-p3s-2c ~]# systemctl status metricbeat  
● metricbeat.service - metricbeat  
Loaded: loaded (/usr/lib/systemd/system/metricbeat.service; enabled; vendor preset: disabled)  
Active: failed (Result: start-limit) since Fri 2018-01-19 14:35:30 GMT; 1min 15s ago  
Docs: [https://www.elastic.co/guide/en/beats/metricbeat/current/index.html](https://www.elastic.co/guide/en/beats/metricbeat/current/index.html)  
Process: 2270 ExecStart=/usr/share/metricbeat/bin/metricbeat -c /etc/metricbeat/metricbeat.yml -path.home /usr/share/metricbeat -path.config /etc/metricbeat -path.data /var/lib/metricbeat -path.logs /var/log/metricbeat (code=exited, status=1/FAILURE)  
Main PID: 2270 (code=exited, status=1/FAILURE)

Jan 19 14:35:30 wp-p3s-2c systemd[1]: Unit metricbeat.service entered failed state.  
Jan 19 14:35:30 wp-p3s-2c systemd[1]: metricbeat.service failed.  
Jan 19 14:35:30 wp-p3s-2c systemd[1]: metricbeat.service holdoff time over, scheduling restart.  
Jan 19 14:35:30 wp-p3s-2c systemd[1]: start request repeated too quickly for metricbeat.service  
Jan 19 14:35:30 wp-p3s-2c systemd[1]: Failed to start metricbeat.  
Jan 19 14:35:30 wp-p3s-2c systemd[1]: Unit metricbeat.service entered failed state.  
Jan 19 14:35:30 wp-p3s-2c systemd[1]: metricbeat.service failed.  
[root@wp-p3s-2c ~]#  
[root@wp-p3s-2c ~]#  
[root@wp-p3s-2c ~]# systemctl restart metricbeat  
[root@wp-p3s-2c ~]#

[root@wp-p3s-2c ~]# systemctl status metricbeat  
● metricbeat.service - metricbeat  
Loaded: loaded (/usr/lib/systemd/system/metricbeat.service; enabled; vendor preset: disabled)  
Active: active (running) since Fri 2018-01-19 14:36:54 GMT; 1s ago  
Docs: [https://www.elastic.co/guide/en/beats/metricbeat/current/index.html](https://www.elastic.co/guide/en/beats/metricbeat/current/index.html)  
Main PID: 2545 (metricbeat)  
Memory: 11.0M  
CGroup: /system.slice/metricbeat.service  
└─2545 /usr/share/metricbeat/bin/metricbeat -c /etc/metricbeat/metricbeat.yml -path.home /usr/share/metricbeat -path.con...

Jan 19 14:36:54 wp-p3s-2c systemd[1]: Started metricbeat.  
Jan 19 14:36:54 wp-p3s-2c systemd[1]: Starting metricbeat...  
[root@wp-p3s-2c ~]#

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [January 19, 2018, 7:36pm UTC](https://discuss.elastic.co/t/metricbeat-failed-to-start-at-system-reboot/116256/2 "2018-01-19T19:36:15Z")

</div>

Can you share metricbeat configuration and metricbeat logs. Just having the systemd logs gives you no details why it actually failed to startup.

Please format logs, configs and terminal input/output using the `</>`-Button or [markdown code fences](https://help.github.com/articles/creating-and-highlighting-code-blocks/#fenced-code-blocks). This forum uses Markdown to format posts. Without proper formatting, it can be very hard to read your posts.

---

<div class="post-metadata">

**Author:** ![ijazadm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ijazadm/32/26662_2.png) [@ijazadm](https://discuss.elastic.co/u/ijazadm)\
**Post date:** [January 19, 2018, 8:00pm UTC](https://discuss.elastic.co/t/metricbeat-failed-to-start-at-system-reboot/116256/3 "2018-01-19T20:00:12Z")

</div>

here is the metricbeat configuration

```
metricbeat.autodiscover:
  providers:
- type: docker

metricbeat.modules:
- module: system
  metricsets:
- cpu
- filesystem
- memory
- network
- process
  enabled: true
  period: 10s
  processes: ['.*']
  cpu_ticks: false
- module: apache
  metricsets: ["status"]
  enabled: true
  period: 1s
  hosts: ["http://wp-p3s-1c.ebi.ac.uk"]
  server_status_path: "server-status"
- module: docker
  metricsets: ["container", "cpu", "diskio", "healthcheck", "info", "memory", "network"]
  hosts: ["unix:///var/run/docker.sock"]
  period: 10s
- module: kibana
  metricsets: ["status"]
  period: 10s
  hosts: ["localhost:5601"]

output.elasticsearch:
  hosts: ["10.3.10.44:9200","10.3.10.28:9200"]

setup.kbana:
  host: "10.3.10.44:5601"
```

---

<div class="post-metadata">

**Author:** ![ijazadm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ijazadm/32/26662_2.png) [@ijazadm](https://discuss.elastic.co/u/ijazadm)\
**Post date:** [January 19, 2018, 8:05pm UTC](https://discuss.elastic.co/t/metricbeat-failed-to-start-at-system-reboot/116256/4 "2018-01-19T20:05:25Z")

</div>

there is no error in metricbeat logs.

```
[root@wp-p3s-1c ~]# 
[root@wp-p3s-1c ~]# 
[root@wp-p3s-1c ~]# grep -i error /var/log/metricbeat/metricbeat
[root@wp-p3s-1c ~]#
```

---

<div class="post-metadata">

**Author:** ![ijazadm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ijazadm/32/26662_2.png) [@ijazadm](https://discuss.elastic.co/u/ijazadm)\
**Post date:** [January 19, 2018, 8:11pm UTC](https://discuss.elastic.co/t/metricbeat-failed-to-start-at-system-reboot/116256/5 "2018-01-19T20:11:22Z")

</div>

the journalctl shows:

```
Jan 19 15:01:05 wp-p3s-1c.ebi.ac.uk metricbeat[1999]: Exiting: Error importing Kibana dashboards: fail to
Jan 19 15:01:05 wp-p3s-1c.ebi.ac.uk systemd[1]: metricbeat.service: main process exited, code=exited, sta
Jan 19 15:01:05 wp-p3s-1c.ebi.ac.uk systemd[1]: Unit metricbeat.service entered failed state.
Jan 19 15:01:05 wp-p3s-1c.ebi.ac.uk systemd[1]: metricbeat.service failed.
Jan 19 15:01:06 wp-p3s-1c.ebi.ac.uk systemd[1]: metricbeat.service holdoff time over, scheduling restart.
Jan 19 15:01:06 wp-p3s-1c.ebi.ac.uk systemd[1]: start request repeated too quickly for metricbeat.service
Jan 19 15:01:06 wp-p3s-1c.ebi.ac.uk systemd[1]: Failed to start metricbeat.
Jan 19 15:01:06 wp-p3s-1c.ebi.ac.uk systemd[1]: Unit metricbeat.service entered failed state.
Jan 19 15:01:06 wp-p3s-1c.ebi.ac.uk systemd[1]: metricbeat.service failed

```

i think it fails to import kibana dashboards , and hence fails to start? but why it then succeeds when i manually do:

`systemctl restart metricbeat.`

I just want it to start at system reboot without any manual steps.

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [January 19, 2018, 8:32pm UTC](https://discuss.elastic.co/t/metricbeat-failed-to-start-at-system-reboot/116256/6 "2018-01-19T20:32:29Z")

</div>

Check your startup order. Is metricbeat started before or after the network is up?

As you run metricbeat as a service, consider to disable automatic kibana/elasticsearch configuration. You can setup kibana manually (or automated via Ansible and co.) by running `metricbeat setup ...`.

---

<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:** [February 16, 2018, 8:32pm UTC](https://discuss.elastic.co/t/metricbeat-failed-to-start-at-system-reboot/116256/7 "2018-02-16T20:32:33Z")

</div>

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