美好的一天。我无法克服这个错误。
我发送 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').
JMSWMQ0018:无法使用连接模式“客户端”和主机名“localhost(1414)”连接到队列管理器“QM1”。
JMSCMQ0001:IBM MQ 调用失败,代码为“2”(“MQCC_FAILED”),原因为“2538”(“MQRC_HOST_NOT_AVAILABLE”)。
您的 PC/笔记本电脑上本地运行名为“QM1”的队列管理器吗?
您可以尝试“127.0.0.1(1414)”而不是“localhost(1414)”
由于您的队列管理器在本地运行,因此您可以以绑定模式进行连接。即从 MQ 连接详细信息中删除主机名、端口号和通道名称。
您是否在端口 1414 上定义了 MQ 侦听器?你开始了吗?
即MQSC 命令:
DEFINE LISTENER('LISTENER.TCP') TRPTYPE(TCP) CONTROL(QMGR) PORT(1414)
START LISTENER('LISTENER.TCP')