Results 1 to 10 of 10

Thread: dnsmasq "Address already in use"

  1. #1
    Join Date
    Apr 2007
    Location
    Eastern USA
    Beans
    416
    Distro
    Ubuntu

    dnsmasq "Address already in use"

    I have a squid and apt-cacher running on a transparent server, and I'm trying to set up net booting.

    I'm following the guide: https://help.ubuntu.com/community/Installation/Netboot

    Unfortunately, when I tried to start dnsmasq, I got the error:
    Code:
    dnsmasq: failed to create listening socket: Address already in use
    Following internet advice, I tried:
    Code:
    root@kimende-s:~# netstat -anlp | grep -w LISTEN
    and found that dnsmasq was listed even though it was throwing this error.

    So I decided to purge it.

    After purging (and then restarting, to try and clear any problems) I noticed that it was still listed:
    Code:
    root@kimende-s:~# netstat -anlp | grep -w LISTEN
    tcp        0      0 0.0.0.0:3142            0.0.0.0:*               LISTEN      2388/perl
    tcp        0      0 10.42.43.1:53           0.0.0.0:*               LISTEN      4489/dnsmasq
    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2375/sshd
    tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      2723/cupsd
    tcp        0      0 0.0.0.0:3128            0.0.0.0:*               LISTEN      2655/(squid)
    tcp6       0      0 :::22                   :::*                    LISTEN      2375/sshd
    tcp6       0      0 ::1:631                 :::*                    LISTEN      2723/cupsd
    Does anyone know why it's still listed even though it's uninstalled?
    Last time I was having problems with named...

    This is a brand new install... only changes were those mentioned: installing squid and apt-cacher.

    Note: I'm using Network Manager as my router. I think this comes with named? I'm not sure...

  2. #2
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: dnsmasq "Address already in use"

    Someone or something probably started it without using the init scripts.
    Code:
    sudo ps -f -p 4489
    sudo kill 4489

  3. #3
    Join Date
    Apr 2007
    Location
    Eastern USA
    Beans
    416
    Distro
    Ubuntu

    Re: dnsmasq "Address already in use"

    ok. So as soon as I killed it, the eth0 connection died.

    It seems Network Manager running a "dnsmasq" program (even though dnsmasq isn't installed) on port 53 for my "shared to other computer" eth0 connection.

    Is there any easy way to use NetworkManager along with a netbooting server?


    I'd rather not drop NetworkManager as it's handling my ppp connections...

  4. #4
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: dnsmasq "Address already in use"

    /usr/sbin/dnsmasq is provided by dnsmasq-base which is a dependency of network-manager.

  5. #5
    Join Date
    Apr 2007
    Location
    Eastern USA
    Beans
    416
    Distro
    Ubuntu

    Re: dnsmasq "Address already in use"

    huh. so it seems that I don't need dnsmasq, just dnsmasq-base

    However, the configuration isn't provided with dnsmasq-base, so I installed dnsmasq, just for the config to finish the walkthrough.

    That's rather messy...

    Edit:
    I just noticed that when I turn on my computer, with dnsmasq installed, dnsmasq successfully starts, so when network manager wants to run it's own version, it fails.
    To fix this, I ran:
    Code:
    chmod -x /etc/init.d/dnsmasq
    Now dnsmasq will only start with network manager and will still use the config.

    It's possible that uninstalling the package will work (but not purging) but I'll stick to this.
    Last edited by cong06; May 6th, 2010 at 07:30 AM.

  6. #6
    Join Date
    Jun 2006
    Beans
    28

    Re: dnsmasq "Address already in use"

    Great to find this thread! I uninstalled dnsmasq and sure enough, the /etc/dnsmasq.d directory disappears. But, there is still the /etc/dnsmasq.conf which is enough.

  7. #7
    Join Date
    Jun 2012
    Beans
    2

    Re: dnsmasq "Address already in use"

    I got around this by replacing dnsmasq-base with dnsmasq. Because of dependencies on it, I did the following:
    1. sudo apt-get remove dnsmasq-base (this removes network manager...)
    2. sudo apt-get install dnsmasq
    3. sudo apt-get install network-manager network-manager-gnome

  8. #8
    Join Date
    Apr 2007
    Location
    Eastern USA
    Beans
    416
    Distro
    Ubuntu

    Re: dnsmasq "Address already in use"

    Quote Originally Posted by mpd2 View Post
    I got around this by replacing dnsmasq-base with dnsmasq. Because of dependencies on it, I did the following:
    1. sudo apt-get remove dnsmasq-base (this removes network manager...)
    2. sudo apt-get install dnsmasq
    3. sudo apt-get install network-manager network-manager-gnome
    One liner:
    Code:
    sudo aptitude install dnsmasq dnsmasq-base-
    It should take less time this way, and be less likely to remove files you want. You'll need to `sudo apt-get install aptitude` though.

    The minus at the end of dnsmasq-base tells it to remove, instead of installing. this is the same:
    Code:
    sudo aptitude remove dnsmasq+ dnsmasq-base

  9. #9
    Join Date
    Jun 2012
    Beans
    2

    Re: dnsmasq "Address already in use"

    Thanks for pointing that out, cong06.

  10. #10
    Join Date
    Dec 2010
    Beans
    Hidden!

    Re: dnsmasq "Address already in use"

    Old thread closed.


    404

Bookmarks

Posting Permissions

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