1

Error detail as following: (stacktrace)

Caused by: com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2009'.
        at com.ibm.mq.MQDestination.open(MQDestination.java:310)
        at com.ibm.mq.MQQueue.<init>(MQQueue.java:261)
        at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:2751)
        at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:2779)
        at com.citi.sh.h2h.service.adapter.H2hMqSendReceiveAdapter.connect(H2hMqSendReceiveAdapter.java:79)
        ... 17 more

Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2009
        at com.ibm.mq.jmqi.remote.internal.RemoteHconn.getConnection(RemoteHconn.java:884)
        at com.ibm.mq.jmqi.remote.internal.RemoteHconn.getCmdLevel(RemoteHconn.java:2698)
        at com.ibm.mq.MQDestination.open(MQDestination.java:302)
        ... 21 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:1515)
        at com.ibm.mq.jmqi.remote.internal.RemoteRcvThread.receiveBuffer(RemoteRcvThread.java:804)
        at com.ibm.mq.jmqi.remote.internal.RemoteRcvThread.receiveOneTSH(RemoteRcvThread.java:768)
        at com.ibm.mq.jmqi.remote.internal.RemoteRcvThread.run(RemoteRcvThread.java:158)
        at java.lang.Thread.run(Thread.java:745)

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 com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.receive(RemoteTCPConnection.java:1505)
        ... 4 more

In windows 2003 server, my application running as a service to connect MQ to execute message. Some process executed successfully, but some are failed. The above error occurred. My Java application use JDK1.7 and MQ version is 7.0.1.11 Could you give me some solution to fix this issue? Thank your very much for your help!

HW.BL
  • 11
  • 2

1 Answers1

0

IBM MQ v7.0 went out of support on September 30th 2015.

I would suggest that you move to a supported version of IBM MQ. I'm leaving 7.1 out of the list below since it will go out of support on April 30 2017. Note that 7.5 will go out of support on April 30 2018.

MQ 7.5 client
MQ 8.0 client
MQ 9.0 client


If you must continue to use a out of support version I did find some references to the cause of your problem being that the Windows server supports both a IPv4 and IPv6 stacks. The solution was to force the JRE to use IPv4 only by adding the following setting to your Java startup.

-Djava.net.preferIPv4Stack=true
JoshMc
  • 10,239
  • 2
  • 19
  • 38
  • Thank you very much for your reply. I will to do the test. Do you think this issue caused by Java7? The JVM not matched with the MQ 7.0. – HW.BL Feb 27 '17 at 06:27
  • @HW.BL It looks like 7.0.1.11 would have supported Java7, the [system requirements](http://www-01.ibm.com/support/docview.wss?uid=swg27011920) indicate that 7.0.1.6 added support for Oracle Java SDK/JRE/JDK 7.0.5. – JoshMc Feb 27 '17 at 06:33
  • My JDK version is 1.7.0_101(32bit). The issue appeared randomly, so it is strange. – HW.BL Feb 27 '17 at 06:49
  • @HW.BL did your issue resolve with the -Djava.net.preferIPv4Stack=true setting or an upgrade of your MQ client version? – JoshMc Mar 03 '17 at 15:23