Solved

Solaris Sockets ?

Posted on 1997-04-30
4
290 Views
Last Modified: 2013-12-05
I am working on a client server project using AF_INET sockets in Solaris 2.5.1.

I am constantly rebooting my servers, and such, and each time the address is left binded and I have to wait for the OS to free up the address. (I know it is my sloppy code doing this, that is on the list to be fixed) but in the meantime is there any way I can free these up myself?

Sorry, I can only offer 15pts, all I have left. How do I get more points anyways? I cannot answer any of the questions. (when I tried it said I had to be an expert)
0
Comment
Question by:wcarson
  • 2
4 Comments
 

Author Comment

by:wcarson
ID: 1250193
Edited text of question
0
 
LVL 1

Expert Comment

by:flisakow
ID: 1250194

Answering questions does not give you points to ask more
questions, you can get a free T-shirt after 20,000 expert
points or some such.

You can buy the points if you like, otherwise they collect
at 5pts/day.

Sorry I don't know the answer, I've had similar problems myself
but I eventually ended up fixing the program.
0
 
LVL 1

Expert Comment

by:flisakow
ID: 1250195

Answering questions does not give you points to ask more
questions, you can get a free T-shirt after 20,000 expert
points or some such.

You can buy the points if you like, otherwise they collect
at 5pts/day.

Sorry I don't know the answer, I've had similar problems myself
but I eventually ended up fixing the program.
0
 

Accepted Solution

by:
kannan042597 earned 10 total points
ID: 1250196
This is not a problem and its only a feature of TCP/IP.  When a program binds an address to a port and after quitting the program it you try to restart the same with the same address and port number the TCP/IP stack will report an error saying that the address is already in use.  This is because of the 2 * MSL timer value. ( which is general 2 * 2 = 4 minutes ).  This way the TCP/IP stack avoids any delayed data to that particular socket wrongly arriving to the new program.  You can avoid this error by tuning the TCP/IP stack using the ndd program.  see the man pages for ndd to set the MSL timer value.

regards
kannan.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now