IBM Support

Connections in CLOSED Status ( CLOSED State ) in NETSTAT

Troubleshooting


Problem

Connections in CLOSED Status (CLOSED State ) in NETSTAT

Resolving The Problem

It is possible to see NETSTAT *CNN connections in CLOSED state.

Whenever connections are in a CLOSED state, for an extended period  it is normally a local application problem.
There are at least three possibilities.

1. A connection received a RST (reset) from the remote system. The connection stays in CLOSED state until the application closes the socket descriptor.
When TCP receives a RST, the connection transitions to CLOSED status, and TCP will send the RST notification up to Sockets. It is the IBM i socket application that should issue a recv() to receive more data. When the application issues the recv(), an errno of 3426 ( CPE3426 ) will be issued. The application should issue the close() after that, since the connection has been aborted by the remote system.

2. An IBM i socket application did a connect(), and the connect timed out with ETIMEDOUT (errno 3447 ), but the iSeries application did not close the socket.

3. An IBM i socket application did a socket() and bind(), but did not do a listen().

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CMAAA2","label":"Communications-\u003ETCP"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
28 June 2023

UID

ibm16955921