# Elastic Agent Unhealthy - 504 Gateway Timeout - net/hxxp: TLS handshake timeout

**URL:** <https://discuss.elastic.co/t/elastic-agent-unhealthy-504-gateway-timeout-net-hxxp-tls-handshake-timeout/341325>\
**Category:** Elastic Agent\
**Tags:** elastic-stack-security\
**Created:** [August 22, 2023, 6:21am UTC](https://discuss.elastic.co/t/elastic-agent-unhealthy-504-gateway-timeout-net-hxxp-tls-handshake-timeout/341325 "2023-08-22T06:21:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shinej](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@Shinej](https://discuss.elastic.co/u/Shinej)\
**Post date:** [August 22, 2023, 6:21am UTC](https://discuss.elastic.co/t/elastic-agent-unhealthy-504-gateway-timeout-net-hxxp-tls-handshake-timeout/341325/1 "2023-08-22T06:21:44Z")

</div>

Hi,

Elastic agent is un healthy and not send logs -- Logs below -- appreciate any help.

```auto
[elastic_agent.filebeat][warn] WinEventLog[winlog-winlog.winlog-c97bd33a-1398-47bc-88a7-284efdb43f68] error salvaging message (event id=16403 qualifier=0 provider="Microsoft-Windows-Bits-Client" created at 2023-08-09 06:28:44.969621 +0000 UTC will be included without a message): failed in EvtFormatMessage: The message ID for the desired message could not be found.

[elastic_agent][error] lazy acker: failed ack batch, enqueue for retry: []fleetapi.Action{(*fleetapi.ActionApp)(0xc0008ce090)}

[elastic_agent.filebeat][error] failed to publish events: 504 Gateway Timeout: {"ok":false,"message":"Post \"https://x.x.x.x:18076/_bulk\": net/http: TLS handshake timeout"}

[elastic_agent.filebeat][error] Failed to connect to backoff(elasticsearch(https://prod.xx.xx.xxxx.xx:9243)): 504 Gateway Timeout: {"ok":false,"message":"Get \"https://x.x.x.x:18076/\": net/http: TLS handshake timeout"}

```

---

<div class="post-metadata">

**Author:** ![grfneto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grfneto/32/125776_2.png) [@grfneto](https://discuss.elastic.co/u/grfneto)\
**Post date:** [August 23, 2023, 6:02pm UTC](https://discuss.elastic.co/t/elastic-agent-unhealthy-504-gateway-timeout-net-hxxp-tls-handshake-timeout/341325/2 "2023-08-23T18:02:29Z")

</div>

Hi @Shinej

Have you checked if there are any firewall blocks on the machine or on the network?

Is there communication between the servers? Does it respond to telnet communication test?

Best regards

---

<div class="post-metadata">

**Author:** ![Shinej](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@Shinej](https://discuss.elastic.co/u/Shinej)\
**Post date:** [August 24, 2023, 4:23am UTC](https://discuss.elastic.co/t/elastic-agent-unhealthy-504-gateway-timeout-net-hxxp-tls-handshake-timeout/341325/3 "2023-08-24T04:23:26Z")

</div>

I will quickly test this and get back.

---

<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 21, 2023, 4:23am UTC](https://discuss.elastic.co/t/elastic-agent-unhealthy-504-gateway-timeout-net-hxxp-tls-handshake-timeout/341325/4 "2023-09-21T04:23:42Z")

</div>

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