# Error when enrolloning Fleet on ELK

**URL:** <https://discuss.elastic.co/t/error-when-enrolloning-fleet-on-elk/349983>\
**Category:** Elastic Agent\
**Tags:** fleet\
**Created:** [December 26, 2023, 7:03pm UTC](https://discuss.elastic.co/t/error-when-enrolloning-fleet-on-elk/349983 "2023-12-26T19:03:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ellery](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ellery/32/130331_2.png) [@Ellery](https://discuss.elastic.co/u/Ellery)\
**Post date:** [December 26, 2023, 7:03pm UTC](https://discuss.elastic.co/t/error-when-enrolloning-fleet-on-elk/349983/1 "2023-12-26T19:03:17Z")

</div>

Hello, I hope you can help me. I have the following issue: I have successfully installed Elasticsearch and Kibana. Now I'm installing Fleet, but no matter what I do, I encounter the following error:  
The instalation it's

```auto
curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.11.3-linux-x86_64.tar.gz
tar xzvf elastic-agent-8.11.3-linux-x86_64.tar.gz
cd elastic-agent-8.11.3-linux-x86_64
sudo ./elastic-agent install \
  --fleet-server-es=https://xx.xxx.133.xx:9200 \
  --fleet-server-service-token=AAEAAWVsYXN0aWdsadasVyL3Rva2VuLTE3MDM2MTQwMDIxNTY6MWhZa2w1WDZUbks5T09UTkl0WV94Zw \
  --fleet-server-policy=fleet-server-policy \
  --fleet-server-es-ca-trusted-fingerprint=2417043740b943ec205fc1583c00c3229d364e1b8ab05f2f293f590e22b6c522 \
  --fleet-server-port=8220

```

the anserwer it's

```auto
Elastic Agent will be installed at /opt/Elastic/Agent and will run as a service. Do you want to continue? [Y/n]:y
Copying files....................................................................................................................................................................................................................................................................................................... DONE
Installing service...... DONE
Starting service... DONE
Enrolling Elastic Agent with Fleet.............{"log.level":"info","@timestamp":"2023-12-26T18:46:52.845Z","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":411},"message":"Generating self-signed certificate for Fleet Server","ecs.version":"1.6.0"}
.........{"log.level":"info","@timestamp":"2023-12-26T18:46:55.474Z","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":788},"message":"Fleet Server - Running on policy with Fleet Server integration: fleet-server-policy; missing config fleet.agent.id (expected during bootstrap process)","ecs.version":"1.6.0"}
...{"log.level":"info","@timestamp":"2023-12-26T18:46:56.169Z","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":479},"message":"Starting enrollment to URL: https://hostname:8220/","ecs.version":"1.6.0"}
.Error: fail to enroll: fail to execute request to fleet-server: dial tcp xx.xxx. **132**.x:8220: connect: connection refused
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.11/fleet-troubleshooting.html
 FAILED
Stopping service.... DONE
Uninstalling...
   Stopping service... DONE
   Stopping upgrade watcher; none found... DONE
   Removing service..... DONE
   Removing install directory.... DONE
   DONE
Error: enroll command failed for unknown reason: exit status 1
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.11/fleet-troubleshooting.html

```

The difference I find in the response is that I don't know where it gets the `IP x.x.132.x from because the IPs of Kibana and Elastic are x.x.133.x.`

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/d/8dcbc910339ce58b018c3c21d2243c7aebd8f943.png)

`The instalation its on a Azure VM, x.x.133.xx privated IP and https://xxx.xxx.xxx.224:5601/app/fleet/agents public IP`

Help and thanks

---

<div class="post-metadata">

**Author:** ![strawgate](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/strawgate/32/131008_2.png) [@strawgate](https://discuss.elastic.co/u/strawgate)\
**Post date:** [January 23, 2024, 1:25am UTC](https://discuss.elastic.co/t/error-when-enrolloning-fleet-on-elk/349983/2 "2024-01-23T01:25:34Z")

</div>

If you check the settings in the fleet UI is that 132 address the address under the fleet configuration on the settings page?

Ie on the top of this page

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/b/9b0db6d8efa70796d7694f688020befe13e05d31.png)

I haven't reproduced this yet but you may just need to add `--url https://fleetserver:8220` to your command (replacing fleetserver with the fleet server fqdn)

---

<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 20, 2024, 1:25am UTC](https://discuss.elastic.co/t/error-when-enrolloning-fleet-on-elk/349983/3 "2024-02-20T01:25:52Z")

</div>

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