IBM Support

Host Server Connections Not Showing Up In NETSTAT

Question & Answer


Question

How is it that you can have active host server jobs but not have the connection show up in the list of current connections displayed by NETSTAT?

Answer

The NETSTAT command does not display all sockets connections, just TCP/IP connections. The host server jobs that are active but not showing up in NETSTAT are likely using UNIX sockets rather than TCP/IP.

To check, there is a clue in the job log for the active job. Find the CPIAD02 message that logs what user was connected and from what client. Normally when a connection is made by way of TCP/IP from the local host, the CPIAD02 will state that the connection is from 'client 127.0.0.1' - the IPv4 loopback address. But when the connection is made with UNIX sockets, it states that the connection was made with the hostname of the system for example: "User DUMMY from client RCHESP2.RCHLAND.IBM.COM connected to server."

The better way to check is to display the call stack of the job and press the F21 key to include LIC and PASE kernel stack frames in the output. A job that is in a normal waiting state typically has QSOSVR1 as the last program on its XPF call stack but there are several LIC stack frames after it. Scroll down until you find the frame just after the program LoSocketHighUse. When a job is using TCP/IP sockets, the next frame is LoReceiveStreamWithOob (note you must press F22 to display the entire program name). But when the job is using UNIX sockets, the frame is LoReceiveStreamUnix

Connections made from a Java program running in a JVM on IBM i and connecting to the same system use UNIX sockets when they are made using the jt400Native.jar classes. If there is a need to require the connections to use IP sockets, either change the class path for the program to use jt400.jar instead of jt400Native.jar or set the JVM property:

com.ibm.as400.access.AS400.mustUseNetSockets=true

UNIX is a registered trademark of The Open Group in the United States and other countries.

[{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Component":"Host Servers","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB68","label":"Power HW"}}]

Document Information

Modified date:
22 January 2025

UID

nas8N1020879