Skip to main content

Using telnet to test connectivity between IBM Websphere MQ Client and MQ server - Middleware News

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.

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

    adsrerrapop

    Popular posts from this blog

    IBM Websphere MQ interview Questions Part 5

    MQ Series: - It is an IBM web sphere product which is evolved in 1990’s. MQ series does transportation from one point to other. It is an EAI tool (Middle ware) VERSIONS:-5.0, 5.1, 5.3, 6.0, 7.0(new version). The currently using version is 6.2 Note: – MQ series supports more than 35+ operating systems. It is platform Independent. For every OS we have different MQ series software’s. But the functionality of MQ series Default path for installing MQ series is:- C: programfiles\BM\clipse\SDK30 C: programfiles\IBM\WebsphereMQ After installation it will create a group and user. Some middleware technologies are Tibco, SAP XI. MQ series deals with two things, they are OBJECTS, SERVICES. In OBJECTS we have • QUEUES • CHANNELS • PROCESS • AUTHENTICATION • QUERY MANAGER. In SERVICES we have LISTENERS. Objects: – objects are used to handle the transactions with the help of services. QUEUE MANAGER maintains all the objects and services. QUEUE: – it is a database structure

    IBM Websphere MQ Reason code list / mq reason codes / websphere mq error codes / mq error messages

    Reason code list ================= The following is a list of reason codes, in numeric order, providing detailed information to help you understand them, including: * An explanation of the circumstances that have caused the code to be raised * The associated completion code * Suggested programmer actions in response to the code * 0 (0000) (RC0): MQRC_NONE * 900 (0384) (RC900): MQRC_APPL_FIRST * 999 (03E7) (RC999): MQRC_APPL_LAST * 2001 (07D1) (RC2001): MQRC_ALIAS_BASE_Q_TYPE_ERROR * 2002 (07D2) (RC2002): MQRC_ALREADY_CONNECTED * 2003 (07D3) (RC2003): MQRC_BACKED_OUT * 2004 (07D4) (RC2004): MQRC_BUFFER_ERROR * 2005 (07D5) (RC2005): MQRC_BUFFER_LENGTH_ERROR * 2006 (07D6) (RC2006): MQRC_CHAR_ATTR_LENGTH_ERROR * 2007 (07D7) (RC2007): MQRC_CHAR_ATTRS_ERROR * 2008 (07D8) (RC2008): MQRC_CHAR_ATTRS_TOO_SHORT * 2009 (07D9) (RC2009): MQRC_CONNECTION_BROKEN * 2010 (07DA) (RC2010): MQRC_DATA_LENGTH_ERROR * 2011 (07DB) (RC2011): MQRC_DYNAMIC_Q_NAME_ERROR * 2012 (07DC) (RC201

    IBM WebSphere MQ – Common install/uninstall issues for MQ Version on Windows - Middleware News

    Creating a log file when you install or uninstall WebSphere MQ WebSphere MQ for Windows is installed using the Microsoft Installer (MSI). If you install the MQ server or client through launchpad , MQPARMS or setup.exe , then a log file is automatically generated in %temp% during installation. Alternatively you can supply parameters on the installation MSI command msiexec to generate a log file, or enable MSI logging system-wide (which generates MSI logs for all install and uninstall operations). If you uninstall through the Windows Add/Remove programs option, no log file is generated. You should either uninstall from the MSI command line and supply parameters to generate a log file, or enable MSI logging system-wide (which generates MSI logs for all install and uninstall operations). For details on how to enable MSI logging, see the following article in the WebSphere MQ product documentation: Advanced installation using msiexec For details on how to enable system-w