FedoraForum.org - Fedora Support Forums and Community
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2006
    Location
    Sydney, Australia
    Posts
    57

    /etc/resolv.conf missing once NetworkManager is stopped

    Hi Team,

    Found this issue with "/etc/resolv.conf" not found if NetworkManager is stopped.

    Seems /etc/resolv.conf is now a link file to the source file "/var/run/NetworkManager/resolv.conf".

    Can "/etc/resolv.conf" be generated automatically by "/usr/sbin/dhclient-script" once NetworkManager service is stopped ?

    Thanks
    Bharatt

  2. #2
    stevea Guest

    Re: /etc/resolv.conf missing once NetworkManager is stopped

    Sure you could (read the script, I expect it needs a 'RENEW' or similar argument). You can just re-write the resolv.conf file yourself manually - but with NetworkManager (and presumable network.service) down - then how to you expect to configure interfaces or update dhcp after leases expire, or when you change networks ?

    network.service and NetworkManager.service each have distinct methods of configuring interfaces, setting up routes, and setting up resov.conf for dns resolution; then managing dhcp lease renewal. You can also do the whole thing manually - but it lacks flexibility.

  3. #3
    Join Date
    Sep 2016
    Location
    Australia
    Posts
    1

    Thumbs down Re: /etc/resolv.conf missing once NetworkManager is stopped

    Quote Originally Posted by stevea
    Sure you could (read the script, I expect it needs a 'RENEW' or similar argument). You can just re-write the resolv.conf file yourself manually - but with NetworkManager (and presumable network.service) down - then how to you expect to configure interfaces or update dhcp after leases expire, or when you change networks ?

    network.service and NetworkManager.service each have distinct methods of configuring interfaces, setting up routes, and setting up resov.conf for dns resolution; then managing dhcp lease renewal. You can also do the whole thing manually - but it lacks flexibility.
    I downloaded Fedora 24 Server on the weekend and installed it yesterday and ran into this bug.

    Turning off NetworkManager and the network.service being down are two entirely different things. A lot of people (like me and the OP) turn off NetoworkManager - that is why there is an option there to do that. Not everybody needs "nannying" to configure the network.

    I've got to say that is probably the worst bug I have ever seen in a major release of software. Outdoes anything Microsoft has come up with over the years.

    I couldn't believe it when I worked out why DNS was not working.

    /etc/resolv.conf is a symbolic link to a file that doesn't exist.

    It begs the question...why on earth would you move resolv.conf to a different directory? What could possibly be the rationale? /etc/resolv.conf has always been and should always be.

    As a general statement, F24 Server gets 1/10 from me and I will be taking it off first thing tomorrow.

  4. #4
    Join Date
    Aug 2011
    Location
    ~
    Posts
    1,938

    Re: /etc/resolv.conf missing once NetworkManager is stopped

    I find making resolv.conf a symbolic link a very curious move. What's the rationale behind it?

  5. #5
    Join Date
    Mar 2006
    Location
    Sydney, Australia
    Posts
    57

    Re: /etc/resolv.conf missing once NetworkManager is stopped

    Stopped using (legacy) network, and NetworkManager.

    Switched to systemd-networkd.

    Although the condition does not change in the sense that /etc/resolv.conf is still a link file (which needs to be created manually). but points to a difference source file now.

    # ll /etc/resolv.conf
    lrwxrwxrwx. 1 root root 32 Sep 5 19:20 /etc/resolv.conf -> /run/systemd/resolve/resolv.conf

    Thanks all

Similar Threads

  1. NetworkManager and resolv.conf
    By mc_hamster in forum Using Fedora
    Replies: 7
    Last Post: 21st September 2012, 05:02 PM
  2. NetworkManager rewrites resolv.conf
    By Comrad in forum Servers & Networking
    Replies: 11
    Last Post: 6th October 2011, 11:07 PM
  3. NetworkManager and /etc/resolv.conf
    By dpawson in forum Servers & Networking
    Replies: 7
    Last Post: 9th June 2009, 12:31 PM
  4. How to tell NetworkManager not changing my /etc/resolv.conf ?
    By aleph in forum Servers & Networking
    Replies: 6
    Last Post: 24th March 2008, 06:49 AM
  5. NetworkManager resets /etc/resolv.conf
    By dangs in forum Servers & Networking
    Replies: 3
    Last Post: 11th March 2005, 03:56 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •