# After adding metricbeat to central management, windows service wont start

**URL:** <https://discuss.elastic.co/t/after-adding-metricbeat-to-central-management-windows-service-wont-start/178588>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [April 26, 2019, 8:34am UTC](https://discuss.elastic.co/t/after-adding-metricbeat-to-central-management-windows-service-wont-start/178588 "2019-04-26T08:34:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gruselglatz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gruselglatz/32/42675_2.png) [@gruselglatz](https://discuss.elastic.co/u/gruselglatz)\
**Post date:** [April 26, 2019, 8:34am UTC](https://discuss.elastic.co/t/after-adding-metricbeat-to-central-management-windows-service-wont-start/178588/1 "2019-04-26T08:34:21Z")

</div>

Hi!

After I've added Metricbeat (7.0.0) to central management (elastic cloud 7.0), the windows service won't start anymore.

I get this messages in Powershell with Admin rights:

```
start-service metricbeat
start-service : Der Dienst "metricbeat (metricbeat)" kann aufgrund des folgenden Fehlers nicht gestartet werden:
Der Dienst metricbeat kann nicht auf dem Computer . gestartet werden.
In Zeile:1 Zeichen:1
+ start-service metricbeat
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommandException
+ FullyQualifiedErrorId : CouldNotStartService,Microsoft.PowerShell.Commands.StartServiceCommand

```

The windows Event log only shows a Timeout (30000ms) error. But it definitly doesnt wait for 30 seconds.

```
Das Zeitlimit (30000 ms) wurde beim Verbindungsversuch mit dem Dienst metricbeat erreicht.

```

When I try to start metricbeat with the same settings as the Service i get this message:

```
Exiting: parsing central management settings: missing field accessing 'management.access_token' (source:'C:\Program Files\metricbeat\metricbeat.yml')

```

In the .yml the parameter is: `access_token: ${management.accesstoken}`

It got configured via the enroll mechanism.

Maybe related? [https://github.com/elastic/beats/issues/11493](https://github.com/elastic/beats/issues/11493)

What should I do to fix this?

---

<div class="post-metadata">

**Author:** ![gruselglatz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gruselglatz/32/42675_2.png) [@gruselglatz](https://discuss.elastic.co/u/gruselglatz)\
**Post date:** [April 26, 2019, 9:04am UTC](https://discuss.elastic.co/t/after-adding-metricbeat-to-central-management-windows-service-wont-start/178588/2 "2019-04-26T09:04:11Z")

</div>

When I move the files to the `-path.data` its working.

But at the enrollment the data dir is created in the `$workdir` so I think the install service poweshell script is incorrect, or the enroll mechanism?

---

<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:** [May 24, 2019, 9:18am UTC](https://discuss.elastic.co/t/after-adding-metricbeat-to-central-management-windows-service-wont-start/178588/3 "2019-05-24T09:18:31Z")

</div>

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