Before a Java client can MQCONN over the network or a sender channel can reach your hub, something on the queue manager host must be listening on a port. That role belongs to the listener process: a companion to the queue manager that opens sockets, accepts TCP (or other transport) handshakes, and delegates to MQ connection handling. Without it, CONNAME resolves but nothing answers—operators see 2059 connection errors and channels stuck in RETRY. This tutorial explains how listener processes relate to LISTENER objects, how they differ from channel initiators, startup and security considerations, and troubleshooting patterns for beginners moving from single-machine labs to distributed estates.
IBM MQ separates definition from runtime. DEFINE LISTENER(LISTENER.TCP) TRPTYPE(TCP) PORT(1414) stores intent in the repository. START LISTENER(LISTENER.TCP) asks the queue manager to spawn or activate the listener process bound to that definition. STOP LISTENER ends the process; the definition remains for next start. Multiple LISTENER objects can exist on one queue manager—different ports for administration, clients, or segregated networks—each with its own process when started.
| Attribute | Purpose |
|---|---|
| TRPTYPE(TCP) | Use TCP/IP (most common on distributed) |
| PORT(1414) | TCP port clients and channels connect to |
| IPADDR | Bind to specific NIC; blank often means all interfaces |
| CONTROL(QMGR) | Queue manager starts/stops with QMGR (optional) |
| LUNAME | For LU6.2 transports on some platforms |
A remote sender channel specifies CONNAME(host.example.com(1414)). TCP SYN arrives at the host firewall; if allowed, the listener process accepts. MQ negotiates channel type (SDR meets RCVR, or SVRCONN for clients). TLS may wrap the socket if SSLCIPH is set on the channel and certificates are in place. The listener itself does not authenticate users—that happens via CONNAUTH, CHLAUTH, and OAM after the pipe exists. Think of the listener as the building door; security desks are farther inside.
Message channels use channel initiators to move messages from transmission queues; listeners accept inbound network attachments. Both are queue manager processes but serve different traffic. A common mistake is START CHANNEL on the remote side while the local listener is STOPPED— the channel cannot bind. DISPLAY LSSTATUS and DISPLAY CHSTATUS together tell the story during incidents.
Queue managers often start a default listener at strmqm if configured with CONTROL(QMGR) or through ini service stanzas. Production runbooks explicitly START LISTENER after maintenance. Kubernetes and VM images may expose port 1414 via Service objects mapping to container listeners. Document which listener name maps to which external load balancer VIP so channel CONNAME updates stay traceable.
123456789DEFINE LISTENER('LISTENER.TCP') TRPTYPE(TCP) PORT(1414) + CONTROL(QMGR) DESCR('Default TCP listener') REPLACE START LISTENER('LISTENER.TCP') DISPLAY LSSTATUS('LISTENER.TCP') ALL * Client channel uses same host/port in CONNAME or CCDT DEFINE CHANNEL('CLIENT.CONN') CHLTYPE(SVRCONN) REPLACE DEFINE CHANNEL('TO.PARTNER') CHLTYPE(SDR) + CONNAME('partner.example.com(1414)') XMITQ('PARTNER.XMIT') REPLACE
The post office leaves the front door open during business hours (listener running). Delivery trucks from other towns knock on that door (TCP connect). If the door is locked (listener stopped), trucks wait in the street and honk (channel retry) until someone opens up.
Channel RETRY with CONNAME correct but LSSTATUS STOPPED. What is the first fix?
List three differences between listener process and command server.
Design ports for PROD: clients, inter-QM channels, and admin—how many listeners?
1. Remote MQ clients over TCP need:
2. DEFINE LISTENER creates:
3. CONNAME on a channel often contains:
4. Bindings-mode connections: