How to address the issue: failed to start Network Name Resolution
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to address the issue: failed to start Network Name Resolution
Hello,
I am setting up the wifi for a customized Linux image. It uses systemd to manage network.
Right now, I am able to config the ip address and ping 8.8.8.8, but get "bad address" when ping google.ca.
It is because that the systemd-resolved service failed to start.
systemctl status shows below info:
Active: failed (Result: exit-code)
Process: 254 ExecStart=/lib/systemd/systemd-resolved (code=exited, status=226/NAMESPACE).
Main PID: 255 (code=exited, status=226/NAMESPACE)
journalctl shows below info:
systemd-resolved.service: Failed to set up mount namespacing: /run/systemd/unit-root/dev: No such file or directory
systemd-resolved.service: Failed at step NAMESPACE spawning /lib/systemd/systemd-resolved: No such file or directory
I guess the issue is that the files required for systemd-resolved to execute successfully are not there.
But by googling I couldn't find how to set up there two files and how systemd-resolved sets up the name server.
Has tried to configure the name server in /etc/systemd/resolved.conf, /etc/systemd/resolved.conf.d/dns.conf and /run/systemd/resolve/resolv.conf. None of them works.
Setting DNS servers
Tip: To check the DNS currently in use by systemd-resolved, run resolvectl status.
Automatically
systemd-resolved will work out of the box with a network manager using /etc/resolv.conf. No particular configuration is required since systemd-resolved will be detected by following the /etc/resolv.conf symlink. This is going to be the case with systemd-networkd, NetworkManager, and iwd.
However, if the DHCP and VPN clients use the resolvconf program to set name servers and search domains (see openresolv#Users for a list of software that use resolvconf), the additional package systemd-resolvconf is needed to provide the /usr/bin/resolvconf symlink.
dmesg shows below failure:
Failed to start Remount Root and Kernel File Systems. ->occurs once and obviously the RootFS is mounted.
Failed to start Network Name Resolution. -> multiple times
Failed to start Network Time Synchronization. -> multiple times
use systemctl to check their statues.
systemd-resolved status is failed.
systemd-timesyncd status is failed.
Wanted to try something. But, have no idea why the file /etc/systemd/network/20-wireless-dynamic.network and /etc/wpa_supplicant/wpa_supplicant-wlan0.conf are gone.
Add the files back, and even the IP address for wlan0 is not set any more.
Find the typo when adding /etc/wpa_supplicant/wpa_supplicant-wlan0.conf. Fixed and get the wlan0 ip set again. Continue to address the name resolution issue.
To check the DNS currently in use by systemd-resolved, run resolvectl status.
Run resolvectl status and it shows below info:
FAiled to get global data. Failed to activate service 'org.freedesktop.resolve1': timed out (service_start_timeout=25000ms)
Quote:
Automatically systemd-resolved will work out of the box with a network manager using /etc/resolv.conf. No particular configuration is required since systemd-resolved will be detected by following the /etc/resolv.conf symlink. This is going to be the case with systemd-networkd, NetworkManager, and iwd.
/etc/resolv.conf is a link file. It eventually links to /run/systemd/resolve/resolv.conf. Tried to add name server configuration in that file and it didn't work.
Quote:
However, if the DHCP and VPN clients use the resolvconf program to set name servers and search domains (see openresolv#Users for a list of software that use resolvconf), the additional package systemd-resolvconf is needed to provide the /usr/bin/resolvconf symlink.
Wondering how to add /usr/bin/resolvconf symlink and if it make sense to add a symlink in a bin folder.
How to address the issue: failed to start Network Name Resolution?
Tried to add below to configure DNS and separate lines and change port number. None of them work.
1) DNS=8.8.8.8 8.8.4.4
2) DNS=8.8.8.8:9953%wlan0 8.8.4.4:9953%wlan0
Not sure if it is really accurate. But haven't find any reference.
Basically there are two places to configure DNS server:
1) /etc/systemd/resolved.conf
2) /etc/systemd/resolved.conf.d/dns.conf
Also tried to add directly in /etc/systemd/network/20-wireless-dynamic.network.
And tried to add fallbackDNS in /etc/systemd/resolved.conf.
None of them work.
And the status of systemd-resolved is always "code-exited, status=226/NAMESPACE". Didn't find anything relevant to this error.
And the "resolvectl status" shows the error: Failed to activate service 'org.freedesktop.resolve1": timeout out.
root@farview-rpi3:~# systemctl status systemd-remount-fs -l
x systemd-remount-fs.service - Remount Root and Kernel File Systems
Loaded: loaded (/lib/systemd/system/systemd-remount-fs.service; enabled-runtime; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2022-04-28 17:42:28 UTC; 25min ago
Docs: man:systemd-remount-fs.service(8) https://www.freedesktop.org/wiki/Sof...APIFileSystems
Process: 130 ExecStart=/lib/systemd/systemd-remount-fs (code=exited, status=1/FAILURE)
Main PID: 130 (code=exited, status=1/FAILURE)
Apr 28 17:42:28 farview-rpi3 systemd[1]: Starting Remount Root and Kernel File Systems...
Apr 28 17:42:28 farview-rpi3 systemd-remount-fs[133]: mount: /dev/pts: mount point not mounted or bad option.
Apr 28 17:42:28 farview-rpi3 systemd-remount-fs[130]: /bin/mount for /dev/pts exited with exit status 32.
Apr 28 17:42:28 farview-rpi3 systemd[1]: systemd-remount-fs.service: Main process exited, code=exited, status=1/FAILURE
Apr 28 17:42:28 farview-rpi3 systemd[1]: systemd-remount-fs.service: Failed with result 'exit-code'.
Apr 28 17:42:28 farview-rpi3 systemd[1]: Failed to start Remount Root and Kernel File Systems.
root@farview-rpi3:~#
Are they possibly caused by anything missing in kernel config?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.