1753798 Members
7859 Online
108805 Solutions
New Discussion юеВ

Socket Error !!

 
Monit Kapoor
Occasional Contributor

Socket Error !!

I am running a Cadence tool called "icms".I am able run this tool graphically on my system, however if i invoke this in the command-line mode "icms -nograph", i get the following error :
==============================
Binding TCP Socket: Address already in use
cannot establish tcp listening socket: Address already in use
Trying to connect an existing tcp listening socket...
*WARNING* Unable to open -nograph X Window Display
==============================
I have checked for patch compares with similiar systems and found no difference.Can someone explain to me what these errors are and how to resolve ?

System details are as follows:

OS Revision: HP-UX 11.00
Main Memory: 8388 MB
Swap : 22970 MB
Model: 9000/785/J6000
No of CPUs : 2
CPU Speed (in MHz): 552
If You don't Know! Ask!!
4 REPLIES 4
Magdi KAMAL
Respected Contributor

Re: Socket Error !!

Hi Monit,

You are giving a socket number already in use, so the bind process can not handle it.

You may choose another free socket number and rebind.

Magdi
Sridhar Bhaskarla
Honored Contributor

Re: Socket Error !!

You need to free up that socket. If you know the port what your application is using, you can do a netstat -an and check for the port to see what state it is in.

You can either reboot the box to get rid of the port or use "tcp_discon_by_addr" an unsupported parameter of ndd.

Check this thread out


http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xb5815220af9bd5118ff10090279cd0f9,00.html

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
rick jones
Honored Contributor

Re: Socket Error !!

DO NOT use the tcp_doscon_by_addr. It is a massive, ugly KLUDGE that should never have been known outside the lab. It is definitely unsupported and should be used only at your own great peril or under the close personal supervision of HP Support people.

If you use tusc with the verbose settings, you can see which port the command is trying to bind. Then you can use that information with lsof to see which process has the port bound and consider terminating that process. If there is no process, it could be that there are still old TCP connections in the TIME_WAIT state laying around with that local port number

If that is the case, the proper fix is to get the app fixed. It should be setting SO_REUSEADDR before calling bind(). Anything else is merely treating a symptom, perhaps in ways that will come back to bite you.
there is no rest for the wicked yet the virtuous have no pillows
Monit Kapoor
Occasional Contributor

Re: Socket Error !!

Thnaks for all your responses.However i ran tusc and all i saw was error like EADDRINUSE after a while.I have rebooted many times and also ensured no other apps are using sockets.spoke to the developer team and they said the app is OK coz the same binary runs fine on other systems.Also please note that the same binary runs ok in the graphical mode.The socket error only comes in "-nograph" mode.

If You don't Know! Ask!!