# Error while adding an agent

**URL:** <https://discuss.elastic.co/t/error-while-adding-an-agent/382448>\
**Category:** Elastic Training\
**Created:** [October 6, 2025, 4:13pm UTC](https://discuss.elastic.co/t/error-while-adding-an-agent/382448 "2025-10-06T16:13:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbelmont](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@sbelmont](https://discuss.elastic.co/u/sbelmont)\
**Post date:** [October 6, 2025, 4:13pm UTC](https://discuss.elastic.co/t/error-while-adding-an-agent/382448/1 "2025-10-06T16:13:40Z")

</div>

Course: Observability  
Version: v 8.8.2  
Question: I had to reset my lab and restart the lab from the beginning. While trying to add an agent, I get an error like below so that I cannot go forward because all lab courses depend on the agent. If I paste the original error message, I get an error saying I cannot post lint to that host. So, I removed URL like strings.

elastic@ip-172-31-28-230:~/elastic-agent-8.8.2-linux-x86\_64$ sudo ./elastic-agent install --url=…fleet-server:8220 --enrollment-token=TG5QWHFwa0JJTVVSV1h4cVc3azU6al9WbFRMVW1TbEMydm9NN21fRC1Zdw==  
Elastic Agent will be installed at /opt/Elastic/Agent and will run as a service. Do you want to continue? [Y/n]:Y  
{"log.level":"info","@timestamp":"2025-10-06T15:58:02.922Z","log.origin":{"file.name":"cmd/enroll\_cmd.go","file.line":478},"message":"Starting enrollment to URL: …fleet-server:8220/","ecs.version":"1.6.0"}  
Error: fail to enroll: fail to execute request to fleet-server: x509: certificate signed by unknown authority  
For help, please see our troubleshooting guide at [Troubleshoot common problems | Fleet and Elastic Agent Guide [8.8] | Elastic](https://www.elastic.co/guide/en/fleet/8.8/fleet-troubleshooting.html)  
Error: enroll command failed with exit code: 1  
For help, please see our troubleshooting guide at [Troubleshoot common problems | Fleet and Elastic Agent Guide [8.8] | Elastic](https://www.elastic.co/guide/en/fleet/8.8/fleet-troubleshooting.html)

---

<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:** [October 6, 2025, 7:05pm UTC](https://discuss.elastic.co/t/error-while-adding-an-agent/382448/2 "2025-10-06T19:05:46Z")

</div>



---

<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:** [October 6, 2025, 7:24pm UTC](https://discuss.elastic.co/t/error-while-adding-an-agent/382448/3 "2025-10-06T19:24:01Z")

</div>


