Aws ecs n8n The DNS server returned an error, perhaps the server is offline

Information on your n8n setup

  • Running n8n via: AWS ECS

Error adding an API: The DNS server returned an error, perhaps the server is offline

After checking for possible answers have added to the Terraform: Module

        { name = "N8N_LISTEN_ADDRESS", value = "0.0.0.0" },
        { name = "NODEJS_PREFER_IPV4", value = "true" }

Also tried

        { name = "N8N_LISTEN_ADDRESS", value = "::" }

Hi, Carlos!

First, confirm whether DNS fails int this situation by resolving the hostname (nslookup, dig) or trying to reach it via https (curl). If it fails, n8n cannot reach the api by design.

Ensure your ECS task has outbound internet acess and proper DNS resolution.