首页 > 解决方案 > JMSWMQ0018:无法使用连接模式连接到队列管理器

问题描述

再会。我无法克服这个错误。

我发送 xml 消息并且给定的错误下降。

我这边的发送配置有问题还是其他问题?

JMSWMQ0018: Failed to connect to queue manager 'QM1' with connection mode 'Client' and host name 'localhost(1414)'.; nested exception is com.ibm.msg.client.jms.DetailedIllegalStateException: JMSWMQ0018: Failed to connect to queue manager 'QM1' with connection mode 'Client' and host name 'localhost(1414)'.
Check the queue manager is started and if running in client mode, check there is a listener running. Please see the linked exception for more information.; nested exception is com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2538' ('MQRC_HOST_NOT_AVAILABLE').

标签: javajmsibm-mq

解决方案


JMSWMQ0018:无法使用连接模式“客户端”和主机名“本地主机(1414)”连接到队列管理器“QM1”。

JMSCMQ0001:IBM MQ 调用失败,compcode '2' ('MQCC_FAILED') 原因 '2538' ('MQRC_HOST_NOT_AVAILABLE')。

  1. 您是否有一个名为“QM1”的队列管理器在您的 PC/笔记本电脑上本地运行?

  2. 你可以试试 '127.0.0.1(1414)' 而不是 'localhost(1414)'

  3. 由于您的队列管理器在本地运行,因此您可以在绑定模式下进行连接。即从您的 MQ 连接详细信息中删除主机名、端口号和通道名称。

  4. 您是否在端口 1414 上定义了 MQ 侦听器?你开始了吗?

即 MQSC 命令:

DEFINE LISTENER('LISTENER.TCP') TRPTYPE(TCP) CONTROL(QMGR) PORT(1414)
START LISTENER('LISTENER.TCP')

推荐阅读