Not freeing up tcp port fast enough?

unix

    Next

  • 1. Xterm strange behaviour in Solaris 10 01/06
    Good evening list, I couldn't wait so my Ultra2's running the latest Sol 10 release, straight out of the CD writer. :) It has a much lighter (or snappier) feeling than the GA on my machine, and I quite like it. I have installed the minimum from the Sun CDs, and filled the gaps with blastwave.org packages (like the WM, Xfce). The thing is, I'm wondering if I have not left too much out from the original packages... :S Xterms are now showing a very strange behaviour. The CTRL+some key combinations I usually type (CTRL+e, CTRL+a mostly) are perfectly working, but for some reason CTRL+c is not. It sometimes print "^C" (when I try to break a running process), sometimes beeps (when I try to scrap the current line in the shell), but the processus behind never actually catches the signal! It's slightly annoying to say the least... I have also tried with xterm86 from blastwave, same thing, with both bash(es), same thing. So I've left plenty of stuff out, like ToolTalk, most of the CDE environment (I only have SUNWdtbas SUNWdtdmn SUNWdtdmr), and so on. Could I need something there? I remember seeing "PC keytables" flying in front of my tired eyes yesterday evening, what does this one do exactly? Needless to say that it worked flawlessly in my GA install. If anyone has any idea, I'd be pleased to hear from her/him. :) Thanks a lot, and happy holidays! Best regards, D.
  • 2. Replacing Ultra 2 motherboard battery
    Hi all, The clock on my Ultra 2 workstation suddenly stopped keeping time. I'm assuming that the lithium battery on the motherboard needs replacing, but according to the Sun website this is not a "customer replaceable" part. Has anyone here replaced one of these batteries? Are they readily available and could they be replaced by someone with decent technical skills? Any advice would be much appreciated. Best wishes, Chris Tidy
  • 3. Wanted ISO images for Solaris 7
    Hi all, I have the manuals, licence and other CD's for Solaris 7 Server, but the OS disks are missing. Sun does not list these on their site. Can someone place these on their FTP site?? If it is burried on the Sun web site, what is the url????? I would like to place it on an old sparc 5 for an ftp server. It only has 48 meg of ram. Not enough for Solaris 8 and I do not want to put any more money in the old sparc box. Thanks, Randy

Not freeing up tcp port fast enough?

Postby Henrik Goldman » Tue, 05 Dec 2006 21:14:50 GMT

Hello,

I'm implementing a tcp server and an associated client. One feature about 
this server is that the client can invoke a remote restart command which 
causes the server to restart itself. This means that it will stop what it's 
doing, remove all clients, close all sockets and then restart from main() 
again.

Now I've been trying this out but in some rare cases I'm getting problems 
where the restart fails. The reason is that Solaris doesn't free up the port 
fast enough and thus the server will say that another application is using 
the same port when calling bind().

Whats the common way to handle this? I have not seen it on any other unix 
systems so far.

Thanks.

-- Henrik 



Re: Not freeing up tcp port fast enough?

Postby hume.spamfilter » Tue, 05 Dec 2006 23:51:23 GMT



You've probably already thought of this, but are you using SO_REUSEADDR
with setsockopt()?

-- 
Brandon Hume    - hume -> BOFH.Ca,  http://www.**--****.com/ 

Re: Not freeing up tcp port fast enough?

Postby Henrik Goldman » Wed, 06 Dec 2006 05:21:15 GMT


Thanks for the suggestion. I did not even know it existed. However couldn't 
this affect that data mistakenly will be sent to the wrong socket (which is 
about to expire by the OS) in the process of switching?
Even if it happens I assume it will lead to an error on the client side.

-- Henrik 



Re: Not freeing up tcp port fast enough?

Postby Darren Dunham » Wed, 06 Dec 2006 08:20:46 GMT





TIME_WAIT is there for a reason.  So, yes, you lose something by reusing
the socket early.  Your choice is to reuse it early or not.  There isn't
much else you can do.


There are a variety of (hopefully very obscure) things that can happen.

 http://www.**--****.com/ 

-- 
Darren Dunham                                            XXXX@XXXXX.COM 
Senior Technical Consultant         TAOS             http://www.**--****.com/ 
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >

Re: Not freeing up tcp port fast enough?

Postby Rick Jones » Wed, 06 Dec 2006 10:17:40 GMT








Indeed, TIME_WAIT is there for a reason, but SO_REUSEADDR does not (or
at least should not) short-circuit TIME_WAIT or any other state.  What
it does is allow an application to have a new instance of its LISTEN
endpoint while there are still previous connections in states "beyond"
the LISTEN state.

rick jones
-- 
Wisdom Teeth are impacted, people are affected by the effects of events.
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...

Re: Not freeing up tcp port fast enough?

Postby Darren Dunham » Wed, 06 Dec 2006 15:55:04 GMT







*blink*

I didn't get exactly what you meant at first because I was confusing the
binding and the lack of connection states on the port.  I see I had
managed to misunderstand the details about REUSEADDR.   

-- 
Darren Dunham                                            XXXX@XXXXX.COM 
Senior Technical Consultant         TAOS             http://www.**--****.com/ 
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >



Return to unix

 

Who is online

Users browsing this forum: No registered users and 88 guest