IBM Websphere MQ: Failed to connect queue manager and queue with 2009 error code - java-7

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!

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

Related

Application team getting JMSFMQ6312: An exception occurred in the Java(tm) MQI

We are currently using web-sphere MQ 8.0..4,On linux machine.
Siel application connect to our queue manager with jndi. property and .binding files,earlier application working fine.but application upgraded from version 18 to 19 version also they have upgraded the java version from 1.7 to 1.8,post up gradation, application team facing below error. but we dont see any error in Queue manager logs. error written in application logs.
Application using below upgraded jdk version
D:\>java -version,java version "1.8.0_172",Java(TM) SE Run-time Environment (build 1.8.0_172-b11),Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
Application uses MQ to communicate with the external systems. application jndi.property and .binding files
below jar files are related to websphere MQ version 8.0.0.7.
File based (current in config) application team needed the below JAR files, we have given below jar to application team which is related to MQ version 8.0.0.7 to.
a) jms.jar
b) fscontext.jar
c) connector.jar
d) providerutil.jar
e) jta.jar - optional
f) ldap.jar - optional
g) com.ibm.mq.jar (IBM)
h) com.ibm.mqjms.jar (IBM)
i) dhbcore.jar (IBM)- for MQ 7.5
j) com.ibm.mq.commonservices.jar
k) com.ibm.mq.jmqi.jar
l) com.ibm.mq.jms.Nojndi.jar
we have tried to placed the latest MQ client version( MQ client 9.0.0.7) jar files and tried it,but no luck we are facing same issue.
Application team tried placing one JAR at a time.which is available in my queue manager, While they have placed the all the JAR except JMS.Jar application team faced the below error:
ErrorCode = JMS_EXCEPTION
ErrorMessage = Exception: com.ibm.msg.client.jms.DetailedJMSException: JMSFMQ6312: An exception occurred in the Java(tm) MQI.
The Java(tm) MQI has thrown an exception describing the problem.
See the linked exception for further information.; Message: JMSFMQ6312: An exception occurred in the Java(tm) MQI.
StackTrace = com.ibm.msg.client.jms.DetailedJMSException: JMSFMQ6312: An exception occurred in the Java(tm) MQI.
The Java(tm) MQI has thrown an exception describing the problem.
While placed all the Jar files including Jms.jar we get this error:
[SIEL ERROR] Thread[http-nio-8080-exec-13,5,main] [2:36:01.393 PM Tue Jul 23: ] Error:JNdi File
[SIEL ERROR] Thread[http-nio-8080-exec-13,5,main] [2:36:01.393 PM Tue Jul 23: ] Errorjava.lang.NullPointerException
#Josh: We have placed the 4 com.ibm.mq.allclient.jar, jms.jar (most be v2.0), fscontext.jar, and providerutil.jar, jar files post changes we are not getting earlier error( JMSFMQ6312),but now facing different exception in logs,please check below error.
Thread[http-nio-8080-exec-43,5,main] [12:09:06.850 PM Mon Jul 29: ] Receive failed.
[SIEL ERROR] Thread[http-nio-8080-exec-43,5,main] [12:09:06.850 PM Mon Jul 29: ] Exception during Receive:
javax.naming.NameNotFoundException: crmCF
[SIEL ERROR] Thread[http-nio-8080-exec-39,5,main] [12:33:24.911 PM Mon Jul 29: ] Threw SielBusinessServiceException with
ErrorCode = JMS_EXCEPTION
ErrorMessage = Exception: com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ2002: Failed to get a message from destination 'CRM.CUSTOMER.OUT'.
IBM MQ classes for JMS attempted to perform an MQGET; however IBM MQ reported an error.
Use the linked exception to determine the cause of this error.; Message: JMSWMQ2002: Failed to get a message from destination 'CRM.CUSTOMER.OUT'.
StackTrace = com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ2002: Failed to get a message from destination 'CRM.CUSTOMER.OUT'.
IBM MQ classes for JMS attempted to perform an MQGET; however IBM MQ reported an error.
but we can see channel is running fine,no impact on messages transfer, application team wants to know why they are getting this exception.
AMQ8417: Display Channel Status details.
CHANNEL(SIEL.CLIENT) CHLTYPE(SVRCONN)
CONNAME(xxx.xx.xx.xx) CURRENT
STATUS(RUNNING) SUBSTATE(RECEIVE)

FileNet Configuration Manager fails to connect to WebSphere Application Server

