Unix Technical Forum

Slack 11 'dnsmasq: failed to create listening socket: Address already in use

This is a discussion on Slack 11 'dnsmasq: failed to create listening socket: Address already in use within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 01 Nov 2006 01:21:20 GMT, Rich Grise wrote: > While booting ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 02-20-2008, 07:41 PM
Bradley Reed
 
Posts: n/a
Default Re: Slack 11 'dnsmasq: failed to create listening socket: Address already in use

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 01 Nov 2006 01:21:20 GMT, Rich Grise wrote:
> While booting my brand new 11.0 system on the brand new box, I get this
> message:
>
> dnsmasq: failed to create listening socket: Address already in use
>


I have got similar errors in the past when I screwed up permissions
on /tmp. Seems strange, but fixing perms in /tmp always did away
with the errors. My errors were always in the form:

bind: (something...) : Address already in use.

so it may be a different problem.

Brad



-----BEGIN PGP SIGNATURE-----

iD4DBQFFSQkikDp4KjYna1ARAmaBAKCV224gh5xu5592U0rPuN qwWngXnQCYmHzN
FIMLyKukFESp/NiIVWRJXw==
=AS03
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 02-20-2008, 07:41 PM
Old Man
 
Posts: n/a
Default Re: Slack 11 'dnsmasq: failed to create listening socket: Address already in use

Rich Grise wrote:

> Actually, I'm "interested" in using whatever Patrick recommends, since
> he's so much better at getting this stuff right than I am.
>


Guessing here, but guessing that you're running both dhcpd and dnsmasq.
That would explain the error, dnsmasq would complain that it cannot listen
for dhcp requests because dhcpd had already grabbed the port. You _can_
use dhcpd to hand out addresses and dnsmasq to hand out names (if you
disable dhcp in dnsmasq.conf), but I'm guessing you already have bind
handing out names. I'm guessing that you have had a working network with
bind and dhcpd, and without dnsmasq. I'm guessing that rc.dnsmasq being
executable is something new, and it's stepping on your network
configuration.

--
Old Man

"I could be wrong again
I remember once in August 1993
I was wrong, and I could be wrong again" - Paul Simon
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 02-20-2008, 07:41 PM
Rich Grise
 
Posts: n/a
Default Re: Slack 11 'dnsmasq: failed to create listening socket: Address already in use

On Wed, 01 Nov 2006 13:17:29 -0600, notbob wrote:

> On 2006-11-01, Rich Grise <rich@example.net> wrote:
>
>> But I will be perusing man dnsmasq.

>
> You might rather peruse the setup and doc files in your system from
> your browser:
>
> file:///usr/doc/dnsmasq-2.20/doc.html
> file:///usr/doc/dnsmasq-2.20/setup.html
>
> Also, I don't get your network at all. You say:
>
> "Anyway, on the new box, which I'll call "new box", eth0 plugs into the
> LAN, and I've got the lab box ("lab box") connected to eth1, with DHCP
> working between the two."
>
> Just what is your LAN? A network behind a router? And you say the "lab box"
> is connected to eth1, right? Is that eth1 of the "new box"? If so, this
> means "lab box" is not connected directly to your LAN and "new box" is
> the gateway between your LAN and "lab box", right? Or, am I missing
> something?
>
> I'll stop here and let you reply. I'm already confused enough.
>
> nb


OK, I've got 3 boxes in a row. I've got ADSL coming into what I've called
the LAN box - it's basically acting like a router. It gets its DHCP
address from my ISP, on its eth0, at www.abiengr.com .

It serves the rest of the boxes in the "LAN" from its eth1, which is set
to 10.0.0.1, and runs dhcpd.

So, I've plugged the "NEW" computer into the LAN at 10.0.0.1, and it gets
a DHCP address of 10.0.0.183 from the "LAN box", just the same as all of
the rest of the computers on the LAN get their addys by DHCP.

Now, I want to make the "NEW box" act like it's a server, in other words,
route 10.0.0.183 to 10.1.0.x; I've set eth1 to 10.1.0.1 in rc.inet1.conf,
as well as DHCP for eth0.

Now, the lab box is a spare, which I plug its eth0 into eth1 of the "NEW
box", and it's supposed to use dhcpcd.

But it seems there's a conflict in the NEW box between DHCP and IP
masqureading worked since Slack 10 to Slack 11; but sincerely, thanks
for those two links ... just a sec... it seems I have 2.23, but I've
got something to go by now.

Thanks!
Rich


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 02-20-2008, 07:41 PM
Old Man
 
Posts: n/a
Default Re: Slack 11 'dnsmasq: failed to create listening socket: Address already in use

