/etc/resolv.conf empty after upgrade from Oneiric

Bug #924734 reported by Jean-Baptiste Lallement
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
resolvconf (Ubuntu)
Confirmed
High
Unassigned
Precise
Confirmed
High
Unassigned

Bug Description

After an upgrade of a system from Oneiric to Precise /etc/resolv.conf contains only the lines:
-------
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
-------
and of course unable to do dns resolution

The file is a link to /run/resolvconf/resolv.conf

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: resolvconf 1.63ubuntu6
ProcVersionSignature: Ubuntu 3.2.0-12.20-generic 3.2.2
Uname: Linux 3.2.0-12-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
Date: Wed Feb 1 09:49:56 2012
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: resolvconf
UpgradeStatus: Upgraded to precise on 2012-01-31 (0 days ago)

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
Changed in resolvconf (Ubuntu):
importance: Undecided → High
assignee: nobody → Canonical Foundations Team (canonical-foundations)
description: updated
tags: added: dist-upgrade qa-manual-testing rls-mgr-p-tracking
Revision history for this message
Thomas Hood (jdthood) wrote :

Does #923685 shed any light on the reported behavior?

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/924734

tags: added: iso-testing
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

right, it's the same configuration. Marking as duplicate.

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

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

Changed in resolvconf (Ubuntu):
status: New → Confirmed
Revision history for this message
totya (totya) wrote :

Is resolvconf package really needed for Ubuntu 12.04? There is no resolvconf package on my Ubuntu 11.10 desktop installation. So this is why I'm wondering. May I safely remove it from my system after the the upgrade to Ubuntu 12.04? As I see ubuntu-minimal depends on it.

Revision history for this message
Brian Murray (brian-murray) wrote : Re: [Bug 924734] Re: /etc/resolv.conf empty after upgrade from Oneiric

 assignee None

Changed in resolvconf (Ubuntu):
assignee: Canonical Foundations Team (canonical-foundations) → nobody
Revision history for this message
Steve Langasek (vorlon) wrote :

totya, the resolvconf package is part of a deliberate transition to ensure we have more consistent handling of name server settings in Ubuntu going forward. Removing the package may make things work for you in the short term, but is more likely to result in further local bugs on your system between now and the 12.04 release. To work around any problems you're currently experiencing, it is recommended that you either add your nameservers to /etc/network/interfaces using the 'dns-nameservers' option, or statically configure your preferred nameserver settings in /etc/resolvconf/resolv.conf.d/tail.

Revision history for this message
totya (totya) wrote :

Steve,

Thank you for the detailed answer, which also contains the possible solutions.

Best Regards,
totya

Revision history for this message
Vladimir Wetzel (wetzel) wrote :

We have the same BUG.
We don't use NetworkManager

and we need to get the IP and DNS over DHCP.

Pls don't tell me about static IP and or DNS this is no option for us!

---

Ubuntu 12.04 LTS upgrade from 10.04

Revision history for this message
Thomas Hood (jdthood) wrote :

Vladimir: If /etc/resolv.conf empty after upgrade from Oneiric and you get nameserver addresses via DHCP, run "sudo dpkg-reconfigure resolvconf" and reboot. After this, /etc/resolv.conf should be a symbolic link to "../run/resolvconf/resolv.conf" and resolv.conf should contain lines for the nameserver addresses received from the DHCP server.

Revision history for this message
Vladimir Wetzel (wetzel) wrote :

Hi Thomas,

this is the problem that we have. Dos't work.

ll /etc/resolv.conf
lrwxrwxrwx 1 root root 29 Apr 16 14:41 /etc/resolv.conf -> ../run/resolvconf/resolv.conf

---
DHCP client get all Informations:

cat /run/resolvconf/interface/eth0.dhclient
domain XXX-local.XX
nameserver 192.168.30.10
nameserver 172.16.10.1
---
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

Tempsolution is:

stop resolvconf
resolvconf --wipe-runtime-directories
start resolvconf
dhclient

but after Reboot is /etc/resolv.conf empty

unacceptable solution :)

Revision history for this message
Vladimir Wetzel (wetzel) wrote :

After Restart:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
search XXX-local.XX

Revision history for this message
Thomas Hood (jdthood) wrote :

Hi Vladimir,

Your problem is probably different from the one originally reported, which the submitter agreed was the same as bug #923685.

What you are describing appears to be a bug in resolvconf. Resolvconf writes file /run/resolvconf/interface/eth0.dhclient which appears to contain valid data but it doesn't generate resolv.conf correctly from this. This behavior sounds similar to resolvconf's misbehavior before it was fixed up for the Ubuntu 12.04 release. What version of resolvconf do you have?

If it isn't too much trouble, please use the apport-bug utility to create a new bug report including more information about your system.

Revision history for this message
Thomas Hood (jdthood) wrote :

I wrote comment #14 before seeing your comment #13. In comment #13 you show that after reboot resolv.conf is not empty. Good. What resolv.conf contains is "nameserver 127.0.0.1". That is correct, assuming you are running a local forwarding nameserver, which is generally dnsmasq — either the NetworkManager-controlled instance of dnsmasq (which listens at 127.0.0.1 in Ubuntu 12.04 but at 127.0.1.1 in 12.10) or the "server" dnsmasq instance started by the "dnsmasq" package (which by default listens at 127.0.0.1 and at all other IP addresses on local network interfaces).

Perhaps dnsmasq is not working properly on your machine. See if the following helps. First, if you are not using the dnsmasq server and the "dnsmasq" package is installed then "sudo apt-get purge dnsmasq". Second, if the "network-manager" package is installed, "sudo gedit /etc/NetworkManager/NetworkManager.conf" and comment out the line "dns=dnsmasq" (but a '#' at the beginning of the line), then save and "sudo service network-manager restart". After this, remote nameserver addresses should appear in resolv.conf and the glibc resolver will contact those external addresses instead of the local forwarding nameserver.

Revision history for this message
Vladimir Wetzel (wetzel) wrote :

I've done this stept last week .
dnsmasq and NetworkManager was purged. Sorry but no chance :'(

I'll create a new BUG-Report

Revision history for this message
Vladimir Wetzel (wetzel) wrote :

btw. dpkg -l|grep resolvc
ii resolvconf 1.63ubuntu16 name server information handler

Revision history for this message
Thomas Hood (jdthood) wrote :

Vladimir, in your new bug report please include the output of the following commands.

ls -l /etc/resolv.conf
ls -l /etc/resolvconf/resolv.conf.d
for F in /etc/resolvconf/resolv.conf.d/* ; do echo === $F === ; cat $F ; done
ls -l /run/resolvconf
ls -l /run/resolvconf/interface
for F in /run/resolvconf/interface/* ; do echo === $F === ; cat $F ; done

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.