Visit Our UNIX and Linux User Community

many tcp connection in close-wait

Thread Tools Search this Thread
Operating Systems Solaris many tcp connection in close-wait
# 1  
Old 02-14-2011
many tcp connection in close-wait

I use solaris Unix .
I find there is some problem in application and it generate many "close-wait" tcp connect and stay in the server . it is generate by process id 7740
root@XX # netstat -an | grep CLOSE_WAIT | wc -l
root@XX # netstat -an | grep CLOSE_WAIT    48684      0 49640      0 CLOSE_WAIT    49640      0 49640      0 CLOSE_WAIT
root@XX # /usr/local/bin/lsof -i:34805
XXX 7740 user   87u  IPv4 0x30004ce4c48   0t1500  TCP xx-1:34805->xx-2:32924 (CLOSE_WAIT)

How can I clear it or any other way to improve .
Please advice

Last edited by DukeNuke2; 02-14-2011 at 03:06 AM.. Reason: miss information
# 2  
Old 02-14-2011
What Solaris release ?
Is this number impacting the service ?
These connections will eventually timeout.
# 3  
Old 02-22-2011
Error check your application for proper 'tcp' conversation

- in most cases, the close-wait state means the local endpoint (your side - your application) has not properly closed the connection after the activity has actually stopped, in other words - the talk has come to an end.

- check your source-code to make sure all sockets are closed after they are not needed ;

good luck, and success!

alexandre botao

<< botao {dot} org >>

Previous Thread | Next Thread
Test Your Knowledge in Computers #40
Difficulty: Easy
HTML stands for 'Hyper Technology Transfer Protocol'.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

30 tcp connections Established for a while and after a few minutes are close

Good morning, I need your help please After Restarting Aps or connection, these are connections tcp 0 0 ESTABLISHED tcp 0 47 ESTABLISHED tcp 0 0 ... (4 Replies)
Discussion started by: alexcol
4 Replies

2. Shell Programming and Scripting

[Solved] Rsh does not close connection on exit

Dear all, We have a service that we start up remotely with rsh but unfortunately, the rsh never returns to the calling server. This seems to be because the processes of the service we've just started hold the port open.RBATTE1 @ /home/RBATTE1>netstat -na|grep 49.51 tcp4 0 0 ... (1 Reply)
Discussion started by: rbatte1
1 Replies

3. UNIX for Dummies Questions & Answers

Remotely close & rerun SSH connection

I'm trying to remotely run an upgrade script (via SSH) that update the SSH script on several hosts, just need to add several flags for the ssh command to look like this: ssh -Nf -i id_logs -o ExitOnForwardFailure=yes -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -o ServerAliveCountMax=5... (4 Replies)
Discussion started by: OdedOvdat
4 Replies

4. Solaris

Ssh to Solaris 10 server - close connection

Can ssh to server. Asks for password. Then seems to time out and close the connection. Any ideas? ---------- Post updated at 09:30 AM ---------- Previous update was at 07:51 AM ---------- Here is output from ssh -vvv -l user <IPaddress> debug3: packet_send2: adding 64 (len 59 padlen 5... (4 Replies)
Discussion started by: psychocandy
4 Replies

5. Programming

TCP trashing data on application close

I am using c to send data to a socket with the following commands: socket = socket(AF_INET, SOCK_STREAM, ptrp->p_proto); ioctl(socket, FIONBIO, (char *)&on); connect(socket) send(socket,data) shutdown(socket, SHUT_WR); recv(socket) //ready last of data waiting on the port //note this is... (3 Replies)
Discussion started by: metrix
3 Replies

6. Shell Programming and Scripting

Usage of NOHUP - How to keep the child process running even if I close the Server connection

Hi. ! When I use the 'NOHUP' along with the '&', the process will be running in the background. Even when I attempt to close (Meaning 'EXIT') the session (say PUTTY in this case), it wont exit unless the process is completed. But, say when I forcefully terminate the session (SHUT DOWN the... (2 Replies)
Discussion started by: WinBarani
2 Replies

7. Shell Programming and Scripting

How to close TELNET Connection

Hi, I have logged into a system using Telnet and iam unable to close the connection to connect to the next system using arrays. Iam getting error "Connection Timed Out" Iam using net::Telnet module. Please suggest.. (1 Reply)
Discussion started by: sudhakaryadav
1 Replies

8. Programming

close existing tcp connection in C

Hello. I would like to know how to close an existing tcp socket. I have read some stuff and learned how to create a socket and then close it but have not found anything about how to close an existing tcp socket created by another application. The situation is this: I have an ODBC server running and... (6 Replies)
Discussion started by: raidzero
6 Replies

9. UNIX for Dummies Questions & Answers

close tcp port

Hello, I have a service running (ODBC) and every now and then it will hang and I will have to stop and restart the service. The problem is when I stop the service, it indeed stops the service, but netstat reports a tcp port still open with the fin_wait_2 status. Then I must close the client... (1 Reply)
Discussion started by: raidzero
1 Replies

10. UNIX for Dummies Questions & Answers

ftp - Connection close

Hi Can someone help me what is the problem, when i try to login via ftp, though i entered the correct password, i got an error message Connection refused. please help. thanks (3 Replies)
Discussion started by: kaibiganmi
3 Replies

Featured Tech Videos