简体   繁体   English

通过 MQ Explorer 连接容器中的远程队列管理器

[英]Connect Remote Queue Manager in a container via MQ Explorer

I want to access queue manager via mq explorer but getting an error:我想通过 mq explorer 访问队列管理器,但出现错误:

  • Could not establish a connection to the queue manager - reason 2538. (AMQ4059) Could not establish a connection to the queue manager - reason 2538. (AMQ4059)无法与队列管理器建立连接 - 原因 2538。(AMQ4059) 无法与队列管理器建立连接 - 原因 2538。(AMQ4059)
  • Severity: 10 (Warning)严重性:10(警告)
  • 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.我按照https://www-01.ibm.com/support/docview.wss?uid=swg21623113中的所有说明进行操作,以允许 mq explorer 能够访问 mq 服务器,但仍然没有运气。

IBM MQ Server details: IBM MQ 服务器详细信息:

  • Version: 8版本:8
  • OS: Centos操作系统:Centos
  • Running in a docker container在 docker 容器中运行
  • Using port 1417 since my 1414 port is not available for another MQ server使用端口 1417,因为我的 1414 端口不可用于另一个 MQ 服务器
  • Listener is up an running and pointing port 1417侦听器正在运行并指向端口 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我有一个示例 Java 应用程序,可以放置/获取消息,并且运行良好

MQ Explorer details: MQ 资源管理器详细信息:

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 ...我期待在我的 MQ 服务器中收到一条错误消息来理解这个问题,但令人惊讶的是根本没有错误消息......

Screenshot截屏

You've stated that your queue manager(s) are running in a container and your MQ Explorer is running in another container.您已经声明您的队列管理器正在一个容器中运行,而您的 MQ Explorer 正在另一个容器中运行。 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!我注意到您提供了 0.0.0.0 作为您的主机名,但是运行 MQ Explorer 的容器没有运行队列管理器!

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.如果您运行以下命令(用运行队列管理器的容器的 ID 替换),您应该在 docker 子网上获得容器的 IP 地址。 Try using that IP address in MQ Explorer instead of 0.0.0.0:尝试在 MQ Explorer 中使用该 IP 地址而不是 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 网络上,那么您需要使用您为 docker 网络指定的名称来运行以下命令:

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?此外,当您创建队列管理器容器时,您是否记得公开您尝试使用的 1417 端口? 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.默认情况下, mq-container示例仅公开以下端口:1414、9157 和 9443。当您运行容器时,您需要公开端口,但在运行容器时提供--publish-all --publish 1417 For example:例如:

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

You have attempted to connect your MQ Explorer to your queue manager using the following connection details:-您已尝试使用以下连接详细信息将 MQ Explorer 连接到队列管理器:-

  • Host name or IP address: 0.0.0.0主机名或 IP 地址:0.0.0.0
  • Port number: 1417端口号:1417
  • Server-connection channel: SYSTEM.ADMIN.SVRCONN服务器连接通道:SYSTEM.ADMIN.SVRCONN

and you have received return code MQRC_HOST_NOT_AVAILABLE(2358) which says that the network address is not reachable.并且您收到了返回代码 MQRC_HOST_NOT_AVAILABLE(2358),它表示无法访问网络地址。

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.此错误的常见原因包括没有使用该端口运行 TCP.IP 侦听器,但您告诉我们您有一个侦听器正在运行。

The IP address you have used is the problem.您使用的 IP 地址是问题所在。 Change the IP address in your MQ Explorer configuration to the actual IP address where the queue manager is running.将 MQ Explorer 配置中的 IP 地址更改为运行队列管理器的实际 IP 地址。 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.如果 MQ Explorer 和 Queue Manager 在同一台机器上(在同一容器中),您可以使用 localhost 主机名或 IP 地址 127.0.0.1,否则请使用为机器分配的 IP 地址。 From your screenshot it appears that this might be a 192.168.* address.从您的屏幕截图看来,这可能是一个 192.168.* 地址。

You don't say what version of IBM MQ your queue manager is running under.您没有说明您的队列管理器在哪个版本的 IBM MQ 下运行。 ie v7.5, v8.0, v9.0 or v9.1.即 v7.5、v8.0、v9.0 或 v9.1。

Did you give yourself CHLAUTH permission to use the SYSTEM.ADMIN.SVRCONN channel?您是否已授予 CLAAUTH 使用 SYSTEM.ADMIN.SVRCONN 频道的权限? 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.此外,如果您使用的是 IBM MQ v8.0 或更高版本,那么 CONNAUTH 可能会阻止您。

Here are 2 good links to walk you through your issue.这里有 2 个很好的链接,可以引导您解决问题。

https://www.ibm.com/developerworks/community/blogs/aimsupport/entry/blocked_by_chlauth_why?lang=en 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 https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_8.0.0/com.ibm.mq.mig.doc/q001110_.htm

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM