Troubleshooting
Problem
Attempt to start a server that uses a port number larger than 1024 reports a BIND failure with errno=1115 (EADDRINUSE) and errnojr (or reason code) = 12BA00C4 (JRRESRPORTSPECIFIED). However, the TCPIP PROFILE has a PORT statement that reserves the specified port for that job name, so it should be successful.
Symptom
Some example messages associated with this problem:
- For the Macro Extended Sockets API (which include EZASOKET calls and CICS sockets) and REXX Sockets API, EADDRINUSE is returned as errno 48.
- If using the standard CICS listener transaction (EZACIC02), the following error message will be generated:
EZY1295E mm/dd/yy hh:mm:ss BIND CALL FAILURE TRANSACTION= tttt TASKID=nnnnnnnL ERRNO= 48
- For the Distributed DB2 server (xxxxDIST address space):
DSNL515I DSNLIxxx TCP/IP BIND FAILED FOR PORT nnnn WITH RETURN CODE=1115 AND REASON CODE=12BA00C4
- For MQSeries:
CSQX213E CSQXCLMA Communications error, TRPTYPE=TCP RC=1115 reason=12BA00C4
- For a Websphere Application Server (WAS):
java.net.BindException: EDC8115I Address already in use. (errno2=0x12BA00C4)
ADMD0012E: The transport of type: TCP cannot be initialized.
Cause
Note that the first four digits of the reason code are in the range 0000-1999. These are issued from the z/OS UNIX component (TCP/IP component uses 7000-7999). The BIND is being rejected because z/OS UNIX is configured to support multiple stacks (CINET) and the requested port number is in the range of ports defined by the INADDRANYPORT and INADDRANYCOUNT values specified on the NETWORK statement in the BPXPRMxx PARMLIB member.
Diagnosing The Problem
For APIs that return errno 48 for EADDRINUSE, the reason code is not provided to the application. The SYSTCPIP CTRACE with OPTIONS=(SOCKAPI,SOCKET) will show the reason code in the associated trace record.
The DISPLAY OMVS,CINET command can be used to report the current UNIX configuration.
Resolving The Problem
Take one of the following actions to resolve this problem:
- Modify the failing application to use a different port number that is outside of the INADDRANYPORT/INADDRANYCOUNT range. Adjust the associated PORT statement for this application.
- Modify the range of port numbers specified in the z/OS UNIX configuration to a range of ports that no server application will be using (on any of the TCPIP stacks). Note that to change INADDRANYPORT or INADDRANYCOUNT requires an IPL.
In either case the following actions should be performed as well:
- Ensure that the INADDRANYCOUNT value is large enough to handle the number of ephemeral ports that may be simultaneously required by all applications that do not have a stack affinity.
- Configure this range in the TCPIP PROFILE for every stack on the system. If, for example, INADDRANYPORT(50000) INADDRANYCOUNT(999) is specified in BPXPRMxx, then add the following two PORTRANGE statements to the profiles:
PORTRANGE 50000 999 TCP OMVS
PORTRANGE 50000 999 UDP OMVS
Product Synonym
TCP/IP TCPIP CS/390 CS390
Was this topic helpful?
Document Information
More support for:
z/OS Communications Server
Software version:
1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 2.1, 2.2, 2.3
Operating system(s):
z/OS
Document number:
78951
Modified date:
15 June 2018
UID
swg21180388