12-18-2015
What application is that you are running? I think what you thought were recovered socket are more new sockets after a cleanup... now if you think or see an issue here it can be a question of time out ( from the other side...) where your remote hosts believed the connection lost and closed it... The issue in this case is it opens a new one again, and after some time you find yourself short of sockets as you are wating for the cleanup process to complete
So you should look at the application side if there isnt something that needs tuning...
10 More Discussions You Might Find Interesting
1. Programming
I have a SUN environment running an WebLogic that communicates w/a 3rd party running IIS. When the IIS site goes down (frequently), I am stuck with sockets in an ESTABLISHED state, and cannot seem to figure out how to avoid this. No exceptions are thrown as I can still open connections to the IIS... (1 Reply)
Discussion started by: teledelux
1 Replies
2. Programming
Hello there chaps.
First of all, i'm no TCP/IP-wiz, so forgive me if this is a stupid question.
I've been messing around with filetransfer using sockets, and there is one thing that confuses me.
This is how it's set up:
A server app listens on a port for a client connection.
When it... (3 Replies)
Discussion started by: crippe
3 Replies
3. UNIX for Dummies Questions & Answers
If I do a netstat -a I can see all the sockets currently open, is there a way that I can tell which application is holding open these sockets ? (3 Replies)
Discussion started by: murphyboy
3 Replies
4. AIX
I have what appears to be a unique socket problem, although admittedly my tcp/ip programming experience is relatively limited.
I have a AIX server process using TCP/IP berkely sockets, and a Windows (C#) process. The windows process takes input from a user and sends a message to the Unix... (1 Reply)
Discussion started by: adiaconou
1 Replies
5. UNIX for Dummies Questions & Answers
Hi,
Occasionally I am getting the port state in CLOSE_WAIT for long time in the solaris server. I am not sure is it application problem or not. Because we are using port 9009 for Tomcat process in our web application, some time when I start the application, the port 9009 is in CLOSE_WAIT... (0 Replies)
Discussion started by: mgmk.84
0 Replies
6. Programming
Hello,
I'm trying to write a small c application to test a tcp port. This works fine for the most part but the default timeout on the connect is very long. I have been reading many posts but and it looks like I need to set the socket to be non-blocking and poll for a result. I have been totally... (2 Replies)
Discussion started by: tjones1105
2 Replies
7. Solaris
Hi,
I am using solaris 10.
I have opened a socket connection using java in solaris 10 operating system, the port went to LISTEN state and able to create new socket connection and the new connections went to ESTABLISHED state.
If I issue the command "netstat -an | grep <<portnumber>>", I... (10 Replies)
Discussion started by: kumar3k
10 Replies
8. IP Networking
Hello,
Our software is using a TCP socket (AF_INET, SOCK_STREAM) to communicate with an Ethernet device. When we send a message, the message object writes itself in full onto the socket's stream buffer before the software invokes send() from socket.h.
I'm still researching, but have 2... (1 Reply)
Discussion started by: bix_20002000
1 Replies
9. Shell Programming and Scripting
Hello all,
I have a requirement to read and write to a tcp socket from an HP-UX shell script. I see a /dev/tcp character device on my servers:
crw-rw-rw- 1 root root 72 0x00004f Mar 28 18:37 /dev/tcp
So I believe this is what I should use. The problem is that all the... (2 Replies)
Discussion started by: lupin..the..3rd
2 Replies
10. Shell Programming and Scripting
Hello Friends,
First of all im sorry for spending extra space in DB of forum with this thread, i know there would be a solution if i kept searching,
I need to terminate the process which causes CLOSE_WAIT status of TCP connection via port 8103:
-bash-3.00$ netstat -na | grep 8103... (3 Replies)
Discussion started by: EAGL€
3 Replies
LEARN ABOUT PHP
socket_getpeername
SOCKET_GETPEERNAME(3) 1 SOCKET_GETPEERNAME(3)
socket_getpeername - Queries the remote side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on
its type
SYNOPSIS
bool socket_getpeername (resource $socket, string &$address, [int &$port])
DESCRIPTION
Queries the remote side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on its type.
PARAMETERS
o $socket
- A valid socket resource created with socket_create(3) or socket_accept(3).
o $address
- If the given socket is of type AF_INET or AF_INET6, socket_getpeername(3) will return the peers (remote) IP address in appropri-
ate notation (e.g. 127.0.0.1 or fe80::1) in the $address parameter and, if the optional $port parameter is present, also the
associated port. If the given socket is of type AF_UNIX, socket_getpeername(3) will return the Unix filesystem path (e.g.
/var/run/daemon.sock) in the $address parameter.
o $port
- If given, this will hold the port associated to $address.
RETURN VALUES
Returns TRUE on success or FALSE on failure. socket_getpeername(3) may also return FALSE if the socket type is not any of AF_INET,
AF_INET6, or AF_UNIX, in which case the last socket error code is not updated.
NOTES
Note
socket_getpeername(3) should not be used with AF_UNIX sockets created with socket_accept(3). Only sockets created with socket_con-
nect(3) or a primary server socket following a call to socket_bind(3) will return meaningful values.
Note
For having socket_getpeername(3) to return a meaningful value, the socket it is applied upon must of course be one for which the
concept of "peer" makes sense.
SEE ALSO
socket_getsockname(3), socket_last_error(3), socket_strerror(3).
PHP Documentation Group SOCKET_GETPEERNAME(3)