Search code examples
ibm-mq

Connect Remote Queue Manager in a container via MQ Explorer


I want to access queue manager via mq explorer but getting an error:

  • Could not establish a connection to the queue manager - reason 2538. (AMQ4059) Could not establish a connection to the queue manager - reason 2538. (AMQ4059)
  • Severity: 10 (Warning)
  • Explanation: The attempt to connect to the queue manager failed. This could be because the queue manager is incorrectly configured to allow a connection from this system, or the connection has been broken.
  • Response: Try the operation again. If the error persists, examine the problem determination information to see if any information has been recorded.

I followed all the instructions in https://www-01.ibm.com/support/docview.wss?uid=swg21623113 in order to allow mq explorer to be able to access mq server but still no luck.

IBM MQ Server details:

  • Version: 8
  • OS: Centos
  • Running in a docker container
  • Using port 1417 since my 1414 port is not available for another MQ server
  • Listener is up an running and pointing port 1417
  • Channel is defined as it is described in the link that I shared (I disabled all security features as it is described)
  • I have a sample Java App that I can put/get messages and it is working fine

MQ Explorer details:

I was expecting to get an error message in my MQ Server to understand the issue but surprisingly there is no error message at all ...

Screenshot


Solution

  • You've stated that your queue manager(s) are running in a container and your MQ Explorer is running in another container. I've noticed you've supplied 0.0.0.0 as your hostname but the container where MQ Explorer is running has no queue managers running on it!

    If you run the following command (replacing with the ID of the container running your queue managers) you should get the IP address of the container on the docker subnet. Try using that IP address in MQ Explorer instead of 0.0.0.0:

    docker inspect --format "{{ .NetworkSettings.IPAddress }}" <QM container>
    

    If your container is on a different docker network then you will need to run the following replacing with the name you gave the docker network:

    docker inspect --format "{{ .NetworkSettings.Networks.<Network Name>.IPAddress }}" <QM container>
    

    Additionally, when you created your queue manager container did you remember to expose the 1417 port you are trying to use? By default the mq-container sample only exposes the following ports: 1414, 9157 & 9443. When you ran the container you would of needed to expose the ports but supplying --publish-all --publish 1417 when you ran the container. For example:

    docker run -d -e LICENSE=accept --publish-all --publish 1417 ibmcom/mq