# Error when trying to install Fleet Server to a centralized host

**URL:** https://discuss.elastic.co/t/error-when-trying-to-install-fleet-server-to-a-centralized-host/326387
**Category:** Kibana
**Tags:** fleet
**Created:** [February 24, 2023, 1:18am UTC](https://discuss.elastic.co/t/error-when-trying-to-install-fleet-server-to-a-centralized-host/326387 "2023-02-24T01:18:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Stephen\_Johnston](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephen_johnston/32/117690_2.png) [@Stephen\_Johnston](https://discuss.elastic.co/u/Stephen_Johnston)
#### Post date: [February 24, 2023, 1:18am UTC](https://discuss.elastic.co/t/error-when-trying-to-install-fleet-server-to-a-centralized-host/326387/1 "2023-02-24T01:18:00Z")

</div>

Hi, I'm trying to add a new fleet server in kibana. When I try to install the Fleet Server Agent on a centralized host, I'm getting errors after I input the following code:

```auto
curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.6.2-darwin-x86_64.tar.gz
tar xzvf elastic-agent-8.6.2-darwin-x86_64.tar.gz
cd elastic-agent-8.6.2-darwin-x86_64
sudo ./elastic-agent install \
  --fleet-server-es=https://192.168.0.8:9200 \
  --fleet-server-service-token=AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL3Rva2VuLTE2NzcyMDA0MjM2ODU6a09xWXhHMkFUaVdKR3hISWYxdG12dw \
  --fleet-server-policy=91199d40-b3de-11ed-8b81-f777bcc92e8c \
  --fleet-server-es-ca-trusted-fingerprint=046f5cf06bb5179a1f6afd0778006d0b556bdd67c56aed6cc3f2872a336cc044

```

The error I get is this:

```auto
{"log.level":"info","@timestamp":"2023-02-23T21:04:07.461-0400","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":803},"message":"Fleet Server - Starting: spawned pid '95077'","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-02-23T21:04:11.470-0400","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":803},"message":"Fleet Server - Error - failed to run subsystems: v7.15.0 data migration failed: failed to apply migration \"AgentMetadata\": migrate AgentMetadata UpdateByQuery failed: [503 Service Unavailable] {\"error\":{\"root_cause\":[],\"type\":\"search_phase_execution_exception\",\"reason\":\"\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[],\"caused_by\":{\"type\":\"search_phase_execution_exception\",\"reason\":\"Search rejected due to missing shards [[.fleet-agents-7][0]]. Consider using `allow_partial_search_results` setting to bypass this error.\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[]}},\"status\":503}","ecs.version":"1.6.0"}
Error: fleet-server failed: context canceled
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.6/fleet-troubleshooting.html
Error: enroll command failed with exit code: 1
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.6/fleet-troubleshooting.html

```

I'm trying to do this on my local machine - an m1 macbook air.

Please advise.

Thanks!

Stephen

---

<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: [March 24, 2023, 1:18am UTC](https://discuss.elastic.co/t/error-when-trying-to-install-fleet-server-to-a-centralized-host/326387/2 "2023-03-24T01:18:59Z")

</div>

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