IBM MQ 调用失败,代码为“2”(“MQCC_FAILED”),原因为“2009”(“MQRC_CONNECTION_BROKEN”)

问题描述 投票:0回答:1

我收到此错误,直到该主题没有发布者为止。一旦有发布者并且消息开始在该主题上发布,JMS 侦听器就会积极侦听,错误消息就会消失。

有时一个月都没有抛出错误,然后突然抛出 1-2 条错误消息并再次开始工作。

你有什么建议吗?

相关依赖;

        <java.version>17</java.version>
        <spring.boot.version>3.1.3</spring.boot.version>
        <springframework.version>6.0.11</springframework.version>

        <jakarta.annotation.version>2.1.1</jakarta.annotation.version>
        <jakarta.xml.version>4.0.0</jakarta.xml.version>
        <jakarta.xml.soap.version>3.0.0</jakarta.xml.soap.version>
        <jakarta.jws.version>3.0.0</jakarta.jws.version>
        <jakarta.jms.version>3.1.0</jakarta.jms.version>
        <jakarta.servlet.version>6.0.0</jakarta.servlet.version>
        <jakarta.mail.version>1.1.0</jakarta.mail.version>
        <ibm.mq.jakarta.version>9.3.3.0</ibm.mq.jakarta.version>

        <tomcat.annotations.version>10.1.12</tomcat.annotations.version>
        <tomcat.version>11.0.0-M4</tomcat.version>
   Message : com.ibm.msg.client.jakarta.jms.DetailedJMSException: JMSWMQ1107: A problem with this connection has occurred.
An error has occurred with the IBM MQ JMS connection.
Use the linked exception to determine the cause of this error.
                         Class : class com.ibm.msg.client.jakarta.jms.DetailedJMSException
                         Stack : com.ibm.msg.client.jakarta.wmq.common.internal.Reason.reasonToException(Reason.java:595)
                               : com.ibm.msg.client.jakarta.wmq.common.internal.Reason.createException(Reason.java:215)
                               : com.ibm.msg.client.jakarta.wmq.internal.WMQSession.disconnect(WMQSession.java:829)
                               : com.ibm.msg.client.jakarta.wmq.internal.WMQSession.close(WMQSession.java:783)
                               : com.ibm.msg.client.jakarta.jms.internal.JmsSessionImpl.close(JmsSessionImpl.java:632)
                               : com.ibm.msg.client.jakarta.jms.internal.JmsSessionImpl.close(JmsSessionImpl.java:355)
                               : com.ibm.mq.jakarta.jms.MQSession.close(MQSession.java:280)
                               : org.springframework.jms.support.JmsUtils.closeSession(JmsUtils.java:109)
                               : org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1289)
                               : org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1135)
                               : java.lang.Thread.run(null:-1)


     Caused by [1] --> Message : com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2009' ('MQRC_CONNECTION_BROKEN').
                         Class : class com.ibm.mq.MQException
                         Stack : com.ibm.msg.client.jakarta.wmq.common.internal.Reason.createException(Reason.java:203)
                               : com.ibm.msg.client.jakarta.wmq.internal.WMQSession.disconnect(WMQSession.java:829)
                               : com.ibm.msg.client.jakarta.wmq.internal.WMQSession.close(WMQSession.java:783)
                               : com.ibm.msg.client.jakarta.jms.internal.JmsSessionImpl.close(JmsSessionImpl.java:632)
                               : com.ibm.msg.client.jakarta.jms.internal.JmsSessionImpl.close(JmsSessionImpl.java:355)
                               : com.ibm.mq.jakarta.jms.MQSession.close(MQSession.java:280)
                               : org.springframework.jms.support.JmsUtils.closeSession(JmsUtils.java:109)
                               : org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1289)
                               : org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1135)
                               : java.lang.Thread.run(null:-1)


     Caused by [2] --> Message : com.ibm.mq.jmqi.JmqiException: CC=2;RC=2009;AMQ9206: Error sending data to host '{HOST} {HOST}'. [1=com.ibm.mq.jmqi.JmqiException[CC=2;RC=2009],3={HOST} {HOST}),4=TCP,5=RemoteTCPConnection.send(byte [ ],int,int,int,int)]
                         Class : class com.ibm.mq.jmqi.JmqiException
                         Stack : com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.send(RemoteTCPConnection.java:1830)
                               : com.ibm.mq.jmqi.remote.impl.RemoteConnection.wrapSend(RemoteConnection.java:3027)
                               : com.ibm.mq.jmqi.remote.impl.RemoteConnection.sendTSH(RemoteConnection.java:2793)
                               : com.ibm.mq.jmqi.remote.impl.RemoteSession.sendTSH(RemoteSession.java:793)
                               : com.ibm.mq.jmqi.remote.impl.RemoteSession.sendTSH(RemoteSession.java:709)
                               : com.ibm.mq.jmqi.remote.api.RemoteFAP.MQDISC(RemoteFAP.java:1678)
                               : com.ibm.mq.jmqi.remote.api.RemoteFAP.MQDISC(RemoteFAP.java:1613)
                               : com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.MQDISC(InterceptedJmqiImpl.java:410)
                               : com.ibm.mq.ese.jmqi.ESEJMQI.MQDISC(ESEJMQI.java:396)
                               : com.ibm.msg.client.jakarta.wmq.internal.WMQSession.disconnect(WMQSession.java:817)
                               : com.ibm.msg.client.jakarta.wmq.internal.WMQSession.close(WMQSession.java:783)
                               : com.ibm.msg.client.jakarta.jms.internal.JmsSessionImpl.close(JmsSessionImpl.java:632)
                               : com.ibm.msg.client.jakarta.jms.internal.JmsSessionImpl.close(JmsSessionImpl.java:355)
                               : com.ibm.mq.jakarta.jms.MQSession.close(MQSession.java:280)
                               : org.springframework.jms.support.JmsUtils.closeSession(JmsUtils.java:109)
                               : org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1289)
                               : org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1135)
                               : java.lang.Thread.run(null:-1)


     Caused by [3] --> Message : com.ibm.mq.jmqi.JmqiException: CC=2;RC=2009
                         Class : class com.ibm.mq.jmqi.JmqiException
                         Stack : com.ibm.mq.jmqi.remote.impl.RemoteConnection.asyncConnectionBroken(RemoteConnection.java:3891)
                               : com.ibm.mq.jmqi.remote.impl.RemoteRcvThread.run(RemoteRcvThread.java:644)
                               : com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.runTask(WorkQueueItem.java:319)
                               : com.ibm.msg.client.commonservices.workqueue.SimpleWorkQueueItem.runItem(SimpleWorkQueueItem.java:99)
                               : com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.run(WorkQueueItem.java:343)
                               : com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.runWorkQueueItem(WorkQueueManager.java:312)
                               : com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManagerImplementation$ThreadPoolWorker.run(WorkQueueManagerImplementation.java:1240)
     Caused by [4] --> Message : com.ibm.mq.jmqi.JmqiException: CC=2;RC=2009;AMQ9208: Error on receive from host '{HOST} {HOST})'. [1=-1,2=ffffffff,3=k{HOST} {HOST},4=TCP]
                         Class : class com.ibm.mq.jmqi.JmqiException
                         Stack : com.ibm.mq.jmqi.remote.impl.RemoteRcvThread.receiveBuffer(RemoteRcvThread.java:858)
                               : com.ibm.mq.jmqi.remote.impl.RemoteRcvThread.receiveOneTSH(RemoteRcvThread.java:798)
                               : com.ibm.mq.jmqi.remote.impl.RemoteRcvThread.run(RemoteRcvThread.java:161)
                               : com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.runTask(WorkQueueItem.java:319)
                               : com.ibm.msg.client.commonservices.workqueue.SimpleWorkQueueItem.runItem(SimpleWorkQueueItem.java:99)
                               : com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.run(WorkQueueItem.java:343)
                               : com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.runWorkQueueItem(WorkQueueManager.java:312)
                               : com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManagerImplementation$ThreadPoolWorker.run(WorkQueueManagerImplementation.java:1240)
'.

EXPLANATION:
An attempt was made to deliver an exception to the connections exception listener but a listener has not been registered.

ACTION:
An exception listener must be registered with the connection to receive its exceptions.

我尝试更改 ibmmq 的版本和其他一些依赖项。 首先,当我使用 javax dependentecies 并且我完全迁移到雅加达时,我遇到了错误。但我仍然有同样的错误。

queue connection jms ibm-mq mq
1个回答
0
投票

我的应用程序和 MQ 之间有防火墙。如果在可配置的时间内没有任何流量,它就会丢弃会话。在 mq 级别我定义 keepAlive。问题解决了。

© www.soinside.com 2019 - 2024. All rights reserved.