2015-01-13 198 views
0

WSO2 ESB有時會丟失與Websphere MQ的JMS連接。建立新的連接持續至少1-2秒。這會導致使用此連接的代理服務超時。wso2 ESB - websphere MQ JMS丟失連接

WSO2 ESB 4.8.1,IBM MQ Webpshere 7.0.1.12

奇怪的堆棧跟蹤:

2014-12-18 06:47:51,183 [-] [JMSCCThreadPoolWorker-7] ERROR ServiceTaskManager JMS Connection failed : JMSWMQ1107: A problem with this connection has occurred. - shutting down worker tasks 
2014-12-18 06:47:52,212 [-] [JMSCCThreadPoolWorker-7] ERROR ServiceTaskManager Error closing shared Connection 
com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ0019: Failed to disconnect from queue manager 'name' using connection mode '1' and host name 'host(1441)'. Please see the linked exception for more information. 
    at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:608) 
    at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:236) 
    at com.ibm.msg.client.wmq.internal.WMQConnection.close(WMQConnection.java:742) 
    at com.ibm.msg.client.jms.internal.JmsConnectionImpl.close(JmsConnectionImpl.java:352) 
    at com.ibm.mq.jms.MQConnection.close(MQConnection.java:93) 
    at org.apache.axis2.transport.jms.ServiceTaskManager.stop(ServiceTaskManager.java:237) 
    at org.apache.axis2.transport.jms.ServiceTaskManager.start(ServiceTaskManager.java:166) 
    at org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.onException(ServiceTaskManager.java:631) 
    at com.ibm.msg.client.jms.internal.JmsProviderExceptionListener.run(JmsProviderExceptionListener.java:429) 
    at com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.runTask(WorkQueueItem.java:209) 
    at com.ibm.msg.client.commonservices.workqueue.SimpleWorkQueueItem.runItem(SimpleWorkQueueItem.java:100) 
    at com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.run(WorkQueueItem.java:224) 
    at com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.runWorkQueueItem(WorkQueueManager.java:298) 
    at com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManagerImplementation$ThreadPoolWorker.run(WorkQueueManagerImplementation.java:1220) 
Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2009' ('MQRC_CONNECTION_BROKEN'). 
    at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:223) 
    ... 12 more 
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2009 
    at com.ibm.mq.jmqi.remote.internal.RemoteHconn.enterCall(RemoteHconn.java:428) 
    at com.ibm.mq.jmqi.remote.internal.RemoteHconn.enterCall(RemoteHconn.java:350) 
    at com.ibm.mq.jmqi.remote.internal.RemoteHconn.enterCall(RemoteHconn.java:325) 
    at com.ibm.mq.jmqi.remote.internal.RemoteFAP.MQDISC(RemoteFAP.java:2541) 
    at com.ibm.msg.client.wmq.internal.WMQConnection.close(WMQConnection.java:724) 
    ... 11 more 
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2009;AMQ9213: A communications error for 'TCP' occurred. [1=java.net.SocketException[Unrecognized Windows Sockets error: 0: recv failed],4=TCP,5=sockInStream.read] 
    at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.receive(RemoteTCPConnection.java:1418) 
    at com.ibm.mq.jmqi.remote.internal.RemoteRcvThread.receiveBuffer(RemoteRcvThread.java:737) 
    at com.ibm.mq.jmqi.remote.internal.RemoteRcvThread.receiveOneTSH(RemoteRcvThread.java:701) 
    at com.ibm.mq.jmqi.remote.internal.RemoteRcvThread.run(RemoteRcvThread.java:146) 
    ... 5 more 
Caused by: java.net.SocketException: Unrecognized Windows Sockets error: 0: recv failed 
    at java.net.SocketInputStream.socketRead0(Native Method) 
    at java.net.SocketInputStream.read(SocketInputStream.java:152) 
    at java.net.SocketInputStream.read(SocketInputStream.java:122) 
    at sun.security.ssl.InputRecord.readFully(InputRecord.java:442) 
    at sun.security.ssl.InputRecord.read(InputRecord.java:480) 
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927) 
    at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:884) 
    at sun.security.ssl.AppInputStream.read(AppInputStream.java:102) 
    at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.receive(RemoteTCPConnection.java:1409) 
    ... 8 more 
2014-12-18 06:49:53,302 [-] [DefaultQuartzScheduler_Worker-1] ERROR MessageInjector Proxy Service: monitoring_Service not found 
2014-12-18 06:49:53,302 [-] [DefaultQuartzScheduler_Worker-1] ERROR JobRunShell Job synapse.simple.quartz.monitoring_Task threw an unhandled Exception: 
org.apache.synapse.SynapseException: Proxy Service: monitoring_Service not found 
    at org.apache.synapse.startup.tasks.MessageInjector.handleError(MessageInjector.java:333) 
    at org.apache.synapse.startup.tasks.MessageInjector.execute(MessageInjector.java:217) 
    at org.apache.synapse.startup.quartz.SimpleQuartzJob.execute(SimpleQuartzJob.java:88) 
    at org.quartz.core.JobRunShell.run(JobRunShell.java:213) 
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) 
2014-12-18 06:49:53,302 [-] [DefaultQuartzScheduler_Worker-1] ERROR ErrorLogger Job (synapse.simple.quartz.monitoring_Task threw an exception. 
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.apache.synapse.SynapseException: Proxy Service: monitoring_Service not found] 
    at org.quartz.core.JobRunShell.run(JobRunShell.java:224) 
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) 
Caused by: org.apache.synapse.SynapseException: Proxy Service: monitoring_Service not found 
    at org.apache.synapse.startup.tasks.MessageInjector.handleError(MessageInjector.java:333) 
    at org.apache.synapse.startup.tasks.MessageInjector.execute(MessageInjector.java:217) 
    at org.apache.synapse.startup.quartz.SimpleQuartzJob.execute(SimpleQuartzJob.java:88) 
    at org.quartz.core.JobRunShell.run(JobRunShell.java:213) 
    ... 1 more 

回答

0

你的堆棧跟蹤中看到關鍵的錯誤是:

造成的:JAVA .net.SocketException:無法識別的Windows套接字錯誤:0:recv失敗 at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:152) 在java.net.SocketInputStream.read(SocketInputStream.java:122)

這表明JVM收到了它不期望通過Windows套接字的東西。看起來您正在使用Oracle JVM,而不是MQ附帶的IBM。

我建議你嘗試升級到更新的JVM(如果有的話)。請注意,您正在使用的MQ 7.0.1客戶端支持Java 5和Java 6.如果要使用Java 7,則需要使用7.1或更高版本的MQ客戶端。所有IBM MQ客戶端是免費提供的通過MQC支持包:

MQ 7.1的客戶端:http://www-01.ibm.com/support/docview.wss?uid=swg24031412
MQ 7.5的客戶端:http://www-01.ibm.com/support/docview.wss?uid=swg24032744
MQ 8.0的客戶端:http://www-01.ibm.com/support/docview.wss?uid=swg24037500

如果有更新的JVM不可用來自甲骨文,我會建議與他們一起打開支持憑單,以便他們進行調查。