DEV Community

Cover image for [Solved] Ubuntu 22 Temporary failure in name resolution
Prabin Poudel for Truemark Technology

Posted on • Edited on • Originally published at prabinpoudel.com.np

8

[Solved] Ubuntu 22 Temporary failure in name resolution

Background

In one of the client project, we had to upgrade our existing Ubuntu server from the version 20 to 22. Upgrade was smooth but after the upgrade was done, we started noticing the issue of "Temporary failure in name resolution".

When does this error occur?

The "Temporary failure in name resolution" error occurs when the system cannot translate a website name into an IP address. Somehow it got messed up during the upgrade

Fix

To fix the issue, you can hit the following commands; this fix was tested on an upgrade Ubuntu at version 22.04.2

$ apt install netplan.io
$ systemctl unmask systemd-networkd.service
$ systemctl unmask systemd-resolved.service
$ ENABLE_TEST_COMMANDS=1 netplan migrate
$ netplan try

# WARNING: This will immediately log you out of the server and restart it, if you are working with Production server; run with care.
$ reboot

$ apt purge ifupdown resolvconf
$ ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
Enter fullscreen mode Exit fullscreen mode

Tada, and that should fix the issue 🎉

Conclusion

Are there any other solutions you tried and it worked? Let us know in the comments below.

Thanks for reading. Until next time! Happy tinkering.

References:

Image Credits

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more