I have an issue with FileNet configuration manager connecting to WAS when configuring CPE. Details are below
OS : Windows 10 Enterprise (This is where CPE 5.5 is installed)
WAS : 8.5.5.13
WAS Java : 1.8_64_bundled
FN Config Details
I'm able to login to WAS console and the SOAP port is also correct.
Things that I tried,
adding -Dhttps.protocols="TLSv1,TLSv1.1,TLSv1.2" in configmgr.ini of FileNet configuration manager
Verified SSL configuration on WAS
But noting seems to work. I see below error message on the FileNet configuration manager logs
!ENTRY com.ibm.ecm.configmgr.engine 4 0 2018-06-27 15:45:09.289
!MESSAGE An invalid profile path was specified. C:\IBM\FileNet\ContentEngine\tools\configure\profiles\dotnetclient does not contain any configuration information.
!SESSION 2018-06-27 16:05:40.995 -----------------------------------------------
eclipse.buildId=unknown
java.fullversion=JRE 1.7.0 IBM J9 2.6 Windows 8 x86-32 20170718_357001 (JIT disabled, AOT disabled)
J9VM - R26_Java726_SR10_20170718_1208_B357001
GC - R26_Java726_SR10_20170718_1208_B357001
J9CL - 20170718_357001
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: gui
Command-line arguments: -os win32 -ws win32 -arch x86 gui
!ENTRY com.ibm.ecm.configmgr.app.ce 4 0 2018-06-27 16:13:56.518
!MESSAGE Connection error: The connection to the application server cannot be established. Ensure the application server is running and that the SOAP connector port and host name are correct.
!STACK 0
com.ibm.ecm.configmgr.engine.ConfigurationManagerException: Connection error: The connection to the application server cannot be established. Ensure the application server is running and that the SOAP connector port and host name are correct.
at com.ibm.ecm.configmgr.engine.jmx.JMXInvoker.invokeConnectMethodAndMethods(JMXInvoker.java:243)
at com.ibm.ecm.configmgr.engine.jmx.JMXInvoker.invokeConnectMethodAndMethod(JMXInvoker.java:142)
at com.ibm.ecm.configmgr.engine.jmx.WebSphereJMXInvoker.connect(WebSphereJMXInvoker.java:86)
at com.ibm.ecm.configmgr.app.ce.applicationserver.WebsphereApplicationServer$TestActivity.testWork(WebsphereApplicationServer.java:371)
at com.ibm.ecm.configmgr.engine.profile.EnvironmentTestActivity.test(EnvironmentTestActivity.java:64)
at com.ibm.ecm.configmgr.ui.wizards.NewProfileWizardPageGetProfileEnvironmentProps$7.widgetSelected(NewProfileWizardPageGetProfileEnvironmentProps.java:604)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at com.ibm.ecm.configmgr.app.ce.handlers.ProfileNewHandler.execute(ProfileNewHandler.java:67)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.ibm.ecm.configmgr.app.ce.rcp.Application.start(Application.java:86)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Caused by: java.lang.Exception: The connection to the application server cannot be established. Ensure the application server is running and that the SOAP connector port and host name are correct.
at com.ibm.ecm.configmgr.utils.websphere.WebSphereJMXUtil.connect(WebSphereJMXUtil.java:227)
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 com.ibm.ecm.configmgr.engine.jmx.JMXInvoker.invokeConnectMethodAndMethods(JMXInvoker.java:191)
... 45 more
*************************telenet response**************************
When did telenet and after a few seconds, I see the below error
HTTP/1.1 408 Request Timeout Content-Type: text/html Content-Length: 117 Connection: close <HTML><TITLE>408 - Request Timeout</TITLE><BODY><h1>408 Connection timed out while reading request</h1></BODY></HTML> Connection to host lost. C:\Windows\system32>
*****************************workaround*****************************
Ok once the profile is created and ran first steps, I disabled global security and restarted websphere. Configuration manager is able to connect to WAS now (looks like issue with security. I verified Quality of protection (QoP) settings
with ssl.client.properties and it was selected as TLSv2. Then I changed it to TSLv1.2 and modified ssl.client.properties also. Still it did not work) I will updated this topic later.
Check default path Webshere.
C:\Program Files\IBM\WebSphere\AppServer
C:\Program Files\IBM\WebSphere\AppServer\profiles\your_profile
VS
C:\Program Files (x86)\IBM\WebSphere\AppServer
C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\your_profile
The Configuration Manager right now seems to support only older protocols. If you specify TLSv1 in WebSphere console, as opposed to TLSv1.2 for example, Test Connection will work. That will create you another problem though. Newer browsers don't support older protocols and you will not be able to open your WebSphere console in say, Firefox. On Windows, you can use your old but still included IE configured to use these older protocols - Tools -> Internet Options -> Advanced -> Security -> Use * . You'll get your console back that way.

MQ light not responding to SSL requests after enabling SSL

