Score:0

How to fix failing name resolution

ps flag

I have a quite new Kubuntu installation and I messed its name resolution up somehow.

root @ asus-f751s ~ # host www.ecosia.org                                                                                                                  22-12-19 12:05
;; communications error to 127.0.0.1#53: connection refused

root @ asus-f751s ~ :-( # ls -l /etc/resolv.conf                                                                                                           22-12-19 12:20
lrwxrwxrwx 1 root root 27 Dec 19 11:30 /etc/resolv.conf -> /run/resolvconf/resolv.conf
root @ asus-f751s ~ # ls -l /run/resolvconf/resolv.conf                                                                                                    22-12-19 12:20
ls: cannot access '/run/resolvconf/resolv.conf': No such file or directory
root @ asus-f751s ~ :-( # systemctl | grep -Fi resol                                                                                                           22-12-19 12:04
  systemd-resolved.service                                                                 loaded active running   Network Name Resolution

The name resolution daemon seems to be running, as can be seen from the code snipped above. I am not sure whether the resolve status is unsuspicious. The resolv.conf mode is told to be missing, but if that is referring to the file, there is no new information.

root @ asus-f751s ~ :-( # resolvectl status                                                                                                                22-12-19 12:21
Global
       Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: missing

Link 2 (enp2s0f1)
Current Scopes: none
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

Link 3 (wlp3s0)
Current Scopes: DNS
     Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
   DNS Servers: 192.168.2.1 fe80::1%21849
    DNS Domain: speedport.ip

Even the run directory is missing.

root @ asus-f751s ~ # echo "nameserver 192.168.2.1                                                                                                         22-12-19 12:32
nameserver fe80::1%wlp3s0
search speedport.ip" > /run/resolvconf/resolv.conf
zsh: no such file or directory: /run/resolvconf/resolv.conf
root @ asus-f751s ~ :-( # ls -l /run/resolvconf                                                                                                            22-12-19 12:32
ls: cannot access '/run/resolvconf': No such file or directory

I could achieve a temporary fix (after reboot it is gone) by

root @ asus-f751s ~ # mkdir /run/resolvconf                                                                                                            22-12-19 12:32
root @ asus-f751s ~ # echo "nameserver 192.168.2.1                                                                                                         22-12-19 12:33
nameserver fe80::1%wlp3s0
search speedport.ip" > /run/resolvconf/resolv.conf
root @ asus-f751s ~ # host www.ecosia.org                                                                                                                  22-12-19 12:33
www.ecosia.org is an alias for www.ecosia.org.cdn.cloudflare.net.
www.ecosia.org.cdn.cloudflare.net has address 104.18.14.27
www.ecosia.org.cdn.cloudflare.net has address 104.18.15.27
www.ecosia.org.cdn.cloudflare.net has IPv6 address 2606:4700::6812:f1b
www.ecosia.org.cdn.cloudflare.net has IPv6 address 2606:4700::6812:e1b

but I would like to have a permanent fix.

I would be glad if someone enlightened me.

FedKad avatar
cn flag
Please, add more info about your system. Is it a desktop or a (cloud) server? You may be able to add a file like `/etc/systemd/resolved.conf.d/my.conf`. Or do _per-link_ configuration under `/etc/systemd/network/` directory. Or you might be using “netplan”, so you will have to edit files under `/etc/netplan/` directory.
chili555 avatar
cn flag
resolv.conf should point to systemd. Please see: https://askubuntu.com/questions/1150239/run-resolvconf-resolv-conf-ubuntu-18-04/1150294#1150294
Thiemo Kellner avatar
ps flag
@chili555 Thanks for your comment and hint. However, it does not work for me. While your symlink leads to name resolution, it gets replaced with the original symlink on reboot.
Thiemo Kellner avatar
ps flag
@FedKad Thanks for your reply. It is a laptop installation. It sounds interesting. However, I am very much surprised, I need to create a resolv.conf file for this installation, when I did not need to for any other installation. I shall have a look into netplan.
Thiemo Kellner avatar
ps flag
Could not see the problem with netplan/NetworkManager. :-(
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.