Bug 440561 - NetworkManager writes empty (nearly) /etc/resolv.conf file
NetworkManager writes empty (nearly) /etc/resolv.conf file
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-04-03 21:19 EDT by Michal Jaegermann
Modified: 2014-09-15 16:55 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-09 01:19:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2008-04-03 21:19:54 EDT
Description of problem:

After plugging in a laptop into a wired network an interface
was configured correctly but "outside world" machines vanished.
Closer investigation revealed that /etc/resolv.conf had
"# generated by NetworkManager, do not edit!" line, and also
"search <some.domain>" line (so something was retrieved from
a DHCP server) but nothing about nameservers.

Unplugging and replugging a network cable forced an interface
reconfiguration and this time /etc/resolv.conf ended up in
a sane shape hence a name resoltion started to work.

Version-Release number of selected component (if applicable):

How reproducible:
so far this was one off event; a race somewhere?
Comment 1 David Timms 2008-04-08 17:05:51 EDT
A more resilient way to approach the dns resolution could be to for
NetworkManager to remember every received or set working dns server, and stick
in the 3x most recent {non-private network 10/8 172/12 192.168.16 ones}. And a
comment note to say why it did that. An empty one is unacceptable ;-)

In my experience, this happens a bit, and I end up with "empty
/etc/resolv.conf". I resolve by adding my isp's dns server in manually {which
often gets nuked next network/power event}, even if I am not at home. 
Comment 2 Michal Jaegermann 2008-04-08 17:40:10 EDT
> In my experience, this happens a bit ...
Hi, David!  I guess I am "lucky" as I was surprised by this event.
Any idea what are circumstances most likely to trigger that?

Sticking into /etc/resolv.conf some last used "non-private" nameserver,
if nothing better showed up, sounds like a hack but it may tide you
over.  If this is a laptop and you travel then this likely will be
a "wrong" one but at least should not leave you without a name resolution.
Likely a forced interface reconfiguration should be tried before that.
Comment 3 Dan Williams 2008-04-10 12:23:55 EDT
When this happens, could you attach the output from /var/log/messages that shows
the DHCP options NetworkManager received from your DHCP server?
Comment 4 Michal Jaegermann 2008-04-10 15:22:07 EDT
It happened to me so far just once so I looked through logs for Apr 3
and I found that incident.  In logs I have:
dhclient: DHCPDISCOVER on eth0 ...
dhclient: DHCPOFFER ....
dhclient: DHCPREQUEST ...
dhclient: DHCPACK ....
as usual.  The only difference is that in following "NetworkManager: <info>"
messages "nameserver" lines are missing.  Maybe some kind of a DHCP server

Apparently David observes that more often so maybe he can find something
out of ordinary?
Comment 5 Dan Williams 2008-04-10 18:45:35 EDT
Yeah, NM prints out what dhclient receives, so if there are missing lines it's
almost certain that the DHCP server didn't send them...  There's a remote
possibility that it's a D-Bus bug, but that particular bug only appears to
happen on slower machines.  If David could report what his logs indicate NM gets
from dhclient that would help narrow it down further.
Comment 6 Bug Zapper 2008-11-26 05:23:40 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 7 Bug Zapper 2009-01-09 01:19:40 EST
Fedora 8 changed to end-of-life (EOL) status on 2009-01-07. Fedora 8 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 8 David Timms 2014-09-15 16:55:03 EDT
Responding to needinfo email of today: I don't have the hardware nor F8 anymore. I don't think I've seen the no dns entry either for a long time.

Note You need to log in before you can comment on or make changes to this bug.