Steps for diagnosing problems with EXPLICITBINDPORTRANGE processing

If you configured distributed DVIPAs on SRCIP rules and outbound connections are failing with EADDRNOTAVAIL and JRSRCIPDistDVIPA, EXPLICITBINDPORTRANGE processing is not working.

About this task

There are several possible reasons for this problem:

  • EXPLICITBINDPORTRANGE parameter is not configured on the stack.
  • EXPLICITBINDPORTRANGE parameter is configured but:
    • The stack did not connect to the EZBEPORT structure in the coupling facility
    • The stack has lost access to the EZBEPORT structure
    • The stack is running in a CINET environment with more than 1 stack and stack affinity was not established
    • There are no available ports in the range (the range is exhausted)
    • The application is bound explicitly to an ephemeral port (equal to or greater than the low port value that is specified on the EPHEMERALPORTS parameter of the TCPCONFIG profile statement, or 1024 by default) that is not reserved for this job by the PORT or PORTRANGE profile statement

Procedure

Use the following steps to determine and correct the problem:

  1. Issue the D TCPIP,tcp_stackname,SYSPLEX,PORTS command to determine the configured EXPLICITBINDPORTRANGE value for this stack and the active EXPLICITBINDPORTRANGE value in the sysplex (or subplex). If the command response indicates "No EXPLICITBINDPORTRANGE is configured on this stack", see z/OS Communications Server: IP Configuration Reference, under the section for the GLOBALCONFIG statement, for information about enabling the EXPLICITBINDPORTRANGE.
    Tip: If the active port range does not match the configured port range for this stack, it means that another stack that was started after this stack had a different range defined in the GLOBALCONFIG EXPLICITBINDPORTRANGE parameter, or a VARY OBEYFILE command was processed on another stack that specified a GLOBALCONFIG EXPLICITBINDPORTRANGE parameter with a different range. You should try to ensure that all stacks participating in EXPLICITBINDPORTRANGE parameter processing specify the same port range. This can be done by specifying the GLOBALCONFIG EXPLICITBINDPORTRANGE statement in a file that is included in each stack's TCP/IP profile using an INCLUDE statement.
  2. Verify from the system log that the following message was issued:
    • IST1370I NETA.SSCP1A IS CONNECTED TO STRUCTURE EZBEPORT
    • If subplexing is being used, the message will be:
      IST1370I NETA.SSCP1A IS CONNECTED TO STRUCTURE EZBEPORTvvtt

      The vv value is the VTAM® subplex group ID and the tt value is the TCP/IP subplex group ID. If no VTAM subplex group ID was specified at VTAM startup, but a TCP/IP subplex group ID was specified on the GLOBALCONFIG statement in the TCP/IP profile, then the structure name is EZBEPORT01tt. If a VTAM subplex group ID was specified, but no TCP/IP subplex group ID was specified, then the structure name is EZBEPORTvv.

    • If this message was not issued and D TCPIP,,SYSPLEX,PORTS shows that an EXPLICITBINDPORTRANGE parameter was configured, see z/OS Communications Server: SNA Network Implementation Guide for more information about defining EZBEPORTvvtt with the coupling facility.
    • If the IST1370I message was issued (the stack did connect to the EZBEPORT structure), and D TCPIP,,SYSPLEX,PORTS shows that an EXPLICITBINDPORTRANGE parameter was configured but that no active EXPLICITBINDPORTRANGE is available from this stack, the stack may have lost connectivity to the EZBEPORT structure either as a result of a structure rebuild or a structure disconnect. In the console log, check for any failure or rebuild messages referencing the EZBEPORT structure. If a structure rebuild was in process for the EZBEPORT structure in use by this stack, wait for the rebuild to complete. If VTAM lost connectivity to the structure, issue the VARY NET,CFS,ACTION=CONNECT,STRNAME=structure_name command to reestablish connectivity to the structure
  3. Bind to the IPv4 address, INADDR_ANY, or the IPv6 unspecified address (in6addr_any) and port 0. Issue the D NET,STATS,TYPE=CFS,STRNAME=EZBEPORTvvtt,LIST=0 command to confirm that the coupling facility has ports in the EXPLICITBINDPORTRANGE parameter allocated for the stack on which you issued the bind, and issue the Netstat ALLConn/-a command to determine whether the port assigned to your application for this bind was one in the explicit bind port range.
    netstat -a -p tcpcs1                                 
    MVS TCP/IP NETSTAT CS V1R9       TCPIP Name: TCPCS1          13:21:04 
    User Id  Conn     State                                               
    -------  ----     -----                                               
    BPXOINIT 00000017 Listen                                              
      Local Socket:   0.0.0.0..10007                                      
      Foreign Socket: 0.0.0.0..0                                          
    USER11   0000002B Closed                                              
      Local Socket:   0.0.0.0..50001                                       
      Foreign Socket: 0.0.0.0..0                                          
    USER11   00000021 Closed                                              
      Local Socket:   0.0.0.0..50000                                       
      Foreign Socket: 0.0.0.0..0                                          
    SYSLOGD8 00000018 UDP                                                 
      Local Socket:   ::..514                                             
      Foreign Socket: *..*          

    If a port from the explicit bind port range was not allocated, check if you are running in a CINET environment in which more than one TCP/IP stack is being managed by CINET and stack affinity has not been established. Explicit bind port range processing is not supported in such a configuration.

  4. Check the system log for message "EZD1296I EXPLICITBINDPORTRANGE exhausted" which indicates that the number of ports in the EXPLICITBINPORTRANGE parameter is not large enough. The coupling facility was unable to allocate a port from this range and a stack ephemeral port was allocated instead. This may be a temporary situation because EBPR ports are eventually returned to the coupling facility after sockets bound to them are closed.
    Tip: Message EZD1296I is not issued more than once every 5 minutes. If this message is issued multiple times, you should consider enlarging the number of ports for the EXPLICITBINDPORTRANGE parameter. See Steps for determining an optimal range for the EXPLICITBINDPORTRANGE parameter for more information.
  5. Issue the Netstat ALLCONN/-a command to display the local socket IP address and port the application is bound to, and Netstat PORTLIST/-o command to display the ports that are reserved. If you want to add the applications local port to the list of reserved ports, use the PORT or PORTRANGE profile statement.