Solved

Solaris Sockets ?

Posted on 1997-04-30
4
295 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 Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

679 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