I installed the MQ Light server on Windows 7 and followed the steps at https://developer.ibm.com/messaging/docs/mq-light-api/tutorials/security-tutorial/ to enable SSL using a self signed certificate generated by OpenSSL 1.1.0g.
At that point, once I started the MQ light server, my browser timed out trying to do the TLS handshake to the server and any attempt to connect to the server immediately using the Java MQ libraries aborted because the server closed the connection.
I couldn't figure out where the MQ server logs are to check them. Disabling SSL results in the connection working again.
I'm using Oracle Java 8u161 (64-bit).
Any idea what's going on here and how to get SSL working?
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2397;AMQ9204: Connection to host 'localhost(5671)' rejected. [1=com.ibm.mq.jmqi.JmqiException[CC=2;RC=2397;AMQ9771: SSL handshake failed. [1=javax.net.ssl.SSLHandshakeException[Remote host closed connection during handshake],3=localhost/127.0.0.1:5671 (localhost),4=SSLSocket.startHandshake,5=default]],3=localhost(5671),5=RemoteTCPConnection.protocolConnect]
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:2282)
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1294)
at com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.jmqiConnect(InterceptedJmqiImpl.java:376)
at com.ibm.mq.ese.jmqi.ESEJMQI.jmqiConnect(ESEJMQI.java:560)
at com.ibm.mq.MQSESSION.MQCONNX_j(MQSESSION.java:916)
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:235)
... 16 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2397;AMQ9771: SSL handshake failed. [1=javax.net.ssl.SSLHandshakeException[Remote host closed connection during handshake],3=localhost/127.0.0.1:5671 (localhost),4=SSLSocket.startHandshake,5=default]
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:1329)
at com.ibm.mq.jmqi.remote.impl.RemoteConnection.connect(RemoteConnection.java:863)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSessionFromNewConnection(RemoteConnectionSpecification.java:409)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSession(RemoteConnectionSpecification.java:305)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionPool.getSession(RemoteConnectionPool.java:146)
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1730)
... 21 more
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1002)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection$6.run(RemoteTCPConnection.java:1298)
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection$6.run(RemoteTCPConnection.java:1290)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:1290)
... 26 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:505)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
... 33 more

How to establish a JMS connection with EAP 7

After following all the steps for setting up a JMS client ( How to configure JMS in JBoss EAP 7?),
I have the following lines of errors:
javax.naming.CommunicationException: WFNAM00018: Failed to connect to remote host [Root exception is java.io.IOException: JBREM000202: Abrupt close on Remoting connection 3c6a9a86 to /127.0.0.1:8080 of endpoint (anonymous) <13805618>]
Caused by: java.io.IOException: JBREM000202: Abrupt close on Remoting connection 3c6a9a86 to /127.0.0.1:8080 of endpoint (anonymous) <13805618>

WebSocket with Spring 4.0 with MessageBroker and WebServers

I've downloaded the latest version of the websocket with spring example from
https://github.com/rstoyanchev/spring-websocket-portfolio.
I'm running the application on Tomcat 8.0 RC5 and using the message broker RabbitMQ 3.1.5.
The simulation runs only 2-3 times after that the simulation doesn't work anymore, due to the below error. I tried also toi run the application on Glassfish 4.0, but the same error occurs. Can you please help what could be the reason?
15:47:35 [BrokerWebSocketChannel-1] ExceptionWebSocketHandlerDecorator - Unhandl
ed error for ExceptionWebSocketHandlerDecorator [delegate=LoggingWebSocketHandle
rDecorator [delegate=org.springframework.messaging.handler.websocket.SubProtocol
WebSocketHandler#1d2bde4]]
java.lang.IllegalStateException: The WebSocket session has been closed and no me
thod (apart from close()) may be called on a closed session
at org.apache.tomcat.websocket.WsSession.checkState(WsSession.java:642)
at org.apache.tomcat.websocket.WsSession.getNegotiatedSubprotocol(WsSess
ion.java:297)
at org.springframework.web.socket.adapter.StandardWebSocketSession.getAc
ceptedProtocol(StandardWebSocketSession.java:113)
at org.springframework.web.socket.sockjs.transport.session.WebSocketServ
erSockJsSession.getAcceptedProtocol(WebSocketServerSockJsSession.java:91)
at org.springframework.messaging.handler.websocket.SubProtocolWebSocketH
andler.findProtocolHandler(SubProtocolWebSocketHandler.java:149)
at org.springframework.messaging.handler.websocket.SubProtocolWebSocketH
andler.afterConnectionClosed(SubProtocolWebSocketHandler.java:224)
at org.springframework.web.socket.support.WebSocketHandlerDecorator.afte
rConnectionClosed(WebSocketHandlerDecorator.java:69)
at org.springframework.web.socket.support.LoggingWebSocketHandlerDecorat
or.afterConnectionClosed(LoggingWebSocketHandlerDecorator.java:74)
at org.springframework.web.socket.support.ExceptionWebSocketHandlerDecor
ator.afterConnectionClosed(ExceptionWebSocketHandlerDecorator.java:89)
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJ
sSession.close(AbstractSockJsSession.java:237)
at org.springframework.messaging.simp.stomp.StompProtocolHandler.handleM
essageToClient(StompProtocolHandler.java:183)
at org.springframework.messaging.handler.websocket.SubProtocolWebSocketH
andler.handleMessage(SubProtocolWebSocketHandler.java:194)
at org.springframework.messaging.support.channel.ExecutorSubscribableCha
nnel$1.run(ExecutorSubscribableChannel.java:80)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
at java.lang.Thread.run(Thread.java:724)

Resources