Issue

The Zend Server Apache instance for Zend Server 2020.x and higher, on IBM i requires three ports.  They are 10100, 10101, 10103  These ports should not be in use by any other process during the installation and operation of Zend Server for IBM i.  This article tells how to check to see if these ports are in use.

 If you are using Zend Server versions 9.1.x, 2018.x or 2019.x, the ports are 10090, 10091, and 10093.  If you are using a version of Zend Server prior to 9.1, the ports are 10080, 10081, and 10083.

Environment

Version 6 or higher of Zend Server for IBM i, running on any supported version of IBM i.

Resolution


Note: For versions of Zend Server 9.1.x, 2018.x and 2019.x the ports and Apache instance are different.

For versions 9.1.x, 2018.x and 2019.x, the ports are 10090, 10091, and 10093, and the Apache instance is ZENDPHP7.  Please make these substitutions as you work through the steps in this article if you are installing one of these older versions. 

Note: For versions of Zend Server prior to version 9, the ports and Apache instance are different.

For versions 6, 7, 8, and 8.5, the ports are 10080, 10081, and 10083, and the Apache instance is ZENDSVR6.  Please make these substitutions as you work through the steps in this article if you are installing one of these older versions. 


Use the NETSTAT command to see which ports are in use.

Note: NETSTAT can only tell which ports are in use by active processes.

This procedure will only tell you if any of the required ports are in use while you are looking.  Some jobs that use these ports may run at other times.  It is a good idea to use NETSTAT just prior to installing Zend Server for IBM i to make sure the ports are available at install time.  It is also useful to check for problems with port conflicts in cases where, for instance, the ZENDPHP74 Apache instance will not start.

Please log in to a 5250 session using a *SECOFR class user profile.  From the command line:

NETSTAT *CNN

This will bring up the "Work with IPv4 Connection Status" display.  We are interested in looking at the Local Port.  Notice that on this display, some of the Local Ports are numbers, and some are text. 

Please use F14 so that all Local Ports are displayed as numbers.

Now, use F13 to set the sort order to Local Port.  F13 brings up the "Select Column to Sort" pop up window.  Find "Local Port" on the list of Column Titles (it is in the third row), and give it a '1'.  Press enter to save the selection.

You should now be back in the "Work with IPv4 Connection Status" display, sorted by Local Port, with all ports displayed as a number.

Now, please Page Down until the Local ports displayed include the range 10100 to 10103

If Zend Server is not installed, or the ZENDPHP74 Apache instance is not active, ports 10100, 10101, and 10103 should not be displayed.  In this example, nothing is displayed between Local Ports 8479 and 11279:

Remote           Remote  Local                        
Address           Port    Port  Idle Time  State      
*                     *   8474  +++++++++  Listen     
*                     *   8475  138:42:12  Listen     
*                     *   8476  138:42:29  Listen     
*                     *   8477  +++++++++  Listen     
*                     *   8478  +++++++++  Listen     
*                     *   8479  +++++++++  Listen     
*                     *  11279  +++++++++  Listen     
127.0.0.1         62271  12887  +++++++++  Closed     
127.0.0.1          8473  13959  000:30:37  Established
127.0.0.1         17463  24255  +++++++++  Closed     
127.0.0.1         38239  52598  +++++++++  Closed     
127.0.0.1         23919  54687  +++++++++  Closed    

This indicates ports 10100, 10101, and 10103 are available (check for 10090, 10091 and 10093 for versions 9.1.x, 2018.x and 2019.x or check for 10080, 10081, and 10083 for versions prior to Version 9).   If Zend Server for IBM i is not installed, it should be safe to install it.  If Zend Server for IBM i is installed, this would indicate that the ZENDPHP74 Apache instance is not active.

This next example shows how the display might look if the ZENDPHP74 Apache instance is active:

Remote           Remote  Local                        
Address           Port    Port  Idle Time  State      
*                     *   8477  +++++++++  Listen     
*                     *   8478  +++++++++  Listen     
*                     *   8479  +++++++++  Listen     
*                     *  10100  000:01:02  Listen   
*                     *  10101  000:01:02  Listen   
*                     *  10103  000:00:11  Listen   
127.0.0.1         21253  10103  000:00:43  Time-wait
127.0.0.1         30218  10103  000:00:43  Time-wait 
127.0.0.1         40637  10103  000:00:11  Time-wait
127.0.0.1         58862  10103  000:00:11  Time-wait
*                     *  11279  +++++++++  Listen   
127.0.0.1         62271  12887  +++++++++  Closed  

Notice the first three entries for the ports do not have a Remote Address specified, but just show an asterisk.  If you use option 8 on any of these three, you should see a bunch of ZENDPHP74 jobs on the "Display Jobs Using Connection" display.  The additional entries we see for Local Port 10103 showing a Remote Address of 127.0.0.1 are very temporary, and it is often not possible to enter an option 8 for them before the job is finished.  If you do get into the "Display Jobs Using Connection" display for one of these, it will likely show "(No jobs)", which is normal when this port is used by Zend Server.  This indicates the process using the port is not associated with a job.

Note: Some customers will change one or more of the default Zend Server ports.

We do not recommend this, but sometimes a customer will change a port.  In this case, we expect the customer will know which ports should be active when the ZENDPHP74 instance is active.  For new or clean installations, the default ports must be available, as they are used during the installation.  Port changes can only be done after the software is successfully installed.