# Error: fail to enroll : connection timed out

**URL:** <https://discuss.elastic.co/t/error-fail-to-enroll-connection-timed-out/310036>\
**Category:** Elastic Agent\
**Tags:** elastic-agent\
**Created:** [July 19, 2022, 2:44pm UTC](https://discuss.elastic.co/t/error-fail-to-enroll-connection-timed-out/310036 "2022-07-19T14:44:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![koubach](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@koubach](https://discuss.elastic.co/u/koubach)\
**Post date:** [July 19, 2022, 2:44pm UTC](https://discuss.elastic.co/t/error-fail-to-enroll-connection-timed-out/310036/1 "2022-07-19T14:44:24Z")

</div>

Hi,

I'm using Elastic Cloud and I'm can't seem to be able to install the elastic agent, and I get the error :

Error: fail to enroll: fail to execute request to fleet-server: dial tcp IP-adress:443: connect: connection timed out.

When I tried to install the agent without the **sudo** command, the agent enrolled successfully on the Elastic Cloud but is always stuck on updating status and there are no applications running on it even though it has a healthy status in the host.

---

<div class="post-metadata">

**Author:** ![koubach](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@koubach](https://discuss.elastic.co/u/koubach)\
**Post date:** [August 3, 2022, 12:49pm UTC](https://discuss.elastic.co/t/error-fail-to-enroll-connection-timed-out/310036/2 "2022-08-03T12:49:57Z")

</div>

Nevermind, it was a firewall issue and I just had to add proxy configuration to the agent service unit.

---

<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:** [August 31, 2022, 12:50pm UTC](https://discuss.elastic.co/t/error-fail-to-enroll-connection-timed-out/310036/3 "2022-08-31T12:50:47Z")

</div>

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