当前位置: 首页 > 知识库问答 >
问题:

MQJMS2005:无法创建MQQueueManager出现MQException:完成代码2,原因2059 MQJE011:套接字连接尝试被拒绝

郎永福
2023-03-14

我们将消息从Java应用程序发布到队列。最近我们转移到新的高可用性生产服务器与我们的旧配置相同。但现在每当我们试图发布消息时,我们就会看到一个新的问题。在发布了几条信息后,我们得到的是:

“MQJMS2005:无法创建MQQueueManager出现MQException:完成代码2,原因2059 MQJE011:套接字连接尝试被拒绝”

我们做了telnet,一切看起来都很好。另一部分是,每当我们的MQ团队尝试启用trace来捕获错误时,它都能正常工作。

org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'AXMQMTIMSPRDHA:AXMQMTIMSPRDHA_QM'; nested exception is com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2059
MQJE011: Socket connection attempt refused
        at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
        at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
        at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
        at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:534)
        at org.springframework.jms.core.JmsTemplate.convertAndSend(JmsTemplate.java:641)
        at org.springframework.jms.core.JmsTemplate.convertAndSend(JmsTemplate.java:630)
        at com.lowes.trf.rerate.jms.MessageSender.sendMessageAsXml(MessageSender.java:54)
        at com.lowes.trf.rerate.jms.MessageSender$$FastClassByCGLIB$$b52d5402.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:631)
        at com.lowes.trf.rerate.jms.MessageSender$$EnhancerByCGLIB$$c88e6908.sendMessageAsXml(<generated>)
        at com.lowes.trf.rerate.service.ReRateService.sendMessageAsXml(ReRateService.java:151)
        at com.lowes.trf.rerate.batch.controller.ReRateBatchController.postResponseToEsbAsXml(ReRateBatchController.java:300)
        at com.lowes.trf.rerate.batch.controller.ReRateBatchController.execute(ReRateBatchController.java:229)
        at com.lowes.trf.rerate.batch.controller.ReRateBatchController$$FastClassByCGLIB$$66bcc521.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:627)
        at com.lowes.trf.rerate.batch.controller.ReRateBatchController$$EnhancerByCGLIB$$44b4ed47.execute(<generated>)
        at com.lowes.trf.rerate.batch.controller.ReRateBatchController.main(ReRateBatchController.java:71)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
        at java.lang.reflect.Method.invoke(Method.java:620)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'AXMQMTIMSPRDHA:AXMQMTIMSPRDHA_QM'
        at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:586)
        at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2110)
        at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1532)
        at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:150)
        at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:185)
        at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:112)
        at com.ibm.mq.jms.MQQueueConnectionFactory.createConnection(MQQueueConnectionFactory.java:1050)
        at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)
        at org.springframework.jms.core.JmsTemplate.access$500(JmsTemplate.java:85)
        at org.springframework.jms.core.JmsTemplate$JmsTemplateResourceFactory.createConnection(JmsTemplate.java:1031)
        at org.springframework.jms.connection.ConnectionFactoryUtils.doGetTransactionalSession(ConnectionFactoryUtils.java:297)
        at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:453)
        ... 27 more

共有1个答案

翁宏茂
2023-03-14

IBM文档说远程MQ管理器可能已关闭,请确保您正在使用的通道正常。此外,当您看到连接被拒绝时,请在远程计算机上运行dspmq以确保MQManager真正启动。

 类似资料: