2
votes

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

3
Which version of MQ v8 are you using for the queue manager (for example 8.0.0.3 or 8.0.0.11)? Check that DIS QMGR CHLEV is set to ENABLED if it is not, then enable it with ALTER QMGR CHLEV(ENABLED). Reproduce the failure and check to see any messages are generated in the SYSTEM.ADMIN.CHANNEL.EVENT queue. If you see messages then run this: /opt/mqm/samp/bin/amqsevt -m QMGRNAME -q SYSTEM.ADMIN.CHANNEL.EVENT. Look at the last few messages to see if they correspond to your MQ Explorer and explain why you see a failure. - JoshMc
Both the comment from @JoshMc and the answer from Roger are suggesting you are having security issues, but reason code 2358 is MQRC_HOST_NOT_AVAILABLE, so you should double check your connectivity. You have suggested that you have not got connectivity issues because you can telnet to the QMgr - is this telnet from the same machine/docker container as the MQ Explorer is running in? You don't show us a screen shot of your MQ Explorer connection settings - we can only assume you have input the correct port there? - Morag Hughson
@JoshMc, many thanks for the advice! I followed your recommendations and as you mentioned, a record appeared in SYSTEM.ADMIN.CHANNEL.EVENT queue. Unfortunately, I do not have amqsevt script. I do have /opt/mqm/samp folder but no bin folder. I also check /opt/mqm/bin folder too but no luck. I will try to find amqsevt. Many thanks for the tip! - penny
@JoshMc, I should tell you my steps since I have feeling that the message in the queue might not be related to my issue. I changed CHLEV value in my queue manager and tried to login from mq explorer again. Nothing happened. Then, I thought that I should restart my queue manager so I did. Then, started my listener and then I thought I should start my channel as well since it is necesary for remote queue so I thought that it might be a requirement for mq explorer as well .. Anyway, I think the message in SYSTEM.ADMIN.CHANNEL.EVENT is most likely from my start channel command :( - penny
@JoshMc, I just stopped/started my channel and the number of messages becomes 3 - penny

3 Answers

2
votes

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
1
votes

You have attempted to connect your MQ Explorer to your queue manager using the following connection details:-

  • Host name or IP address: 0.0.0.0
  • Port number: 1417
  • Server-connection channel: SYSTEM.ADMIN.SVRCONN

and you have received return code MQRC_HOST_NOT_AVAILABLE(2358) which says that the network address is not reachable.

Common reasons for this error include not having a TCP.IP listener running using that port, but you have told us you have got a listener running.

The IP address you have used is the problem. Change the IP address in your MQ Explorer configuration to the actual IP address where the queue manager is running. If the MQ Explorer and Queue Manager are on the same machine (in the same container), you can use the localhost hostname or the IP address 127.0.0.1, otherwise, please use the assigned IP address for the machine. From your screenshot it appears that this might be a 192.168.* address.

0
votes

You don't say what version of IBM MQ your queue manager is running under. i.e. v7.5, v8.0, v9.0 or v9.1.

Did you give yourself CHLAUTH permission to use the SYSTEM.ADMIN.SVRCONN channel? Most likely you are being blocked by the backstop rule.

Also, if you are on IBM MQ v8.0 or higher then then CONNAUTH could be blocking you.

Here are 2 good links to walk you through your issue.

https://www.ibm.com/developerworks/community/blogs/aimsupport/entry/blocked_by_chlauth_why?lang=en

https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_8.0.0/com.ibm.mq.mig.doc/q001110_.htm