Queue Manager Startup

Starting an IBM MQ queue manager is more than launching a process—it is recovery, repository load, and preparation for channels and applications. The strmqm command on distributed platforms and started-task automation on z/OS bring the messaging engine online after planned maintenance or unplanned reboot. Beginners expect instant readiness; operators know the first start after a power loss may replay large logs while applications retry MQCONN. This page explains strmqm and automatic startup, internal startup phases, listener and channel initiation, verifying a healthy start with DISPLAY QMSTATUS and dspmq, common failures (permissions, disk full, corrupt log), and coordination with application startup order in enterprise batches.

strmqm on Distributed Systems

Run strmqm QMGRNAME as the mqm user or equivalent. The command returns when the queue manager is starting; use dspmq or DISPLAY QMSTATUS to confirm RUNNING. If the queue manager was the default installation manager, some environments use strmqm without a name. Custom data paths from crtmqm -ld and -md must exist and have correct ownership—startup fails fast with AMQ8001 series errors when paths are wrong.

Useful commands after startup
CommandPurpose
dspmqList queue managers and status
dspmq -m QM1Status of one queue manager
echo DISPLAY QMSTATUS | runmqsc QM1MQSC status inside QM
runmqlsr -m QM1 -l LISTENER.TCP -t TCPStart TCP listener
START CHANNEL(...) Start sender/receiver channels

Internal Startup Phases (Conceptual)

  1. Validate installation path and active configuration (mqs.ini, qm.ini).
  2. Open log files and run recovery for persistent messages and transactions.
  3. Load object definitions from the repository into memory.
  4. Start agents: command server, channel initiators, optional AMQP and MQTT services.
  5. Enter running state; accept MQCONN and administrative commands.

Long recovery after kill -9 or power loss indicates unclean shutdown—pair with shutdown tutorial discipline.

Automatic Startup at OS Boot

Register queue manager with crtmqm set of flags or post-install scripts; on Linux systemd unit files may start strmqm. Windows services panel shows IBM MQ services. Ensure file systems mount before MQ starts (NFS or SAN volumes). z/OS automation starts the queue manager address space before CICS regions that depend on MQ in many estates—job scheduling documents the order.

Listeners and Channels

DEFINE LISTENER and START LISTENER (or runmqlsr) open ports for remote queue managers and clients. Sender channels may START CHANNEL automatically via channel triggering or operations scripts. After startup, verify DISPLAY LSSTATUS and DISPLAY CHSTATUS—BINDING or RUNNING states show healthy paths. TLS channels need keystores readable at listener and channel start.

Application Startup Order

Best practice: queue manager and listeners ready before application servers fire hundreds of MQCONN. Spring and Java EE containers may retry connections—tune retry to avoid log storms. Batch jobs scheduled at 00:01 should depend on MQ health checks. CICS regions may delay cold start until MQ is available on the same LPAR or channel path.

Startup Troubleshooting

  • Check AMQERR01.log in queue manager error directory.
  • Verify disk space on log and data paths.
  • Confirm no second instance already holds the same name (dspmq).
  • Review recent ALTER or upgrade that changed qm.ini.
  • On z/OS, review JESMSGLG and SYSLOG for address space failures.

Tutorial: Lab Startup Sequence

shell
1
2
3
4
5
6
strmqm QM1 dspmq -m QM1 echo "DISPLAY QMSTATUS" | runmqsc QM1 START LISTENER(LISTENER.TCP) START CHANNEL(TO.PARTNER) * Test: runmqsc, DEFINE QLOCAL test, put/get sample

Explain Like I'm Five: Startup

The library opens in the morning: staff unlock doors (strmqm), put returned books back on shelves from the overnight cart (log recovery), turn on the front desk computer (command server), and open the return slot (listener). Until then, you cannot drop off books.

Practice Exercises

Exercise 1: Verify

After strmqm, which three checks prove readiness for remote clients?

Exercise 2: Order

Listener starts before strmqm. What happens?

Exercise 3: Recovery

Why is first start after kill -9 slower than after endmqm?

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. strmqm is used to:

  • Start a queue manager
  • Delete a queue
  • Put a message
  • Define a topic

2. After unclean shutdown, startup may:

  • Replay logs to recover persistent data
  • Skip all logs
  • Delete all queues
  • Disable MQI

3. Applications can connect when:

  • Queue manager is running and listener accepts
  • Only after dltmqm
  • Before crtmqm
  • Without MQCONN

4. runmqlsr relates to:

  • Starting a listener
  • Deleting messages
  • MQBACK
  • Creating model queue
Published
Read time14 min
AuthorMainframeMaster
Verified: IBM MQ 9.3 documentation