IBM MQ

Expand all | Collapse all

IBM MQ Client under Docker

  • 1.  IBM MQ Client under Docker

    Posted Wed February 12, 2020 10:59 AM
    I'm looking for a solution to run IBM MQ Client under a Windows Docker instance. I know that Docker Hub only provides Linux implementations of MQ, however I do not need full MQ Server capability.  Instead, I'm hoping there's a means to install MQ Client and simply connect to a Channel and Queues defined on another (non-Docker) system. To approach this, I've done the following:

    1. Spun up a Windows Docker container running under a command prompt (for proof of concept)
    2. Copied in and expanded MQ Client (9.0.0.8-IBM-MQC-Win64.zip)
    3. Silently installed MQ Client (e.g. msiexec /i "c:\temp\Windows\MSI\IBM MQ.msi" /l*v c:\temp\install.log /q TRANSFORMS="1033.mst" AGREETOLICENSE="yes" ADDLOCAL="Client"). Note: The installation was successful and without error.
    4. Established required enviornment variables (MQServer, etc.) and updated paths (classpath, lib, include, etc).
    5. Pinged MQ server system to verify connectivity.
    I attempted to put a message on a working, verified queue using, "amqsputc.exe MYDOCKER.DS.Q". The immediate return code is: "MQCONNX ended with reason code 2195". Unforunately, 2195 is pretty generic and there are no other logs available to review.

    I understand the differences of running under a VM versus a container, however since I only need Client access, I was hoping MQ Client was lightweight enough to be useable.

    If MQ Client is not a viable direction, is there an MQ solution which might be doable via a Cloud connection?

    Thanks in advance for all input.

    ------------------------------
    J Cofer
    ------------------------------


  • 2.  RE: IBM MQ Client under Docker

    Posted Thu February 13, 2020 04:13 AM
    Hi J Cofer,
    amqsputc $queue $qmgr
    Have you followed these instructions to test your MQ client.
    https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.1.0/com.ibm.mq.doc/zi00440_.htm


    ------------------------------
    Matthias Jungbauer
    ------------------------------



  • 3.  RE: IBM MQ Client under Docker

    Posted Thu February 13, 2020 04:32 AM

    Most things that I can think of should have come up with a different error. If you didn't have a c runtime set up then amqsputc would not have run. If there was a network connectivity / port issue then you would have got a host not available error. 

    I am suspecting that you are getting something like an untrusted server error, but you should check client side logs to see how far the sample app got before the error occurred. 

    One thing that you can try to verify connectivity is : If you have a browser in your Windows Docker image, open up the MQ Console. It will be on 
    https://<MQ Server IP>:9443/ibmmq/console/login.html . You may need to accept a connection to an untrusted server. If you can get in then you have proven connectivity and you may have had to mark the server as trusted in the process. 

    If you can't get into the console, then something is blocking the network traffic.



    ------------------------------
    Soheel Chughtai
    ------------------------------



  • 4.  RE: IBM MQ Client under Docker

    Posted Thu February 13, 2020 06:34 PM
    I don't have experience with MQ client in Docker in Windows.  But I have done some debugging of windows clients.   In those cases, I've used mq trace.   I'd also try dspmqver to confirm that you have a good install.
    For your client trace:
    strmqtrc -e -t all -t detail
    amqsputc qname qmgrname
    endmqtrc -a
    then look at the trace files generated in your your trace directory.
    there should be a hint to the reason for the 2195 in there.
    I also assume you're looking at a C or .NET client program to be running in your docker container.   You mention classpath.  If it's MQ Classes for Java or JMS then test with those samples as they way they connect is different than the C client libraries.

    ------------------------------
    Tom Kane
    Senior Technical Team Lead
    AT&T
    Kansas City
    ------------------------------