Rich Grise wrote:

>
> But, I've never used dnsmasq before - I've always (9.0, 9.1, 10.0, 10.2)
> copied the "IP Masquerading" script from the HOWTO, which invokes
> iptables.


Don't be confused by the "masq" in dnsmasq. It does not perform the
same "ip masquerading" function that iptables performs. It does dns and,
optionally, dhcp. I think it is called dnsmasq because it is well suited
to small, private "ip masquerading" networks, providing dynamic addresses
and names to machines on the private network.

If, I'm being pedantic or telling you stuff you already get, I'll gladly
apologize.

--
Old Man

"I could be wrong again
I remember once in August 1993
I was wrong, and I could be wrong again" - Paul Simon
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 02-20-2008, 07:41 PM
Rich Grise
 
Posts: n/a
Default Re: Slack 11 'dnsmasq: failed to create listening socket: Address already in use

On Wed, 01 Nov 2006 13:17:29 -0600, notbob wrote:

> On 2006-11-01, Rich Grise <rich@example.net> wrote:
>
>> But I will be perusing man dnsmasq.

>
> You might rather peruse the setup and doc files in your system from
> your browser:
>
> file:///usr/doc/dnsmasq-2.20/doc.html
> file:///usr/doc/dnsmasq-2.20/setup.html


OK, I've got these, and there the same ones i've found about three times
in various places, and I just have this snag:

in /usr/doc/dnsmasq-2.23/setup.html it says (in part):

"Configuration.
Configuration for dnsmasq is pretty simple in almost all cases. The
program has collected a fair few options as it has developed but most
of them are not needed most of the time. A machine which already has a
DNS configuration (ie one or more external nameservers in
/etc/resolv.conf and any local hosts in /etc/hosts)"


here's the "New Box"'s resolv.conf:
---------------------------
# cat resolv.conf
# Generated by dhcpcd for interface eth0
search dsl-verizon.net
nameserver 10.0.0.1
nameserver 4.2.2.4
nameserver 4.2.2.5
root@ABIServer:/etc
#
---------------------------
and /etc/hosts:
root@ABIServer:/etc
# cat hosts
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server. Just add the names, addresses
# and any aliases to this file...
#
# By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
# should NEVER be named with the name of the machine. It causes problems
# for some (stupid) programs, irc and reputedly talk. :^)
#

# For loopbacking.
127.0.0.1 localhost
127.0.0.1 ABIServer.ops.dsl-verizon.net ABIServer

# End of hosts.
----------------------------
So, I've got that so far - but that "generated by dhcpcd" kind of worries
me; the docs continue:

...can be turned into a nameserver simply
by running dnsmasq, with no options or configuration at all. Set the IP
address of the machine running dnsmasq as the DNS server in all the other
machines on your network, and you're done.

And when I try to just let it start, I get that error message,
dnsmasq: failed to create listening socket: Address already in use

Do I put "Use Dhcp="no" in rc.inet1.conf, or something, i.e., is dnsmasq
taking over dhcpcd now, or what?

Thanks,
Rich

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 02-20-2008, 07:41 PM
Sylvain Robitaille
 
Posts: n/a
Default Re: Slack 11 'dnsmasq: failed to create listening socket: Address already in use

Rich Grise wrote:

> Now, I want to make the "NEW box" act like it's a server, in other words,
> route 10.0.0.183 to 10.1.0.x;


I don't understand the connection between "act like it's a server" and
"route 10.0.0.183 to 10.1.0.x". Is this a server or a router?

> But it seems there's a conflict in the NEW box between DHCP and IP
> masqureading worked since Slack 10 to Slack 11; ...


My guess is that you don't have ip-forwarding enabled in "NEW box", but
I don't think I understand what you're trying to do. I'm kind of stuck
on what you might mean by "act like it's a server" ... A "server of
what, exactly?"

--
----------------------------------------------------------------------
Sylvain Robitaille syl@alcor.concordia.ca

Systems and Network analyst Concordia University
Instructional & Information Technology Montreal, Quebec, Canada
----------------------------------------------------------------------
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 02-20-2008, 07:41 PM
notbob
 
Posts: n/a
Default Re: Slack 11 'dnsmasq: failed to create listening socket: Address already in use

On 2006-11-01, Rich Grise <rich@example.net> wrote:


> OK, I've got 3 boxes in a row.


Sounds like what you have is a LAN behind the "lan box" and another
LAN behind the "new box". Why? What's the point? Here's what I'd
do:

Get a cheap hub or switch and put it into eth1 of the "lan box" and
connect eth0 of the "new box" and eth0 of "the lab" box to the hub or
switch. Run either dhcpd or dnsmasq (not both) from the "lan box" and
let "new" and "lab" get their ip from "lan". Set up any server you
want to run on "new".

