IBM Support

Using ssh to test connectivity between an IBM MQ Client in one host and a Queue Manager in another host

Troubleshooting


Problem

You have an IBM MQ Client Application that is trying to connect to a remote queue manager, but the application is receiving errors indicating that a queue manager is not found or that is not available. 
For example, 
- Errors like: AMQ9213E, AMQ9524E, AMQ9202E or AMQ9508E
- Reason codes like 2059 (MQRC_Q_MGR_NOT_AVAILABLE)
.
Please note that this list is not a comprehensive list of errors, but just a sample of some of the more common ones.
 

Resolving The Problem

For this tutorial let's assume that we have these 2 hosts:
- Host-1 for the queue manager: riggioni1
  Queue manager name: QM93LNX
  Port: 1415
- Host-2 for the client application: suvereto1
  For illustration purposes, the connection information is specified by means of MQSERVER:
    export MQSERVER='SYSTEM.DEF.SVRCONN/TCP/riggioni1(1415)'
You can use the TCP/IP connectivity tools:
- "ping" to determine whether there is basic TCP/IP connectivity.
- "ssh" to see if a possible MQ Listener is running in the remote port.
The steps are shown below (with an illustration command):
- Step 1) Ensure that the Listener is running in the queue manager
- Step 2) Use "ping" to test for basic connectivity
            ping riggioni1
- Step 3) Use the "ssh" command to test the remote port
            ssh riggioni1 -p 1414
- Step 4) Additional/Optional MQ connection test: sample amqscnxc
            amqscnxc -x 'riggioni1.fyre.ibm.com(1415)' -c SYSTEM.DEF.SVRCONN QM93LNX
+ Interpreting the results:
a)  ssh: connect to host riggioni1 port 1414: Connection refused
Conclusion: 
The host could be reached, but nobody is listening in the specified port!
Definitely, the MQ Listener is NOT running on that port.
b) kex_exchange_identification: Connection closed by remote host
Conclusion:  
Somebody is listening! But it is NOT a guarantee that the MQ Listener is actually using it.
It could be another application that is using the port.
c) ssh: connect to host port 1421: No route to host
Conclusion:
The host CANNOT be reached or IS NOT responding. 
Thus, the status of the port cannot be asserted, and thus, we cannot reach yet  a conclusion about the status of the MQ Listener.
 
+ Note:
The original technote used the deprecated tool "telnet", but this tool is no longer shipped with recent versions of Windows or Linux.

+++ See attached PDF file:
+ tags:
Author: Angel Rivera;
+++ end +++

[{"Type":"MASTER","Line of Business":{"code":"LOB67","label":"IT Automation \u0026 App Modernization"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"ARM Category":[{"code":"a8m0z00000008N4AAI","label":"Connectivity"}],"ARM Case Number":"TS013533934","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
01 March 2024

UID

swg21615875