dnsmasq breaks apt-get



  • Hi guys,

    This could just be a random issue that I am having, but so far on both Ubuntu 12.04 and Ubuntu 14.04 the moment I install dnsmasq apt-get breaks.

    root@fog:~# apt-get update
    Err http://security.ubuntu.com precise-security Release.gpg
      Temporary failure resolving 'security.ubuntu.com'
    Err http://us.archive.ubuntu.com precise Release.gpg
      Temporary failure resolving 'us.archive.ubuntu.com'
    Err http://us.archive.ubuntu.com precise-updates Release.gpg
      Temporary failure resolving 'us.archive.ubuntu.com'
    Err http://us.archive.ubuntu.com precise-backports Release.gpg
      Temporary failure resolving 'us.archive.ubuntu.com'
    Reading package lists... Done
    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg  Temporary failure resolving 'us.archive.ubuntu.com'
    
    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg  Temporary failure resolving 'us.archive.ubuntu.com'
    
    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/Release.gpg  Temporary failure resolving 'us.archive.ubuntu.com'
    
    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg  Temporary failure resolving 'security.ubuntu.com'
    
    W: Some index files failed to download. They have been ignored, or old ones used instead.
    

    I tried an older version of dnsmasq, but the issue is still present. Has anyone else seen this issue or know of a work around?

    Note: I know it’s the dnsmasq service, because if I stop the service apt-get works fine.


  • Testers

    If you want to make it so you don’t have to comment out port=0 then you can fix this by fixing the resolvconf missing dns server issue.

    See this old post for a ton of detail…
    https://forums.fogproject.org/topic/2799/dnsmasq-kills-dns-lookup-on-fog-server/6
    I know I’ve posted it in a more readable form more recently, but found that one first.

    TL:DR
    just edit the interface-order at /etc/resolvconf/interface-order to have your main ethernet adapter at the top and be sure to have nameserver lines defined in your static ip definitions if not using dhcp.



  • Commenting out port=0 in /etc/dnsmasq.d/ltsp.conf worked for me when I had this issue. Yay!


  • Senior Developer

    Solved this thread as port=0 being commented fixes this for you.


  • Moderator

    @Dalton-Childers The way I understand it is - that line tells dnsmasq to function as DNS - and when it’s not configured properly for DNS then it doesn’t work. You have to have your router address and default search domains set properly for it to work, along with server DNS addresses.

    I’ve ran the port=0 at home for a long while without issues - then one day I had an issue (no idea why) and Tom commented out that line and it started working again… I’m sure I changed or screwed up something somewhere but, I wouldn’t know where - that was a GOOD while back!



  • @Wayne-Workman said:

    This sometimes happens - in your ltsp.conf file, comment out the port=0 line and then restart dnsmasq and then try apt-get again.

    Let us know what happens, we are here to help.

    I managed to get apt-get working again by following your suggestion to comment out “port=0”.

    Steps:
    Comment out "port=0"
    rm /var/lib/apt/lists/* -vf
    apt-get update

    Is there a reason why “port=0” break apt-get update?


  • Moderator

    This sometimes happens - in your ltsp.conf file, comment out the port=0 line and then restart dnsmasq and then try apt-get again.

    Let us know what happens, we are here to help.


Log in to reply
 

469
Online

39.4k
Users

11.1k
Topics

105.3k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.