What it means
The program was connected, but the connection has gone. Often the queue manager stopped, or a client network link dropped. Any MQGET that was waiting is cancelled, and all connection and object handles are now invalid.
For client applications there is a catch: the call that got 2009 may in fact have completed on the queue manager, even though the completion code says it failed. Design restart logic with that in mind.
Typical causes
- The queue manager was stopped or ended abnormally.
- A client connection was cut by the network, a firewall that drops idle sessions, or a failover.
- The server-connection channel instance was stopped by an administrator.
- On z/OS IMS, the MQ subsystem connection is not started.
How to fix it
- Check whether the queue manager is running and look at its error log or job log for the time of the failure.
- In the program, treat 2009 as fatal for the current handles: back out uncommitted work, then reconnect with MQCONN or MQCONNX and reopen queues.
- For clients, check the network path and the channel status (DISPLAY CHSTATUS) and consider automatic client reconnection.
- On z/OS IMS, use DIS SUBSYS to check the MQ subsystem and STA SUBSYS to start it. CICS reconnects by itself.
Example
Illustrative only; names and values are invented.
MQGET failed CompCode=2 Reason=2009 QMgr=QM01
Reconnect attempt 1 of 10 in 5 seconds