Temporary Failure in Name Resolution
You might occasionally encounter the error message “temporary failure in name resolution” on your terminal when attempting to ping a website, update a system, or carry out any action that needs a live internet connection.
For instance, you can encounter the following error when attempting to ping a website:
ping google.com arzhost@ubuntu
Ping: Temporary name resolution failure for arzhost.com
This typically occurs when a domain name cannot be resolved into its corresponding IP address by your DNS server. Since you won’t be able to update, upgrade, or even install any software packages on your Linux machine, this could pose a serious difficulty.
We will examine some of the root reasons for the temporary failure in name resolution error in this post, along with potential fixes.
1: An incorrectly configured or missing resolve.conf file
At Linux systems, the resolver configuration file is located in /etc/resolve.conf. It includes the DNS records that your Linux system needs to convert domain names to IP addresses.
Create a file and add the Google public DNS server as specified if this file is absent or present but you are still experiencing name resolution issues.
name server 22.214.171.124
Save the changes and restart the systemd-resolved service as shown.
$ sudo systemctl restart is systemd-resolved. Service
It’s also prudent to check the status of the resolver and ensure that it is active and running as expected:
$ sudo systemctl status systemd-resolved. Service
Then try pinging any website and the issue should be sorted out.
arzhost@ubuntu: ~$ ping google.com
2: Firewall Limitations
In the event that the first option does not work for you, firewall constraints may be keeping you from correctly doing DNS queries. Check your firewall to see if ports 43 (used for Whois search) and 53 (used for DNS – Domain Name Resolution) are open. Open the ports as follows if they are closed:
I: Ubuntu, Debian, and Mint’s UFW firewall
Run the following commands to configure the UFW firewall to open ports 53 and 43:
$ sudo ufw allow 53/tcp
$ sudo ufw allow 43/tcp
$ sudo ufw reload
II: Regarding firewalls (RHEL, CentOS, and Fedora)
Use the following commands on Redhat-based systems, such as CentOS:
$ sudo firewall-cmd --add-port=53/tcp --permanent
$ sudo firewall-cmd --add-port=43/tcp --permanent
$ sudo firewall-cmd --reload
We hope you now have a better understanding of the “Linux temporary failure in name resolution” error and how to quickly and effectively fix it. As always, I really value your input.
People Also Ask
Q#1: How can I Resolve Name Resolution Issues?
8 Techniques for Resolving a DNS Error:
- Restart your device or software. Occasionally, merely closing the browser
- Completely stopping for a few minutes will fix the issue.
- Restart your router or modem.
- Change browsers.
- Stop the Firewall.
- Get Rid of Your Cache.
- Turn off further connections.
- Update everything frequently.
- Verify DNS settings
Q#2: Can the Resolution of a Digital Domain Name Fail?
Each server needs the IP address of a DNS server to which it can send DNS requests. As a result, if DNS servers’ IP addresses are not defined, your server will not be able to translate domain names into IP addresses, which will result in a temporary failure of name resolution.
Q#3: What is a Domain Name Resolution That Fails?
Cisco VPN isn’t functioning properly because of DNS problems, as seen by the VPN connection failing to owe to an unsuccessful domain name resolution error. By fiddling with your DNS settings, you can get around this solution. Additionally, this problem can be resolved by changing the contents of key files.