You are having trouble connecting a WebSphere MQ client to a MQ server, receiving errors that you can not connect to the MQ queue manager.
One of the first things to determine is if the two machines can communicate, and using the telnet tool is one way to accomplish it.
One of the first things to determine is if the two machines can communicate, and using the telnet tool is one way to accomplish it.
Symptom
Receiving errors which state that a queue manager is not found or not available. Connection errors.
For example: AMQ9213, AMQ9524, AMQ9202 or AMQ9508 or MQRC =2059 0x0000080b MQRC_Q_MGR_NOT_AVAILABLE. Please note, this is by no means an exclusive list of errors related to this type a problem but just a sample of some of the more common error messages and codes that might occur.
Cause
One possible cause is that the two machines can not communicate.
- May be the IP address or hostname was not properly specified by the MQ client.
- The port number might be incorrect.
- A queue manager is not running at the desired host.
- The queue manager could be running, but the corresponding listener is not running at the specified port.
- There may be some third party application (like a firewall or network threat protection service) not allowing the communication to flow in or out of the two machines.
Environment
Some client or server (usually remote) trying to connect to a MQ server. Usually these are on two separate machines, communicating over TCP/IP.
Diagnosing the problem
You can use the tool "telnet" to determine whether a TCP/IP connection problem is due to a network issue. This same method is used for many services which listen on TCP/IP.
WINDOWS Note: Windows 7 does not have Telnet enabled by default.
To enable Telnet on Windows 7:
Start -> Control Panel
Programs And Features
Check Turn Windows features on or off
Put a check on Telnet Client
Click OK
1) Make sure you have a Queue manager running and a Listener running on the MQ server. Note what port the listener is listening on, the default is port 1414.
Telnet ("telnetting") provides a better means of testing connectivity than "Ping". This is because Telnet tests for connectivity over a specific port, whereas the Ping only tests for the host. Also, Telnet is much more thorough in its method of connectivity. Ping is like calling a phone number and hearing the ringtone at the other end; Telnet is like calling a phone number and someone picking up and answering.
NOTE: There are many other utilities for testing port availability. Some are easier to use (such as Jping, Putty); however, since most users already have Telnet installed on a client machine, Telnet will be explored as a tool for testing connectivity in this Technote.
2) Run the telnet command.
Most telnet clients take the server IP address and the port number as two consecutive options. Note your MQ server's IP address and the port number the listener is listening on from step 1. Enter the following command:
telnet
If there is no listener running at the specified port, then you will get an error "Connect failed", such as:
telnet host.name.x.com 1414
Connecting To host.name.x.com...Could not open connection to the host, on port 1414: Connect failed
If you see a blank window with a blinking cursor, you are connected.
Pressing CTRL-] will exit to the telnet and you can enter 'quit' to exit telnet.
This test only proves that an application is listening at the specified port and you can get to it.
Note: when you test this method to a MQ server, the queue manager will dump errors in its error log and an informational FDC, since the data coming in over the communication is not MQ formatted data. See the following technote for details:
Probe ID CO052000 Major Errorcode rrcE_BAD_DATA_RECEIVED
A sample of the errors in the error log of the queue manager is:
AMQ9207: The data received from host 'x (1.2.3.4)' is not valid.
EXPLANATION: Incorrect data format received from host 'x (1.2.3.4)' over TCP/IP. It may be that an unknown host is attempting to send data. An FFST file has been generated containing the invalid data received.
ACTION: Tell the systems administrator.
AMQ9492: The TCP/IP responder program encountered an error.
EXPLANATION: The responder program was started but detected an error.
ACTION: Look at previous error messages in the error files to determine the error encountered by the responder program.
3) Additional MQ connection test.
There is an additional MQ test you can run, The amqscnxc sample connect program included with the
MQ samples. You need to have the MQ samples module installed to get this. Source code for the utility is also provided with the samples.
The following test will connect to the queue manager and respond that you are connected/or fail:
amqscnxc -x ConnName -c SvrconnChannelName QMgrName
amqscnxc -x 192.168.1.131(1415) -c EXCONN MIKE
Check the information on the samples programs in the product documentation at:
WebSphere MQ 7.5.0 > WebSphere MQ>Developing applications > Sample WebSphere MQ programs > Sample programs (platforms except z/OS)
Resolving the problem
This technote is only meant for basic connectivity tests. Getting basic network communications working between the client and MQ server machine is required first, before MQ communications will work.
If you were not able to connect to the MQ server, you will need to work with your Network administrators to check what may be blocking the communications. Look for firewalls and Network threat protection services, these may be built into the OS (like basic firewalls) or they may be 3rd party applications, like Anti-virus/threat protection software. These can usually be disabled to test, or properly configured to allow specific programs and communications to occur.
Comments
Post a Comment