Getting error : WebSphere MQ reason code 2538?

Tanu picture Tanu · Oct 16, 2012 · Viewed 52.2k times · Source

I have WebSphere MQ and WebSphere Message Broker installed on Linux and when I execute mqsicreateexecutiongroup I get an error saying:

BIP1046E: Unable to connect with the queue manager (Could not connect to queue manager 'NSPZPAI1' (MQ reason code 2538)).

When I search for this reason code I understand that it is a host not available error.
Can somebody please tell me how to resolve this error?

When I run a runmqlsr command I always end up in a hang. Can somebody tell me how to start a listener?

Answer

T.Rob picture T.Rob · Oct 16, 2012

Don't start the listener by hand or script. If you have a modern queue manager, define a listener object like so:

DEF LISTENER(LISTENER.1414)  TRPTYPE(TCP) +
    CONTROL(QMGR)            PORT(1414) +
    REPLACE

START LISTENER(LISTENER.1414)

The attribute CONTROL(QMGR) tells the QMgr to start the listener automatically when the QMgr is started and to kill the listener when the QMgr is shut down. This ensures that the listener will always be started when the QMgr comes up, even if the QMgr is started manually instead of from the usual boot script. Because the listener is a child process of the QMgr it will always come down with the QMgr so you don't need to worry about orphaned listeners preventing connections after a QMgr restart.

Once the listener is defined, you can also use START LISTENER or STOP LISTENER MQSC commands to manually start and stop it independently of the QMgr. In the example above, I've manually started the listener rather than reboot the QMgr. Either would work but the START command is less intrusive.