
The following error occurs when a request is submitted to IBM MQ, such as a request to connect to an IBM MQ.
JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2059' ('MQRC_Q_MGR_NOT_AVAILABLE').
To determine why this error is occurring, you will need to determine the hostname being used to connect to IBM MQ, as well as the named of the queue manager. For example, let's say the connection is being made using a Java application. In this example, the Java application is attempting to connect to the IBM MQ queue manager named MANAGER 01 running on the system with hostname mq1.example.com.
cf.setStringProperty(WMQConstants.WMQ_HOST_NAME, "mq1.example.com");
cf.setStringProperty(WMQConstants.WMQ_QUEUE_MANAGER, "MANAGER01");
The nslookup command can be used to determine if the hostname can be resolved to an IP address.
[root@server1 ~]# nslookup
> mq1.example.com
Server: 10.14.0.6
Address: 10.14.0.6#53
Non-authoritative answer:
Name: mq1.example.com
Address: 10.118.216.2
If you have access to the IBM MQ system, the ip command can be used to determine if the IP address being returned by the nslookup command is the IP address of the IBM MQ system.
~]# ip a
2: eno16777984: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:64:f5:94 brd ff:ff:ff:ff:ff:ff
inet 10.118.216.2/8 brd 10.0.5.17 scope global noprefixroute eno16777984
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe64:f594/64 scope link
valid_lft forever preferred_lft forever
If the hostname is correct, and you have access to the IBM MQ system, the dspmq command can be used to determine if the IBM MQ system contains the queue manager being used in the connection, and if the queue manager is running. Notice in this example that the queue managed named MANAGER01 has a status of "running as standby" which means that some other system is running the queue manager named MANAGER01.
~]# dspmq
QMNAME(MANAGER01) STATUS(Running as standby)
Did you find this article helpful?
If so, consider buying me a coffee over at