MQConnectionFactory尝试创建连接时出现错误。 同时我可以从独立应用程序发送\ receive消息。
jboss stack trace。
Caused by: com.ibm.mq.MQException: JMSCMQ0001: JMSCMQ0001, 2, MQCC_FAILED, 2195, MQRC_UNEXPECTED_ERROR
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:209)
... 24 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195;AMQ9204: Connection to host 'hostname(1450)' rejected. [1=com.ibm.mq.jmqi.JmqiException[CC=2;RC=2195],3=hostname(1450),5=WMQThreadPool.enqueue]
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:2053)
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1226)
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:346)
... 23 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195
at com.ibm.msg.client.wmq.common.internal.WMQThreadPool.enqueue(WMQThreadPool.java:109)
at com.ibm.mq.jmqi.remote.impl.RemoteConnection.setUpAsyncMode(RemoteConnection.java:1554)
at com.ibm.mq.jmqi.remote.impl.RemoteConnection.initSess(RemoteConnection.java:1348)
at com.ibm.mq.jmqi.remote.impl.RemoteConnection.connect(RemoteConnection.java:727)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSessionFromNewConnection(RemoteConnectionSpecification.java:400)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSession(RemoteConnectionSpecification.java:299)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionPool.getSession(RemoteConnectionPool.java:164)
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1598)
... 25 more
Caused by: com.ibm.msg.client.commonservices.CSIException: JMSCS0002
at com.ibm.msg.client.commonservices.workqueue.PIWorkQueueManager.enqueueItem(PIWorkQueueManager.java:67)
at com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.enqueue(WorkQueueManager.java:225)
at com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.enqueue(WorkQueueManager.java:194)
at com.ibm.msg.client.wmq.common.internal.WMQThreadPool.enqueue(WMQThreadPool.java:91)
查询管理器日志:
----- amqrmrsa.c : 898 --------------------------------------------------------
24.03.2015 17:09:06 - Process(21296.261) User(mqm) Program(amqrmppa)
Host(localserver-name) Installation(Installation1)
VRMF(7.5.0.2) QMgr(manager-name)
AMQ9209: Connection to host 'jboss-short-hostname (jboss-ip)' for channel
'channel-name' closed.
EXPLANATION:
An error occurred receiving data from 'jboss-short-hostname (jboss-ip)' over TCP/IP.
The connection to the remote host has unexpectedly terminated.
The channel name is 'channel-name'; in some cases it cannot be determined and so
is shown as '????'.
ACTION:
Tell the systems administrator.
----- amqccita.c : 3843 -------------------------------------------------------
24.03.2015 17:09:06 - Process(21296.261) User(mqm) Program(amqrmppa)
Host(localserver-name) Installation(Installation1)
VRMF(7.5.0.2) QMgr(manager-name)
AMQ9999: Channel 'channel-name' to host 'jboss-short-hostname (jboss-ip)' ended
abnormally.
EXPLANATION:
The channel program running under process ID 21296 for channel 'channel-name'
ended abnormally. The host name is 'jboss-short-hostname (jboss-ip)'; in some cases
the host name cannot be determined and so is shown as '????'.
ACTION:
Look at previous error messages for the channel program in the error logs to
determine the cause of the failure. Note that this message can be excluded
completely or suppressed by tuning the "ExcludeMessage" or "SuppressMessage"
attributes under the "QMErrorLog" stanza in qm.ini. Further information can be
found in the System Administration Guide.
----- amqrmrsa.c : 898 --------------------------------------------------------
关于我的测试台: 保险丝面料(7.2.0.redhat-024) IBM WebSphere MQ版本:7.5.0.2 Java 1.7
服务器WebSphere MQ和jboss安装在不同的服务器上。
我在jar之后安装了以下功能:
com.ibm.mq.osgi.directip_7.5.0.2.jar
com.ibm.mq.osgi.java_7.5.0.2.jar
com.ibm.msg.client.osgi.commonservices.j2se_7.5.0.2.jar
com.ibm.msg.client.osgi.jms.prereq_7.5.0.2.jar
com.ibm.msg.client.osgi.jms_7.5.0.2.jar
com.ibm.msg.client.osgi.nls_7.5.0.2.jar
com.ibm.msg.client.osgi.wmq.nls_7.5.0.2.jar
com.ibm.msg.client.osgi.wmq.prereq_7.5.0.2.jar
com.ibm.msg.client.osgi.wmq_7.5.0.2.jar
我的代码段:
MQQueueConnectionFactory cf = new MQQueueConnectionFactory();
// Config
cf.setHostName("hostname");
cf.setPort("port");
cf.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
cf.setChannel("channel-name");
cf.setQueueManager("manager-name");
MQQueueConnection connectionDpc = (MQQueueConnection) cf.createQueueConnection("user", "pass");
答案 0 :(得分:0)
请尝试使用IBM MQ 7.5.0.6(或更高版本)OSGI捆绑包。已知7.5.0.2捆绑包存在此问题。