keeps rewriting /etc/resolv.conf

Bug #435874 reported by Michael Vogt
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: network-manager

Recently (I can not say when this started during the karmic cycle) network-manager started to rewrite my /etc/resolv.conf with a empty one. This is a regression, this used to work in jaunty. I have a static network config.

ProblemType: Bug
Architecture: amd64
Date: Thu Sep 24 15:05:02 2009
DistroRelease: Ubuntu 9.10
LiveMediaBuild: Ubuntu 9.04 "Jaunty Jackalope" - Release amd64 (20090420.1)
NonfreeKernelModules: nvidia
Package: network-manager (not installed)
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-10.34-generic
SourcePackage: network-manager
Uname: Linux 2.6.31-10-generic x86_64

Michael Vogt (mvo)
tags: added: regression-potential
Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

Please comment wrt status of this issue. Please re-assign/un-assign as appropriate.

Changed in network-manager (Ubuntu):
assignee: nobody → Alexander Sack (asac)
Revision history for this message
Steve Beattie (sbeattie) wrote :

I'm also seeing this; I have static interfaces defined in /etc/network/interfaces, but the network-manager daemon overwrites /etc/resolv.conf, despite it not configuring the interface. This started occurring before the great upstart-ification of the world, because I used to be ableto work around this issue by disabling /etc/init.d/network-manager. Alas, upstart has no way to disable permanently an init script, so the network-manager daemon always starts up when booting and breaks DNS resolution.

Changed in network-manager (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
mannheim (kronheim) wrote :

This bug makes Ubuntu unusable out of the box on any machine that needs to have a static IP address. The only workaround I can find is to remove network-manager from the system entirely. Sorry to rant, and I know this isn't a user forum, but how can the importance of this bug not be "high"?

Revision history for this message
Mekk (marcin-kasperski) wrote :

I faced the same problem after upgrade to 9.10 - empty /etc/resolv.conf after reboot, ifdown eht0 && ifup eth0 resolves the issue.

I googled old bug 31057 which blames resolvconf package and in fact I noticed that I had this package installed. So I removed it and I am just to reboot to check whether it helps.

Revision history for this message
Mekk (marcin-kasperski) wrote :

Yes, it helped.

Revision history for this message
Mekk (marcin-kasperski) wrote :

(and just like the poster of the old bug I can assure that I never installed resolvconf by purpose, some dependency forced it in)

tags: added: regression-release
removed: regression-potential
Revision history for this message
Alexander Sack (asac) wrote :

resolvconf integration is not really perfect. you can check if the latest dailies work from here as we landed some improvements that should prevent NM from breaking resolvconf on shutdown: https://edge.launchpad.net/~network-manager/+archive/trunk

Changed in network-manager (Ubuntu):
assignee: Alexander Sack (asac) → Canonical Desktop Team (canonical-desktop-team)
Revision history for this message
Alexander Sack (asac) wrote :

if trunk doesnt fix it, when this happen, please post output of

 ls -l /etc/resolv.conf

and find -type f /etc/resolvconf

Martin Pitt (pitti)
Changed in network-manager (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
tgr (theguru-999) wrote :

I installed Kubuntu 9.10 and Ubuntu 9.10. Both had no internet connection. I had numerous errors like no repository sources, errors like 'Requested packages are already installed' when they were not present on the box and many other non-related faults. All were caused by lack of a DNS server connection. After a week of trying various things like disabling ipv6 and getting nowhere (although it did fix Firefox), I did an 'apt-get update' and instead of just failing it resolved to 10.0.0.0 (not my dns server or router). I read that this could be something to do with D-Link routers not supporting ipv6. That problem aside, after some more research I found that the 10.0.0.0 problem relates to the /etc/resolv.conf file being overwritten with some of the info from /etc/dhcp3/dhclient.conf. So to fix it....

su {then enter pass}
nano /etc/dhcp3/dhclient.conf

then edit the following line from....
#prepend domain-name-server 127xxx.xxx.xxx.1, xxx.xxx.xxx.2

to....
prepend domain-name-server 111.222.333.444

(where 111.222.333.444 is *your* DNS server)

then save the file and disconnect and reconnect your wlan0 and/or eth0 interface via the network connection icon on the notification bar/panel. When the interface is up the etc/resolv.conf file still gets overwritten and the incorrect nameserver 10.0.0.0 is still there but the correct DNS server is added _before_ it. Thus the internet (and apt-get etc) now works fine :-D

So you could say this problem is solved. It seems this problem is giving *ubuntu 9.10 a bad name. Let's hope the next version resolves this (pun intended ;-)

Regards,
Guru
http://guru.mameworld.info

Revision history for this message
idistech (gary-idistech) wrote :

Very similar symptoms...

when using a 3g card...worked great before ( 9.04 ), since upgrade, I seem to have a 1 in 4 chance of having a nameserver entry in /etc/resolv.conf...

so..
->machine suspended or re connecting after closing connection
->connect ...
-> successful connection ( Connection details all look good )
-> /etc/resolv.conf has one line ( "# Generated by NetworkManager" ), and no nameservers..

Less likely to do it from a cold boot/start
-> drop and reconnect the line will give an entry after 3/4 attempts

Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

Chris, could you please take a look if there is something we should be doing here?

Changed in network-manager (Ubuntu):
assignee: Canonical Desktop Team (canonical-desktop-team) → Chris Coulson (chrisccoulson)
Revision history for this message
idistech (gary-idistech) wrote :

Added Log from syslog, insertion of device through to failure..

Hope it helps

Revision history for this message
idistech (gary-idistech) wrote :

Patched up 9.10, 2.6.31-20-generic #57-Ubuntu SMP

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Steve, Michael,

Are you still seeing this happening? I'm trying to figure out what is causing it... Do you have the 'resolvconf' package installed?

I'll start setting up a 9.10 VM to try and reproduce the issue.

Changed in network-manager (Ubuntu):
assignee: Chris Coulson (chrisccoulson) → Mathieu Trudel (mathieu-tl)
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

idistech,

Could you please confirm whether this is fine in Lucid or so? I think it's been largely covered and corrected with NM 0.8, just want to make sure.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

I'm closing the bug for now , please re open if you can reproduce it with latest version of Ubuntu. Thanks all.

Changed in network-manager (Ubuntu):
assignee: Mathieu Trudel-Lapierre (mathieu-tl) → nobody
status: Incomplete → Invalid
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.