Networking Forums

Networking Forums > Computer Networking > Linux Networking > Address already in use error

Reply
Thread Tools Display Modes

Address already in use error

 
 
Mark Voss
Guest
Posts: n/a

 
      06-09-2004, 10:00 PM
I have a problem with a new RH9 box I just built.
Whenever I reboot it, it thinks it's IP address is already in use. It
isn't. THe settings are all saving properly and such, it is just that
for some unknown reason, it thinks the address is taken at reboot.
When it is in this state, I cannot up the interface. However, if I
unplug the cable, then I can up the interface. Then, I plug the cable
back in and there's no problem. It's been up and running like that
for 2 weeks.

While the box runs fine, I really need to fix this in case I need to
do a remote reboot. Anyone have a clue??

Thanks


Mark
(E-Mail Removed)pam
 
Reply With Quote
 
 
 
 
Cameron Kerr
Guest
Posts: n/a

 
      06-10-2004, 06:46 PM
Mark Voss <(E-Mail Removed)4spam> wrote:

> I have a problem with a new RH9 box I just built.
> Whenever I reboot it, it thinks it's IP address is already in use.


What is the _exact_ error message it gives you?

Are you certain that it's saying what you think its saying? The standard
error message `Address already in use' (EADDRINUSE) means that the
addressort combination is already taken when a program tries to use
bind() or connect(). This generally mean that either the program is
already running, or the server, as all good servers should, use the
REUSEADDR socket option.

If you run tcpdump while bringing the interface up, do you see it
sending any ping requests to the same IP, probing for address collision?
This isn't something that is typically done under Linux, perhaps RH have
added some functionality.

Is the address configured statically, or are you getting it from DHCP.
If from DHCP, is it a fixed or dynamic address?

> When it is in this state, I cannot up the interface. However, if I
> unplug the cable, then I can up the interface.


Does it take longer when you do this? It may also detect if there is no
cable detected.

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
 
Cameron Kerr
Guest
Posts: n/a

 
      06-10-2004, 09:04 PM
Mark Voss <(E-Mail Removed)4spam> wrote:

> boot.log.4:May 14 15:07:52 <hostname> ifup: Error, some other host
> already uses address 192.168.0.8.


Ok, that error message is reported in ifup with this code fragment. I
don't know what version of RH this came from, I found it on Google when
searching for your error message.

if ! arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${IPADDR} ; then
echo $"Error, some other host already uses address ${IPADDR}."
exit 1
fi

Is arping installed on your system? `locate arping | grep bin'

From the arping manual page, this is what the options mean.

-q Quiet mode

-c Count

-w Wait this long between requests, in microseconds

-D (Not an option in my version of arping (Debian Sid)), probably
`Find duplicate replies'

-I Interface (-i in my version)

So I would suggest you see if you can run that command and find out
what the result is.

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
 
David Efflandt
Guest
Posts: n/a

 
      06-11-2004, 12:18 AM
On 11 Jun 2004, Cameron Kerr <(E-Mail Removed)> wrote:
> Mark Voss <(E-Mail Removed)4spam> wrote:
>
>> I have a problem with a new RH9 box I just built.
>> Whenever I reboot it, it thinks it's IP address is already in use.

>
> What is the _exact_ error message it gives you?
>
> Are you certain that it's saying what you think its saying? The standard
> error message `Address already in use' (EADDRINUSE) means that the
> addressort combination is already taken when a program tries to use
> bind() or connect(). This generally mean that either the program is
> already running, or the server, as all good servers should, use the
> REUSEADDR socket option.


One example is sshd, which binds to port 22 as ipv6 and may report an
error when it cannot bind to 22 as ipv4. But that is not an issue because
the ipv6 binding handles either ipv4 and ipv6 connections,

If having trouble grasping the exact error when it goes past you during
boot, the boot messages are likely listed somewhere in /var/log/. One of
the first things to learn is how to copy/paste (easy with the mouse).

--
David Efflandt - All spam ignored http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
 
Reply With Quote
 
Mark Voss
Guest
Posts: n/a

 
      06-11-2004, 12:28 AM
Here is the message from boot.log:

boot.log.4:May 14 15:07:52 <hostname> ifup: Error, some other host
already uses address 192.168.0.8.

Please note, for all you unforgiving sticklers, that <hostname> is not
the hostname, I have edited that out.




On Fri, 11 Jun 2004 00:18:49 +0000 (UTC), (E-Mail Removed) (David
Efflandt) wrote:

