# Unable to install fleet server

**URL:** <https://discuss.elastic.co/t/unable-to-install-fleet-server/282525>\
**Category:** Beats\
**Tags:** fleet\
**Created:** [August 25, 2021, 9:30pm UTC](https://discuss.elastic.co/t/unable-to-install-fleet-server/282525 "2021-08-25T21:30:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![geetika\_gopi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geetika_gopi/32/93548_2.png) [@geetika\_gopi](https://discuss.elastic.co/u/geetika_gopi)\
**Post date:** [August 25, 2021, 9:30pm UTC](https://discuss.elastic.co/t/unable-to-install-fleet-server/282525/1 "2021-08-25T21:30:23Z")

</div>

Hi @scottdfedorov,

Since this is a production environment, I tried installing fleet by providing my own certificates and this is the error I see:

```auto
sudo ./elastic-agent install --url=https://abc:8220 \ -f \ --fleet-server-es=https://xyz:9200 \ --fleet-server-service-token=AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL3Rva2VuLTE2Mjk5MjYzMzAxMDA6UmR0cEtYVHRRX0c0bVBTZUJQdGRNZw \ --fleet-server-policy=bcd74e90-0193-11ec-bbdc-613ccb01fbf0 \ --certificate-authorities=/root/fleet-certs/ca.crt \ --fleet-server-es-ca=/etc/elasticsearch/cert.crt \ --fleet-server-cert=/root/fleet-certs/fleet-server.crt \ --fleet-server-cert-key=/root/fleet-certs/fleet-server.key --enrollment-token=SVF0QWZIc0IyN3VtR0hiLWFqdmg6VGhqMVdFYktRc0d2azh6ckhyTEloQQ==

```

```auto
Elastic Agent will be installed at /opt/Elastic/Agent and will run as a service. Do you want to continue? [Y/n]:y
2021-08-25T17:19:38.869-0400 INFO cmd/enroll_cmd.go:414 Starting enrollment to URL: https://abc:8220/
2021-08-25T17:19:38.971-0400 WARN cmd/enroll_cmd.go:425 Remote server is not ready to accept connections, will retry in a moment.

```

I don't get how is it trying to connect to port 8220 when the command above is intended to install fleet server in the first place. Isn't this command supposed to open the port 8220?  
Also a quick note, I am trying to install fleet server on one of my elastic data nodes. Would that be a problem in anyway?

---

<div class="post-metadata">

**Author:** ![scottdfedorov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scottdfedorov/32/64699_2.png) [@scottdfedorov](https://discuss.elastic.co/u/scottdfedorov)\
**Post date:** [August 25, 2021, 9:57pm UTC](https://discuss.elastic.co/t/unable-to-install-fleet-server/282525/2 "2021-08-25T21:57:53Z")

</div>

The command installs fleet server and an elastic agent in one action. The agent gets the fleet server policy defined in your elastic cluster.

Can I ask if you've read through all the [docs](https://www.elastic.co/guide/en/fleet/current/fleet-server.html) on fleet server?

You need to have an elasticsearch cluster up and running, with the fleet server policy in place. Did you define the elasticsearch host(s) and the fleet server host(s) in the Kibana UI for Fleet server?

> **[Fleet UI settings | Fleet User Guide \[7.14\] | Elastic](https://www.elastic.co/guide/en/fleet/current/fleet-settings.html)**

You should confirm the settings are there. I believe if the fleet server gets a policy from Elastic that doesn't have the fleet server host defined, it will fail to start like this.

Also, can you confirm the cluster is up and running? Are you able to make a curl request to the cluster? Do you have HTTP or HTTPS\_PROXY set? Sometimes a proxy gets in the way.

I have the fleet server running on one of my elasticsearch nodes, so no issue there, though I think it's recommended that you keep the elasticsearch nodes to ONLY run elasticsearch for performance. We're still in development for this upgrade so its fine for me, but if you're indeed in production, I'd recommend putting it on another host (for example, the same host you're running Kibana or Logstash on).

---

<div class="post-metadata">

**Author:** ![geetika\_gopi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geetika_gopi/32/93548_2.png) [@geetika\_gopi](https://discuss.elastic.co/u/geetika_gopi)\
**Post date:** [August 26, 2021, 5:13am UTC](https://discuss.elastic.co/t/unable-to-install-fleet-server/282525/3 "2021-08-26T05:13:22Z")

</div>

@scottdfedorov Thank you for your message. Yes I have cross checked the UI settings and they are set as:

Fleet hosts: [https://abc:8220](https://abc:8220)  
Elastic hosts: [https://abc:9200](https://abc:9200), [https://xyz:9200](https://xyz:9200), [https://def:9200](https://def:9200)

We have configured basic security for the Elastic Stack plus secured HTTPS traffic according to this document: [Set up basic security for the Elastic Stack plus secured HTTPS traffic | Elasticsearch Guide [master] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/master/security-basic-setup-https.html)

Not sure where we are going wrong. The same error still persists

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 26, 2021, 7:19am UTC](https://discuss.elastic.co/t/unable-to-install-fleet-server/282525/4 "2021-08-26T07:19:48Z")

</div>

It'd be easier if you could please just post a single topic on your issue, as it makes it hard to help across multiple topics on the same issue - [Unable to install fleet server](https://discuss.elastic.co/t/unable-to-install-fleet-server/282481)

---

<div class="post-metadata">

**Author:** ![geetika\_gopi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geetika_gopi/32/93548_2.png) [@geetika\_gopi](https://discuss.elastic.co/u/geetika_gopi)\
**Post date:** [August 26, 2021, 8:03am UTC](https://discuss.elastic.co/t/unable-to-install-fleet-server/282525/5 "2021-08-26T08:03:12Z")

</div>

Sure @warkolm Thank you for pointing it out. I'll remove the duplicate posts

---

<div class="post-metadata">

**Author:** ![scottdfedorov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scottdfedorov/32/64699_2.png) [@scottdfedorov](https://discuss.elastic.co/u/scottdfedorov)\
**Post date:** [August 26, 2021, 1:41pm UTC](https://discuss.elastic.co/t/unable-to-install-fleet-server/282525/6 "2021-08-26T13:41:43Z")

</div>

Can you uninstall and remove whatever artifacts may be left over and then try the install again, this time include the full output from the console?

Are you able to reach the cluster via HTTP request?  
From the server, whats the output you get from the status api? Ex:  
`curl --user elastic:changeme -X GET "https://xyz:9200/api/status"`  
If that doesn't work, try adding the `--insecure` flag to the curl request.

---

<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:** [September 23, 2021, 3:42pm UTC](https://discuss.elastic.co/t/unable-to-install-fleet-server/282525/7 "2021-09-23T15:42:16Z")

</div>

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