Failed to start systemd-resolved.service . systemd-resolved.service: Failed with result 'resources'. [1]: Failed to start Network Name Resolution

Main Issue is:

# systemctl status systemd-resolved.service
systemd-resolved.service -
Network Name Resolution Loaded: loaded (/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
Active: failed (Result: resources) since Wed 2021-05-19 11:15:15 UTC; 23s ago
Docs: man:systemd-resolved.service(8)
May 19 11:15:15 kv-server systemd[1]: systemd-resolved.service: Service has no hold-off time, scheduling restart.
May 19 11:15:15 kv-server systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 5.
May 19 11:15:15 kv-server systemd[1]: Stopped Network Name Resolution.
May 19 11:15:15 kv-server systemd[1]: systemd-resolved.service: Start request repeated too quickly.
May 19 11:15:15 kv-server systemd[1]: systemd-resolved.service: Failed with result 'resources'.
May 19 11:15:15 kv-server systemd[1]: Failed to start Network Name Resolution.

This issue was something which I landed up by doing the below steps:

apt-get update was failing. I started by following the answer of

This explained the issue and pointed fault towards DNS.

To configure dns servers, I followed .

I also did # chattr +i /etc/resolv.conf so that resolv.conf doesn't get updated by DHCP

I tried # ping google.com but it still failed.

I observed a bad symlink /etc/resolv.conf -> /run/systemd/resolve/stub-resolve.confSo I tried to access /run/systemd/resolve/stub-resolve.conf

Got an error that there is no directory /run/systemd/resolve

So I followed and got to know that systemd-resolved.service was not running.

Error I got was

# systemctl enable --now systemd-resolved.service
Job for systemd-resolved.service failed because of unavailable resources or another system error.
See "systemctl status systemd-resolved.service" and "journalctl -xe" for details.

As I tried to do start that, I ran into the main issue.

So Network Name Resolution is unable to start.

1 Answer

I am a novice contributor. Would like suggetions to improve the answer !!

Although a lot of errors are raised by #systemctl status systemd-resolved.serviceThe main issue was resources.

This issue was caused by the absence of tmp directory in var

i.e. /var/tmp/ was absent.

Solution:

mkdir /var/tmp
chmod 777 /var/tmp

777 permission is a bad practice for webservers as it gives read/write access to every user. So please use it accordingly

Then to start the service, I performed:

systemctl enable --now systemd-resolved.service

Then, ping google.com gives successful result.

Solution was inspired from

PS: For other errors:

May 19 11:15:15 kv-server systemd[1]: systemd-resolved.service: Service has no hold-off time, scheduling restart.
May 19 11:15:15 kv-server systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 5.

You can view

For good resources on systemd-resolved name resolution view:

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like