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) https://www.freedesktop.org/wiki/Software/systemd/resolved https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients May 19 11:15:15 kv-server systemd: systemd-resolved.service: Service has no hold-off time, scheduling restart. May 19 11:15:15 kv-server systemd: systemd-resolved.service: Scheduled restart job, restart counter is at 5. May 19 11:15:15 kv-server systemd: Stopped Network Name Resolution. May 19 11:15:15 kv-server systemd: systemd-resolved.service: Start request repeated too quickly. May 19 11:15:15 kv-server systemd: systemd-resolved.service: Failed with result 'resources'. May 19 11:15:15 kv-server systemd: 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 https://askubuntu.com/a/91590/1042537
This explained the issue and pointed fault towards DNS.
To configure dns servers, I followed https://stackoverflow.com/a/54460886/14950576 .
I also did
# chattr +i /etc/resolv.conf so that resolv.conf doesn't get updated by DHCP
# ping google.com but it still failed.
I observed a bad symlink
/etc/resolv.conf -> /run/systemd/resolve/stub-resolve.conf
So I tried to access
Got an error that there is no directory
So I followed https://unix.stackexchange.com/a/613143 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.