Issue 

Zend Job Queue is not working.  PHP scripts may return a message similar to this:

Unable to connect socket to /usr/local/zendphp74/tmp/jobqueue.sock . No such file or directory

Or there may be no message at all.  This article tells how to verify the Job Queue is running and check for errors.

Environment

Zend Server running on any version of IBM i.    This document references version Zend Server 2020.x and 2021.x and higher.  If you are running 9.1.x, Zend Server 2018.0x or Zend Server 2019.0.x, or If you are running Zend Server 6 - 8.5.x, Please replace all instances of ZENDPHP74 or zendphp74 with ZENDPHP7 or zendphp7 or ZENDSVR6 or zendsvr6. 

Resolution

In the Zend Server administrative interface in your web browser, at address http://<your IBMi ip address>:10101 (http://<your IBMi ip address>:10091 for versions 9.1.x, 2018.x and 2019.x  or http://<your IBMi ip address>:10081 for versions 6 - 8.5.x), please navigate to the Configurations -> Components tab.

Find Zend Job Queue on the list. Check the status. By default, the Zend Job Queue status should be 'Loaded'.

If the status is 'Off', please check the check box on the left to select Zend Job Queue, and then click the 'Enable' button. When prompted to restart Zend Server, please click the 'Restart' icon to complete the task. The 'Restart' icon is in the upper right, and looks like a couple of arrows chasing each other around in a circle. Please note that 'Restart' will stop and restart Apache, so for a couple of minutes your web site will be unavailable. So, consider scheduling this task for a time when usage is low.

If the status is 'Error', please check the messages field to see what further action needs to be taken.

Common situations that may prevent successful start up follow:

Step 1. Zend Server needs to be restarted (see above for instructions on using the 'Restart' icon).

Step 2. The license is for Zend Server Basic, or the license is expired. The Job Queue requires a current Zend Server license for the Professional, Enterprise, or Developer edition. To learn more about the differences between Zend Server for IBM i editions, please visit this web page:

Zend Server for IBM i Editions Chart

To obtain a license for Zend Server, please contact your Zend Account Manager.

Step 3. The Zend Job Queue daemon job needs to be started on the IBM i. From the 5250 command line:

WRKACTJOB SBS(ZENDPHP74)


Check for two entries on the 'Work with Active Jobs' display that look like this:


ZSJOBQMNG QTMHHTTP BCI .0 PGM-watchdog

ZSJOBQMNG QTMHHTTP BCI .0 PGM-jqd

If they are missing, please go to the Zend Server for IBM i Service Menu:

GO ZENDPHP74/ZSVMENU

Then use option '13. Job Queue Management Menu'. Then use option '1. Start Job Queue'.

Return to the 'Work with Active Jobs' display to verify that the Job Queue daemon jobs have started.

Step 4. By default, the Job Queue daemon is set up to start automatically any time the ZENDPHP74 subsystem is started.

To control which Zend Server daemons start up when the ZENDphp74 subsystem is started, please make sure ZENDPHP74 is in your library list, and then run this command:

ZSAUTOJOB

This command displays the following screen:

Autostart Job Settings (ZSAUTOJOB)

Type choices, press Enter.

Monitor daemon (Y/N) . . . . . . > Y
Java Bridge daemon (Y/N) . . . . > N
Job Queue daemon (Y/N) . . . . . > Y
Deployment daemon (Y/N) . . . . > Y
Prngd daemon (Y/N) . . . . . . . > N
Zend Server Daemon (Y/N) . . . . > Y

Flag services that are desired to start up automatically with a 'Y'. Flag services that are not desired to start up automatically with an 'N'. Please make sure that the Job Queue daemon is flagged 'Y'. Press enter for changes to take effect.

After using ZSAUTOJOB, please run this command:

 CHGDTAARA DTAARA(ZENDPHP74/ZAUTOJOB (7 1)) VALUE('1')

Step 5. If none of the above steps resolve the issue, please run the Support Tool and send the output to us. This article tells how:

How to run the Support Tool on IBM i