Reason code 2059—MQRC_Q_MGR_NOT_AVAILABLE—means the application never got a working conversation with the queue manager it asked for. The client library called MQCONN or MQCONNX with a name like QM_PROD, and the infrastructure underneath said that queue manager is not here or not accepting work. Beginners see 2059 and increase MAXDEPTH; veterans check dspmq, the listener, and whether the name in mqclient.ini matches the instance that actually started after last night failover. 2059 appears during cold starts, wrong-environment configuration files, firewall changes, and planned quiesce windows. This tutorial separates 2059 from 2538 and 2009, walks through distributed and z/OS checks, documents listener and channel prerequisites, and gives a repeatable runbook operators can execute in five minutes before escalating to application teams.
MQCONN and MQCONNX return 2059 when the queue manager process is not in RUNNING state, the name does not match any instance on the host, or the client channel path cannot complete queue manager handshake—sometimes because the listener is down even though dspmq shows RUNNING. JMS ConnectionFactory creation failures often wrap 2059 in a generic JMSException; always unwrap to MQ reason in logs. Batch jobs using server bindings fail 2059 when the local queue manager was not started by init scripts after reboot.
| Code | Name | Typical cause |
|---|---|---|
| 2059 | Q_MGR_NOT_AVAILABLE | QM down, wrong name, quiesce |
| 2538 | HOST_NOT_AVAILABLE | TCP/DNS/firewall/listener port |
| 2009 | CONNECTION_BROKEN | Was connected; link lost |
| 2035 | NOT_AUTHORIZED | Connected; object denied |
123456dspmq -m QM_PROD DISPLAY LSSTATUS(LISTENER.TCP) ALL START LISTENER(LISTENER.TCP) * After storage incident: df -h /var/mqm strmqm QM_PROD
Active/standby queue managers may expose the same logical name on virtual IP. If failover lags, clients see 2059 until standby becomes active and listeners bind. Client reconnection attributes help only after the standby is actually RUNNING—tune HA scripts and health checks before blaming applications. Document expected 2059 duration during controlled switchover.
MQ subsystem not started, SMFID mismatch, or queue manager not active in the sysplex shows as unavailable to remote TCP clients and to local attach depending on configuration. Use operations procedures for START MQ and display subsystem status. Coupling facility recovery may delay availability—coordinate with systems programming.
2059 is dialing a store whose lights are off—the phone network works (maybe), but nobody is open to take your order at that brand name.
You shouted hello to the marble bank by its name, but that bank is closed or you used the wrong name—so nobody answered.
Write ordered checks for 2059 versus 2538 in a table with expected outcome per step.
List three HA scenarios where 2059 is expected briefly and how clients should handle it.
Simulate wrong QM name in mqclient.ini and document exact client log lines.
1. 2059 means:
2. First check on 2059 from remote client:
3. Wrong queue manager name in client causes:
4. 2059 during quiesce means: