# MQRC 2161: Queue manager quiescing

Source: https://wndsoftware.com/mainframe-errors/mqrc-2161

### MQRC 2161: Queue manager quiescing

MQRC 2161 (MQRC_Q_MGR_QUIESCING, hex 0871) means the queue manager is quiescing, which is a controlled shutdown, and the call failed so the application can finish its work and disconnect. It is a signal to end cleanly, not a fault.


#### Other names for this code

Also written as `RC2161`, `reason code 2161`, `MQ 2161`, `MQ error 2161`, `MQRC_Q_MGR_QUIESCING`, `0871`, `0x0871`, `queue manager quiescing`, `FAIL_IF_QUIESCING`, `MQJE001 Reason 2161`.


### What it means

When an administrator stops a queue manager in a controlled way, it quiesces. It lets connected applications keep working and waits for them to disconnect before it ends. During that time, MQOPEN, MQPUT, MQPUT1 and MQGET can still succeed. An application can ask to be told about the shutdown instead, with MQOO_FAIL_IF_QUIESCING on MQOPEN, MQPMO_FAIL_IF_QUIESCING on puts and MQGMO_FAIL_IF_QUIESCING on gets. Those calls then fail with MQCC_FAILED and reason 2161.

That option matters for the operator. A controlled shutdown (`endmqm` with the default -c option on distributed MQ, or `STOP QMGR` with the default MODE(QUIESCE) on z/OS) waits for applications. A program that never uses the fail-if-quiescing options and sits in a long MQGET wait can keep the queue manager from stopping. Programs that handle 2161 let it stop on time.

IBM lists two other cases. On z/OS, a batch application on an LPAR with no queue manager installed, or a CICS application with no connection established, can receive 2161. On IBM i, an application in compatibility mode with no connection can receive it.


### Common causes

- An administrator started a controlled shutdown with `endmqm QM1` or `endmqm -c QM1` on distributed MQ.
- On z/OS, an operator issued `STOP QMGR` or `STOP QMGR MODE(QUIESCE)`.
- A planned failover or maintenance window that stops the queue manager in a controlled way.
- On z/OS, a batch job runs on an LPAR without a queue manager, or a CICS program runs when CICS has no MQ connection.


### How to find the problem

- Check the queue manager error log or z/OS SYSLOG for the shutdown messages and the time they started.
- Run `dspmq` on distributed MQ. It shows the status as Quiescing while a controlled shutdown is in progress.
- If the shutdown seems stuck, list the remaining connections with `DISPLAY CONN(*) APPLTAG` to see which applications haven't disconnected.
- On z/OS CICS, check the adapter connection with `CKQC` or `CEMT INQUIRE MQCONN`.


### How to fix it

- Make the application end tidily on 2161. Commit or back out its unit of work, close its queues and disconnect.
- If the program needs to finish a unit of work, it can repeat the call without the fail-if-quiescing option, but it shouldn't start new work.
- Use the fail-if-quiescing options on every MQOPEN, MQPUT and MQGET in long-running programs, so they never hold up a shutdown.
- Restart or reconnect the application after the queue manager is back, either by hand or with retry logic.


### IBM documentation

[IBM documentation: MQRC 2161](https://www.ibm.com/docs/en/ibm-mq/9.4.x?topic=codes-2161-0871-rc2161-mqrc-q-mgr-quiescing). Use the documentation for your installed release.

[Report a correction to WND Software](https://wndsoftware.com/contact#message).

Technical reviewer: [Albert Joseph](https://wndsoftware.com/authors/albert-joseph), WND Software.

Last reviewed 2026-10-18 by the WND Software team. Written in our own words. For the full reference, check IBM’s MQ documentation for your version.


### Related codes

[MQRC 2162 MQRC_Q_MGR_STOPPING Read →](https://wndsoftware.com/mainframe-errors/mqrc-2162)
[MQRC 2009 MQRC_CONNECTION_BROKEN Read →](https://wndsoftware.com/mainframe-errors/mqrc-2009)
[MQRC 2059 MQRC_Q_MGR_NOT_AVAILABLE Read →](https://wndsoftware.com/mainframe-errors/mqrc-2059)
[MQRC 2033 MQRC_NO_MSG_AVAILABLE Read →](https://wndsoftware.com/mainframe-errors/mqrc-2033)
[MQRC 2042 MQRC_OBJECT_IN_USE Read →](https://wndsoftware.com/mainframe-errors/mqrc-2042)

### Questions


#### Is MQRC 2161 an error?

Not really. It is the queue manager telling the application to finish up because a controlled shutdown is under way.


#### What is the difference between 2161 and 2162?

2161 comes during a controlled shutdown and the application can still finish its current work. 2162 means the queue manager is stopping and no more MQI calls will work.


#### Why does endmqm take so long to finish?

A controlled shutdown waits for applications to disconnect. Programs that don't use the fail-if-quiescing options, especially ones in long MQGET waits, keep it waiting.

[IBM MQ reason codes](https://wndsoftware.com/mainframe-errors/mq-reason-codes) · [MQRC 2120](https://wndsoftware.com/mainframe-errors/mqrc-2120) · [MQRC 2162](https://wndsoftware.com/mainframe-errors/mqrc-2162)

[← All error codes](https://wndsoftware.com/mainframe-errors/)
