MQRC 2537: Channel unavailable
MQRC 2537 (MQRC_
Other names for this code
Also written as RC2537, reason code 2537, MQ 2537, MQ error 2537, MQRC_CHANNEL_NOT_AVAILABLE, 09E9, 0x09E9, channel not available, JMSWMQ0018 2537, MAXINST, MAXINSTC.
What it means
A client connection runs over an instance of a server-connection (SVRCONN) channel on the queue manager. Unlike 2538, where the client can't reach the host at all, 2537 means the network path worked and the queue manager answered, but it refused to start a channel instance for this client.
IBM lists five reasons. The channel is in STOPPED state. A channel exit stopped it. The client has reached the limit of instances of this channel allowed from one client, set by MAXINSTC. The channel has reached its total instance limit, set by MAXINST. Or the queue manager has reached its limit on channels overall, set by MaxChannels in the CHANNELS stanza of qm.ini on distributed MQ, or by the MAXCHL queue manager attribute on z/OS.
The instance limits are often hit by a leak, not by real load. An application server that opens connections without closing them, or a pool sized larger than the limits allow, uses up instances until new connects fail. The same reason code identifies the Channel Not Available event, which channel events can report.
Common causes
- The server-connection channel was stopped with
STOP CHANNEL, and left in STOPPED state. - The application reached MAXINSTC, the instances allowed from one client, often because of a connection leak or too large a connection pool.
- All clients together reached MAXINST on that channel.
- The queue manager reached its overall channel limit (MaxChannels on distributed MQ, MAXCHL on z/OS).
- A channel security or other exit decided to stop the channel.
How to find the problem
- Read the queue manager error log at the time of the failure. It says which limit was hit or that the channel is stopped. Also check the client error log.
- Check the channel definition with
DISPLAY CHANNEL(APP..SVRCONN) MAXINST MAXINSTC SHARECNV - Count running instances with
DISPLAY CHSTATUS(APP.. Many instances from the same CONNAME point to a leak or an oversized pool.SVRCONN) CONNAME STATUS - A STATUS of STOPPED in DISPLAY CHSTATUS means the channel was stopped and will refuse clients until someone starts it.
- On distributed MQ, read MaxChannels in qm.ini. On z/OS, use
DISPLAY QMGR MAXCHLandDISPLAY CHINITto see current and maximum channel counts.
How to fix it
- If the channel was stopped, find out why, then run
START CHANNEL(APP.. For a server-connection channel this lets clients connect again.SVRCONN) - Fix connection leaks so the application disconnects or returns connections to its pool.
- Size connection pools to fit within MAXINSTC, or raise MAXINSTC and MAXINST with
ALTER CHANNEL(...) CHLTYPE(SVRCONN)if the load is real. - Raise the queue manager's channel limit if many applications share it, and restart where the platform requires it.
- Keep a margin. Set the limits high enough for normal peaks but low enough that one runaway client can't take every channel.
What it looks like
JMSWMQ0018: Failed to connect to queue manager 'QM1' with connection mode 'Client' and host name 'mqhost01(1414)'.
JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2537' ('MQRC_CHANNEL_NOT_AVAILABLE').IBM documentation
IBM documentation: MQRC 2537. Use the documentation for your installed release.
Related codes
Questions
What is the difference between 2537 and 2538?
2538 means the client couldn't reach the host and port at all. 2537 means it reached the queue manager, which then refused to start the channel.
Why did 2537 appear after the application ran fine for days?
That pattern points to a connection leak. Instances pile up until the client hits MAXINSTC or the channel hits MAXINST, and new connects start to fail.
Does stopping a channel affect connected clients?
Yes. STOP CHANNEL ends the running instances, and while the channel is STOPPED new clients get 2537 until it is started again.