If you are purposely trying to run a LAN within a LAN, then go for it.
Just do on LAN 2 what you did on LAN 1 (iptables, dhcpd, etc).

nb
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 02-20-2008, 07:41 PM
Singh
 
Posts: n/a
Default Re: Slack 11 'dnsmasq: failed to create listening socket: Address already in use

Rich Grise wrote:


(...)

> root@ABIServer:/etc
> # cat hosts


(...)

> # By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
> # should NEVER be named with the name of the machine. It causes problems
> # for some (stupid) programs, irc and reputedly talk. :^)
> #
>
> # For loopbacking.
> 127.0.0.1 localhost
> 127.0.0.1 ABIServer.ops.dsl-verizon.net ABIServer


Hehe... Change the last 127.0.0.1 to the proper IP of 'ABIServer'.


> And when I try to just let it start, I get that error message,
> dnsmasq: failed to create listening socket: Address already in use


Check that your /etc/rc.d/rc.bind is set _not_ to start.
"Address already in use" means that another resolver (eg Bind/named)
is already running on port 53...

/etc/rc.d/rc.bind stop


:^)


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 02-20-2008, 07:42 PM
Rich Grise
 
Posts: n/a
Default Re: Slack 11 'dnsmasq: failed to create listening socket: Address already in use

On Thu, 02 Nov 2006 14:05:46 +0100, Singh wrote:
> Rich Grise wrote:
>> [echo /etc/hosts]
>> # For loopbacking.
>> 127.0.0.1 localhost
>> 127.0.0.1 ABIServer.ops.dsl-verizon.net ABIServer

>
> Hehe... Change the last 127.0.0.1 to the proper IP of 'ABIServer'.


I can do that, but I'd read somewhere that that can cause sendmail
to hang, or something, and it's not a static IP, albeit _its_ DHCP
server usually issues the same address every time -
I'm gonna try that next

>> And when I try to just let it start, I get that error message,
>> dnsmasq: failed to create listening socket: Address already in use

>
> Check that your /etc/rc.d/rc.bind is set _not_ to start.
> "Address already in use" means that another resolver (eg Bind/named)
> is already running on port 53...
>
> /etc/rc.d/rc.bind stop


Ahhhh!

I did chmod 644 rc.bind, and the error message went away, it gets its
DHCP address, and serves up DHCP to the lab box that's plugged into
its eth1. I find this to be a Good Thing. :-)

Thank you profusely for this - now, when I go back to the RTFM, I have
a clue as to how to proceed. :-)

(Well, we'll see how much of the next paragraph I can comprehend. ;-) )

Thanks Again!
Rich

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 02-20-2008, 07:42 PM
Rich Grise
 
Posts: n/a
Default Re: Slack 11 'dnsmasq: failed to create listening socket: Address already in use

On Wed, 01 Nov 2006 22:33:53 -0600, notbob wrote:
> On 2006-11-01, Rich Grise <rich@example.net> wrote:
>> OK, I've got 3 boxes in a row.

>
> Sounds like what you have is a LAN behind the "lan box" and another
> LAN behind the "new box". Why? What's the point?


The PHB got a new whiz-bang box, and wants to replace the existing
Samba server/IP masquerader/router with the new box.

The existing one is running Slack 10.0, the new one is my first
try at both installing 11.0 and turning it into a Samber server/
IP masquerader/router that looks like the old one, and I want
to make it as much like what we have now as I can, before I
switch it over.


+--[office box 1]
|
+--[office box 2]
--ADSL--["Server"]--+
+--[office box 3]
|
+--["NEW" box]--eth1--+
|
+--["LAB" box"]

And what I'm trying to accomplish is to make "NEW box" look just like
"Server", from the POV of "LAB box", which I can just reach over and
plug into "Server" if I want to, to kind of test it.

The goal is to ultimately replace "Server" with "New box", without
interrupting any of the work of the other office boxes, which are all
Dozers, so I want to make the transistion as invisible as possible. ;-)

So, yes, I've got a LAN behind a LAN, but I'd call it more of a "training
LAN" (did I just make that up? Can I copyright it?).
....
> If you are purposely trying to run a LAN within a LAN, then go for it.
> Just do on LAN 2 what you did on LAN 1 (iptables, dhcpd, etc).


Actually, that's the hang-up. When I did all of that was when I got the
error, but I am, as we speak, learning about utilizing dnsmasq, which is
new to me, this release. (11.0, 2.4.33.3)

Thanks for the help!

Cheers!
Rich

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:21 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com