resolv.conf symlink is broken

Bug #1872015 reported by Nicolas Penin
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

see description here: https://askubuntu.com/a/1041631/436647

*The Default*

$ ls -l /etc/resolv.conf

lrwxrwxrwx 1 root root 39 Apr 26 12:07 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

I deleted this and pointed to the correct file. After rebooting, this solved my issue. And I was even able to switch networks on my laptop and the DNS switched correctly. Of course when on external networks I can't resolve any of my local machines but that is expected. As soon as I switch back to my local network, all the local machines resolve correctly because my router is the DNS.

-------------------------------------
*The Fix*

$ sudo rm -f /etc/resolv.conf
$ sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
$ ls -l /etc/resolv.conf

lrwxrwxrwx 1 root root 32 May 29 08:48 /etc/resolv.conf -> /run/systemd/resolve/resolv.conf

$ sudo reboot

ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: systemd 242-7ubuntu3
ProcVersionSignature: Ubuntu 5.3.0-18.19-generic 5.3.1
Uname: Linux 5.3.0-18-generic x86_64
ApportVersion: 2.20.11-0ubuntu8
Architecture: amd64
Date: Fri Apr 10 07:04:17 2020
InstallationDate: Installed on 2020-04-09 (0 days ago)
InstallationMedia: Ubuntu-Server 19.10 "Eoan Ermine" - Release amd64 (20191017)
MachineType: HP ProLiant MicroServer Gen8
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.3.0-18-generic root=UUID=2351ab04-e595-4761-ad9d-d2d5975d1b08 ro maybe-ubiquity
SourcePackage: systemd
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 06/06/2014
dmi.bios.vendor: HP
dmi.bios.version: J06
dmi.chassis.type: 7
dmi.chassis.vendor: HP
dmi.modalias: dmi:bvnHP:bvrJ06:bd06/06/2014:svnHP:pnProLiantMicroServerGen8:pvr:cvnHP:ct7:cvr:
dmi.product.family: ProLiant
dmi.product.name: ProLiant MicroServer Gen8
dmi.product.sku: 712317-421
dmi.sys.vendor: HP
mtime.conffile..etc.systemd.resolved.conf: 2020-04-10T06:39:38.172640

Revision history for this message
Nicolas Penin (neonp) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
Revision history for this message
Heehoon Kim (csehydrogen) wrote :

I came across this bug while investigating cause of DNS error. In my case, /etc/resolv.conf was pointing another file.

$ ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 29 Jul 23 15:43 /etc/resolv.conf -> ../run/resolvconf/resolv.conf

After making it point to /run/systemd/resolve/resolv.conf, everything works now.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers