[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rtl] Off Topic - Ethernet releasing port addresses



> I'm using RTLV2.3 and kernel 2.2.14.  I will most likely upgrade
> everything
> to the newer versions, but not until the test system is accepted by the
> customer and that could be 3 months from now.
> 
> I have miniRTL on 8 embedded machines 2 other Linux PC's and 3 Windows
> machines on a local network.  I have both real-time modules running on
> my
> linux PC's and user space applications.  Specifically, the user space
> applications send information to the Windows machines via ethernet
> socket
> code.  I have a set of defined port numbers that the information uses.  
> 
> My problem is that sometimes when I know I have closed the code out and
> I
> restart it I get the message
> 
> Unable to establish a port Connection:  Address already in use. 
> 
> And sometimes I have to re-boot a linux computer to get rid of this
> message

this is happening because one side is not closing the socket cleanly so the 
other side has to listen for the handshake to timeout that is as far as I
know 240s by default . you should never need to reboot though - if you check
with netstat you will see that the port is in "FIN WAIT" state for quite a 
while if the other end hangs up - but latest after timeout*2 ( 8minutes)
you should be able to restart everything . and at worst if that does not
happen do a network stop/start - no need to reboot.

hofrat