Yep @Juan_Pablo1 Top of the day to you! , this gives us a lot more to work with.
The important part isn’t really the 502 itself. The deeper error is:
ERR_TLS_HANDSHAKE_TIMEOUT
Client network socket disconnected before secure TLS connection was established.
And the stack shows the failure happening while Node’s HTTPS client is trying to establish the connection.
I’d troubleshoot this from inside the n8n container, rather than changing the workflow first.
Try:
docker exec -it n8n-1 sh
Then test DNS resolution:
getent hosts api.example.com
and test the TLS handshake directly:
openssl s_client -connect api.example.com:443 -servername api.example.com
If that hangs or fails from inside the container while the same command works normally on the host, then the problem is most likely somewhere in the container’s network path, proxy, firewall, or DNS configuration.
I’d also temporarily increase the HTTP Request node timeout from 30s to something like 60s just to determine whether this is genuinely a slow handshake or an immediate network termination.
Don’t disable TLS certificate verification yet. The log is showing a handshake timeout, not a certificate-validation error, so disabling verification wouldn’t address the underlying failure.
If the openssl s_client test also hangs, send that output too. That should tell us whether we’re dealing with n8n/Axios specifically or a lower-level connection problem.