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

Describe the problem/error/question

Sometimes, my n8n workflow encounters an error: “The DNS server returned an error; perhaps the server is offline.” This occurs randomly, lasting for 30 to 60 minutes before returning to normal without any errors. During the error period, my n8n cannot make any HTTP request.

I host my n8n instance on Vultr and can access it via the domain https://n8n.sample.com. I manage the DNS records for sample.com through Siteground.

How can I resolve this problem? Is it related to Vultr or Siteground? I’ve seen some discussions mentioning Docker DNS Server, but I’m not familiar with it. I would appreciate any guidance on how to fix this issue.

What is the error message (if any)?

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

Information on your n8n setup

  • n8n version: 1.62.6
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system:

Welcome to the community @Kenneth_Cheng !

Tip for sharing information

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

That implies to any JSON output you would like to share with us.

Make sure that you have removed any sensitive information from your workflow and include dummy or pinned data with it!


Your issues sounds somewhat similar to the one discussed in Inconsistent HTTP Request Node Connectivity to Serveo.net URL in n8n. There it turned out to be DNS related too.

What is the actual domain in question?

Thank you for your reply.

I may have found the reason for the issue and a solution. I hope to share my findings here, as they may be useful for other n8n users.

Error Reason
The problem stems from the Vultr server, which uses its own DNS resolvers. You can find more information in the Vultr documentation:

For IPv4, it uses 108.61.10.10 to translate addresses like sample.com to an IP address, such as 123.456.12.89. However, Vultr’s DNS resolvers are not stable and often fail to translate sample.com to an IP address. As a result, the n8n instance cannot reach the API endpoint, as it is unable to locate the IP address.

How to Solve
In the Vultr server console, log in and run the command:

resolvectl status

This should show that the DNS Server in use is 108.61.10.10. To fix the issue, change the DNS Server from 108.61.10.10 to 8.8.8.8 (Google’s DNS resolver).

Open the configuration file with the following command:

sudo nano /etc/systemd/resolved.conf

Then add or edit the following lines:

[Resolve]
DNS=8.8.8.8 8.8.4.4

This will set Google’s DNS as your preferred DNS resolvers. That’s it!

2 Likes

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