# I cant add an agent

**URL:** https://discuss.elastic.co/t/i-cant-add-an-agent/335547
**Category:** Elastic Agent
**Created:** [June 8, 2023, 2:06pm UTC](https://discuss.elastic.co/t/i-cant-add-an-agent/335547 "2023-06-08T14:06:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Charnpreet\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/charnpreet_singh/32/122024_2.png) [@Charnpreet\_Singh](https://discuss.elastic.co/u/Charnpreet_Singh)
#### Post date: [June 8, 2023, 2:06pm UTC](https://discuss.elastic.co/t/i-cant-add-an-agent/335547/1 "2023-06-08T14:06:24Z")

</div>

I am trying to enroll agent onto my fleet server, the server is live but whenever I try to connect my agent it doesn't work.

I keep encountering the same error ,{"log.level":"warn","@timestamp":"2023-06-06T19:28:55.258+0100","log.logger":"tls","log.origin":{"file.name":"tlscommon/tls\_config.go","file.line":104},"message":"SSL/TLS verifications disabled.","ecs.version":"1.6.0"} erver: dial tcp 10.0.2.15: connectex: No connection could be made because the target machine actively refused it. 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

I have tried to run the same commands with --insecure and as a admin but it doesn't work, I am running both the fleet server (kali purple) and the agent(Windows) on VMs.

---

<div class="post-metadata">

### Author: ![Alexis\_Roberson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexis_roberson/32/113233_2.png) [@Alexis\_Roberson](https://discuss.elastic.co/u/Alexis_Roberson)
#### Post date: [June 8, 2023, 3:41pm UTC](https://discuss.elastic.co/t/i-cant-add-an-agent/335547/2 "2023-06-08T15:41:38Z")

</div>

Is the fleet server self managed?

---

<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: [July 6, 2023, 3:42pm UTC](https://discuss.elastic.co/t/i-cant-add-an-agent/335547/3 "2023-07-06T15:42:22Z")

</div>

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