Curl_errno = 56; curl_error = CONNECT tunnel failed, response 502; HTTP Status Code = 502

Hey, I was trying to connect n8n with Whatsapp with meta developers, I use a self hosted n8n using ngrock and docker desktop.

Describe the problem/error/question

when trying to execute the workflow or publishing it, I encounter this error : Problem running workflow
Bad request - please check your parameters
Show Details
(#2200) Callback verification failed with the following errors: curl_errno = 56; curl_error = CONNECT tunnel failed, response 502; HTTP Status Code = 502; HTTP Message = Failed to resolve host

What is the error message (if any)?

Please share your workflow

N/A

Share the output returned by the last node

N/A

Information on your n8n setup

  • n8n version: 2.20.7
  • Database (default: SQLite): N/A
  • n8n EXECUTIONS_PROCESS setting (default: own, main): I don’t know what it is
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Windows 10

Hi @Jaden1, welcome!
The status code 502 means that Meta cannot reach your webhook URL, or it is not publicly available. This mostly happens when your URL is locally hosted, so either try to validate your URL or you have entered it in the Meta developer portal. Let me know if the issue persists. If that URL is localhosted, try to edit your WEBHOOK URL to match the one with your tunnelling service.

Welcome @Jaden1 to our community! I’m Jay and I am a n8n verified creator.

With Docker Desktop + ngrok, the common culprit is that ngrok needs to point to the Docker container’s internal port, not localhost. Run: ngrok http host.docker.internal:5678 instead of ngrok http 5678 - this routes through Docker’s host bridge. Then paste the ngrok https URL (e.g. https://xxxx.ngrok-free.app) into your WEBHOOK_URL env var and restart n8n. When registering in the Meta developer portal, use that same ngrok URL as your webhook callback URL and verify it responds to a GET with the hub.challenge token.