# MQRC 2538: Host unavailable

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

### MQRC 2538: Host unavailable

MQRC 2538 (MQRC_HOST_NOT_AVAILABLE, hex 09EA) means a client MQCONN failed because the client couldn't open a conversation with the remote host. The listener may be down, the host or port may be wrong, or the network or a firewall may block the connection.


#### Other names for this code

Also written as `RC2538`, `reason code 2538`, `MQ 2538`, `MQ error 2538`, `MQRC_HOST_NOT_AVAILABLE`, `09EA`, `0x09EA`, `host not available`, `JMSWMQ0018 2538`, `AMQ9202E`, `MQ listener not running`.


### What it means

A client connects by opening a TCP connection to the host and port in its channel definition, where a queue manager listener should be waiting. 2538 means that step failed. The client never got as far as talking to the queue manager, so nothing about authority, channel names or queue manager names has been checked yet.

IBM lists five causes. The listener isn't running. The connection name (host and port) is wrong. The network is down. A firewall blocks the port or protocol. Or a security exit on the server-connection channel blocks the call that sets up the client. IBM also points out that on Linux servers the host's own firewall can be the cause.

The client error log usually holds the useful detail, with the host, the port and the operating system's TCP return code, such as connection refused or timed out. Refused means something on that host answered and nothing was listening on the port. A timeout means a firewall or routing problem is more likely. On z/OS queue managers the listener runs in the channel initiator, so the CHIN address space must be up with a TCP listener started.


### Common causes

- The queue manager's listener isn't running, or it listens on a different port from the one the client uses.
- The host name or port in MQSERVER, the CCDT, the connection factory or the connection name list is wrong or out of date, for example after a server move.
- A firewall, either on the network or on the server itself, blocks the port.
- DNS resolves the host name to the wrong address, or not at all.
- On z/OS, the channel initiator isn't running or has no TCP listener started on that port.


### How to find the problem

- Read the client error log (AMQERR01.LOG in the client's errors directory). Look for AMQ9202E or a similar message naming the host, port and TCP return code.
- On the server, check the listener with `DISPLAY LSSTATUS(*)` in runmqsc. On z/OS, use `DISPLAY CHINIT` to see the listeners running in the channel initiator.
- Test the port from the client machine with a simple TCP connection test. If it fails, the problem is network or firewall, not MQ.
- Check the exact connection name the application uses. Connection name lists try each address in turn, so check every entry.


### How to fix it

- Start the listener. On distributed MQ define it with CONTROL(QMGR) so it starts with the queue manager, or start it with `START LISTENER(...)`. On z/OS, use `START LISTENER TRPTYPE(TCP) PORT(1414)` in the channel initiator.
- Correct the host and port in the client configuration.
- Open the port on network and host firewalls between the client and the queue manager.
- If the queue manager can move between hosts, list every address in the connection name, or use a CCDT, so the client can find it.


### What it looks like


```text
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 '2538' ('MQRC_HOST_NOT_AVAILABLE').
```


### IBM documentation

[IBM documentation: MQRC 2538](https://www.ibm.com/docs/en/ibm-mq/9.4.x?topic=codes-2538-09ea-rc2538-mqrc-host-not-available). 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 2059 MQRC_Q_MGR_NOT_AVAILABLE Read →](https://wndsoftware.com/mainframe-errors/mqrc-2059)
[MQRC 2537 MQRC_CHANNEL_NOT_AVAILABLE Read →](https://wndsoftware.com/mainframe-errors/mqrc-2537)
[MQRC 2009 MQRC_CONNECTION_BROKEN Read →](https://wndsoftware.com/mainframe-errors/mqrc-2009)
[MQRC 2540 MQRC_UNKNOWN_CHANNEL_NAME Read →](https://wndsoftware.com/mainframe-errors/mqrc-2540)
[MQRC 2058 MQRC_Q_MGR_NAME_ERROR Read →](https://wndsoftware.com/mainframe-errors/mqrc-2058)

### Questions


#### Is 2538 an MQ problem or a network problem?

It happens before MQ gets involved, so it is usually a listener, address or network issue. Test the port with a plain TCP connection to tell which.


#### What is the difference between 2538 and 2059?

2538 says precisely that the host and port couldn't be reached. 2059 is the more general code for a queue manager that isn't available.


#### Can a security exit cause 2538?

Yes. IBM lists a security exit on the server-connection channel that blocks the client's set-up call as one of the causes.

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

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