>On 11 Jun 2004, Cameron Kerr <(E-Mail Removed)> wrote:
>> Mark Voss <(E-Mail Removed)4spam> wrote:
>>
>>> I have a problem with a new RH9 box I just built.
>>> Whenever I reboot it, it thinks it's IP address is already in use.

>>
>> What is the _exact_ error message it gives you?
>>
>> Are you certain that it's saying what you think its saying? The standard
>> error message `Address already in use' (EADDRINUSE) means that the
>> addressort combination is already taken when a program tries to use
>> bind() or connect(). This generally mean that either the program is
>> already running, or the server, as all good servers should, use the
>> REUSEADDR socket option.

>
>One example is sshd, which binds to port 22 as ipv6 and may report an
>error when it cannot bind to 22 as ipv4. But that is not an issue because
>the ipv6 binding handles either ipv4 and ipv6 connections,
>
>If having trouble grasping the exact error when it goes past you during
>boot, the boot messages are likely listed somewhere in /var/log/. One of
>the first things to learn is how to copy/paste (easy with the mouse).
>
>--
>David Efflandt - All spam ignored http://www.de-srv.com/
>http://www.autox.chicago.il.us/ http://www.berniesfloral.net/


 
Reply With Quote
 
Mark Voss
Guest
Posts: n/a

 
      06-11-2004, 12:30 AM
On 11 Jun 2004 06:46:31 +1200, Cameron Kerr
<(E-Mail Removed)> wrote:

>Is the address configured statically, or are you getting it from DHCP.
>If from DHCP, is it a fixed or dynamic address?
>

This is a static address on the 192.168.0 block, not DHCP.


 
Reply With Quote
 
Mark Voss
Guest
Posts: n/a

 
      06-11-2004, 01:21 AM
On 11 Jun 2004 09:04:27 +1200, Cameron Kerr
<(E-Mail Removed)> wrote:

>
>Ok, that error message is reported in ifup with this code fragment. I
>don't know what version of RH this came from, I found it on Google when
>searching for your error message.
>
> if ! arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${IPADDR} ; then
> echo $"Error, some other host already uses address ${IPADDR}."
> exit 1
> fi
>
>Is arping installed on your system? `locate arping | grep bin'
>
>From the arping manual page, this is what the options mean.
>
> -q Quiet mode
>
> -c Count
>
> -w Wait this long between requests, in microseconds
>
> -D (Not an option in my version of arping (Debian Sid)), probably
> `Find duplicate replies'
>
> -I Interface (-i in my version)
>
>So I would suggest you see if you can run that command and find out
>what the result is.
>
>--
>Cameron Kerr
>(E-Mail Removed) : http://nzgeeks.org/cameron/
>Empowered by Perl!



Hmmm - I think you're on to something.

FYI, the system now has address 192.168.0.9 because we changed it at
one point in pursuing this issue.

Here's the output from arping (I removed the -q switch so we can see
the output):

/usr/sbin/arping -c 2 -w 3 -D -I eth0 192.168.0.9
ARPING 192.168.0.9 from 0.0.0.0 eth0
Unicast reply from 192.168.0.9 [00:E0:B6:03:35:5F] 0.864ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)


Now, look at this output for ifconfig -a. Note the hardware address
for eth0 and compare it to that above for arping:

/sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr 000:C9:13:21:23
inet addr:192.168.0.9 Bcast:192.168.0.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:276315 errors:0 dropped:0 overruns:0 frame:0
TX packets:236389 errors:3 dropped:0 overruns:0 carrier:3
collisions:0 txqueuelen:100
RX bytes:23771914 (22.6 Mb) TX bytes:40333161 (38.4 Mb)
Interrupt:11 Base address:0xe000 Memory:e9100000-e9100038


So, it appears that in arping eth0 is thought to have HW address of
00:E0:B6:03:35:5F and in ifconfig it thinks etho has HW address of
000:C9:13:21:23 ? Am I reading this right ? If so I would guess I
have some kind of hardware conflict here - perhaps w/ a 2nd NIC ?

To further confuse the issue, my gateway at 192.168.0.1 appears to
have HW address 00:E0:B6:03:35:5F:

/sbin/arp -a
? (192.168.0.1) at 00:E0:B6:03:35:5F [ether] on eth0


Any clue as to what is going on here ?

-Mark
 
Reply With Quote
 
Danny Kaffki
Guest
Posts: n/a

 
      06-11-2004, 01:29 AM
What are you connected to a switch? and what kind? Sounds like a buggy
switch that not refreshing fast enough. I am guessing, could be a bug,
just the part about pulling out the cable and putting back in makes me
think something up with your switch(hub). And do you have another
redhat box on the network without these problems?

(E-Mail Removed)4spam (Mark Voss) wrote in message news:<(E-Mail Removed)>...
> I have a problem with a new RH9 box I just built.
> Whenever I reboot it, it thinks it's IP address is already in use. It
> isn't. THe settings are all saving properly and such, it is just that
> for some unknown reason, it thinks the address is taken at reboot.
> When it is in this state, I cannot up the interface. However, if I
> unplug the cable, then I can up the interface. Then, I plug the cable
> back in and there's no problem. It's been up and running like that
> for 2 weeks.
>
> While the box runs fine, I really need to fix this in case I need to
> do a remote reboot. Anyone have a clue??
>
> Thanks
>
>
> Mark
> (E-Mail Removed)pam

 
Reply With Quote
 
Mark Voss
Guest
Posts: n/a

 
      06-11-2004, 01:35 AM
It's a Cisco switch. (it's remote so I can't say which model at the
moment but can find out) We tried varying the arp refresh rate on
it, but no help. THere are no other Linux boxes on the switch, but
numerous other Windows boxes with no problems.

On 10 Jun 2004 18:29:13 -0700, (E-Mail Removed) (Danny Kaffki) wrote:

>What are you connected to a switch? and what kind? Sounds like a buggy
>switch that not refreshing fast enough. I am guessing, could be a bug,
>just the part about pulling out the cable and putting back in makes me
>think something up with your switch(hub). And do you have another
>redhat box on the network without these problems?
>
>(E-Mail Removed)4spam (Mark Voss) wrote in message news:<(E-Mail Removed)>...
>> I have a problem with a new RH9 box I just built.
>> Whenever I reboot it, it thinks it's IP address is already in use. It
>> isn't. THe settings are all saving properly and such, it is just that
>> for some unknown reason, it thinks the address is taken at reboot.
>> When it is in this state, I cannot up the interface. However, if I
>> unplug the cable, then I can up the interface. Then, I plug the cable
>> back in and there's no problem. It's been up and running like that
>> for 2 weeks.
>>
>> While the box runs fine, I really need to fix this in case I need to
>> do a remote reboot. Anyone have a clue??
>>
>> Thanks
>>
>>
>> Mark
>> (E-Mail Removed)pam


 
Reply With Quote
 
Cameron Kerr
Guest
Posts: n/a

 
      06-11-2004, 08:07 AM
Mark Voss <(E-Mail Removed)4spam> wrote:

> FYI, the system now has address 192.168.0.9 because we changed it at
> one point in pursuing this issue.


> /usr/sbin/arping -c 2 -w 3 -D -I eth0 192.168.0.9
> Unicast reply from 192.168.0.9 [00:E0:B6:03:35:5F] 0.864ms


> /sbin/ifconfig -a
> eth0 Link encap:Ethernet HWaddr 000:C9:13:21:23
> inet addr:192.168.0.9 Bcast:192.168.0.255


> So, it appears that in arping eth0 is thought to have HW address of
> 00:E0:B6:03:35:5F


No, it means it arping received a reply from ...:5F saying it accepts
frames for 192.168.0.9, when it shouldn't be.

> To further confuse the issue, my gateway at 192.168.0.1 appears to
> have HW address 00:E0:B6:03:35:5F:


It does indeed appear that the router is answering for your IP address.
What kind of router are you operating?

I wonder, do you have Proxy-ARP turned on for some reason?

What is the output of `route -n' on your client and gateway system?

If you run arping on other clients on the same subnet, do you get
the same result of the gateway answering?

Come to think of it, its possible that you're missing a default route,
and is therefore perhaps falling back on proxy arp for some reason.

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind error : Address already in use problem ankur Linux Networking 1 02-16-2007 01:52 AM
unable to get mac address - TX error in dmesg SaranJothy Linux Networking 1 02-06-2006 06:53 PM
Windows System Error (IP Address Conflict) Ron P Wireless Networks 7 01-25-2005 12:37 AM
error when renewing ip address =?Utf-8?B?c3Rhbg==?= Broadband Hardware 1 12-29-2004 01:17 AM
Installing Symantec VPN and received IP Address error Frank Wireless Networks 0 12-06-2004 10:05 PM



1 2 3 4 5 6 7 8 9 10 11