Error DNS in container

Describe the error

I am trying to send a message using the Discord webhook, but I get a DNS error. I tried using a proxy for webhooks, but it was also unsuccessful. I tried to execute wget from the container https://discord.com , but got a bad address.

What is the error message (if any)?

The DNS server returned an error, perhaps the server is offline

Share the output returned by the last node

The DNS server returned an error, perhaps the server is offline

{
  "errorMessage": "The DNS server returned an error, perhaps the server is offline",
  "errorDetails": {
    "rawErrorMessage": [
      "getaddrinfo EAI_AGAIN webhook.lewisakura.moe"
    ],
    "httpCode": "rejected"
  },
  "n8nDetails": {
    "nodeName": "Discord webhook",
    "nodeType": "n8n-nodes-base.httpRequest",
    "nodeVersion": 4.2,
    "itemIndex": 0,
    "time": "11.06.2024, 14:31:26",
    "n8nVersion": "1.44.1 (Self Hosted)",
    "binaryDataMode": "default",
    "stackTrace": [
      "NodeApiError: The DNS server returned an error, perhaps the server is offline",
      "    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:1620:35)",
      "    at processTicksAndRejections (node:internal/process/task_queues:95:5)",
      "    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:728:19)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:664:51",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1079:20"
    ]
  }
}

Information on your n8n setup

  • n8n version: 1.44.1 (Self Hosted)
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu 22.04

Hi @shandydev

Thanks for posting here and welcome to the community! :tada:

I’m sorry to hear you’re encountering issues with your n8n instance. We have had a few users report issues with webhooks not performing correctly and are currently investigating. We’ll keep you posted on any updates from our side.

To help us, could you provide a simple workflow that demonstrates the behavior you are seeing?

Thanks! :raised_hands:

hello @shandydev

I suppose your docker instance can’t use DNS (maybe it is blocked on the network level/ with firewall or iptables?)

Can you check that the google.com is working fine?

And so, I played around a bit with Docker and dns servers inside containers, everything worked.
Thanks to everyone who helped :slight_smile:

1 Like

Thanks so much @shandydev for the update! :pray: :slight_smile:
Would you be able to share what it was that you had to correct?

Most likely there was some kind of problem with the docker’s internal DNS. I tried to change the DNS in the container to 1.1.1.1 and 8.8.8.8, but it didn’t work either. After canceling these changes and recreating the container (so that the DNS servers in it changed back), everything worked as it should.
The story turned out to be quite stupid :slight_smile: