We are using the JNBridge jms adapter in our project to integrate Biztalk with the Jboss server. But now our Jboss server is being upgraded from Red Hat (JBoss) EAP 6.4 to Red Hat (JBoss) EAP 7.3. The JVM has also been changed from Oracle to Azul Zulu jdk.
Now when we are configuring the new properties (using the JNBridge documentation for reference), we are repeatedly facing the below error:
(Exception) Could not find connection factory: jms/RemoteConnectionFactory. JNDI error: WFNAM00018: Failed to connect to remote host ****
Nested Exception: WFNAM00018: Failed to connect to remote host
Stack Trace:
.NET-side stack trace:
at com.jnbridge.jnbproxy.ExceptionFactory.throwException(JNBException e, Hashtable objMap)
at org.wildfly.naming.client.WildFlyRootContext.lookup(String arg0)
at JNBridge.JMSAdapter.Core.JMSContext.createConnectionFactory(String factoryName)
Java-side stack trace:
javax.naming.CommunicationException: WFNAM00018: Failed to connect to remote host [Root exception is java.io.IOException: An existing connection was forcibly closed by the remote host]
at org.wildfly.naming.client.remote.RemoteNamingProvider.getPeerIdentityForNaming(RemoteNamingProvider.java:110)
at org.wildfly.naming.client.remote.RemoteNamingProvider.getPeerIdentityForNaming(RemoteNamingProvider.java:53)
at org.wildfly.naming.client.NamingProvider.getPeerIdentityForNamingUsingRetry(NamingProvider.java:105)
at org.wildfly.naming.client.remote.RemoteNamingProvider.getPeerIdentityForNamingUsingRetry(RemoteNamingProvider.java:91)
at org.wildfly.naming.client.remote.RemoteContext.lambda$lookupNative$0(RemoteContext.java:189)
at org.wildfly.naming.client.NamingProvider.performExceptionAction(NamingProvider.java:222)
at org.wildfly.naming.client.remote.RemoteContext.performWithRetry(RemoteContext.java:100)
at org.wildfly.naming.client.remote.RemoteContext.lookupNative(RemoteContext.java:188)
at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:74)
at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:60)
at org.wildfly.naming.client.WildFlyRootContext.lookup(WildFlyRootContext.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.jnbridge.jnbcore.JNBDispatcher.objectVirtualCall(Unknown Source)
at com.jnbridge.jnbcore.JNBDispatcher.call(Unknown Source)
at com.jnbridge.jnbcore.server.sharedmem.SharedMemRequestHandler.handleRequest2(Unknown Source)
at com.jnbridge.jnbcore.server.sharedmem.SharedMemRequestHandler.handleRequest(Unknown Source)
Caused by: java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.readv0(Native Method)
at sun.nio.ch.SocketDispatcher.readv(SocketDispatcher.java:47)
at sun.nio.ch.IOUtil.read(IOUtil.java:278)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:439)
at org.xnio.nio.NioSocketConduit.read(NioSocketConduit.java:304)
at org.xnio.conduits.AbstractStreamSourceConduit.read(AbstractStreamSourceConduit.java:55)
at org.xnio.ssl.JsseSslStreamSourceConduit.read(JsseSslStreamSourceConduit.java:103)
at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:123)
at org.jboss.remoting3.remote.MessageReader.getMessage(MessageReader.java:132)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Authentication.handleEvent(ClientConnectionOpenListener.java:603)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Authentication.handleEvent(ClientConnectionOpenListener.java:577)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
at ...asynchronous invocation...(Unknown Source)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:599)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:565)
at org.jboss.remoting3.ConnectionInfo$None.getConnection(ConnectionInfo.java:82)
at org.jboss.remoting3.ConnectionInfo.getConnection(ConnectionInfo.java:55)
at org.jboss.remoting3.EndpointImpl.doGetConnection(EndpointImpl.java:499)
at org.jboss.remoting3.EndpointImpl.getConnectedIdentity(EndpointImpl.java:445)
at org.jboss.remoting3.UncloseableEndpoint.getConnectedIdentity(UncloseableEndpoint.java:52)
at org.wildfly.naming.client.remote.RemoteNamingProvider.getFuturePeerIdentityPrivileged(RemoteNamingProvider.java:151)
at org.wildfly.naming.client.remote.RemoteNamingProvider.lambda$getFuturePeerIdentity$0(RemoteNamingProvider.java:138)
at java.security.AccessController.doPrivileged(Native Method)
at org.wildfly.naming.client.remote.RemoteNamingProvider.getFuturePeerIdentity(RemoteNamingProvider.java:138)
at org.wildfly.naming.client.remote.RemoteNamingProvider.getPeerIdentity(RemoteNamingProvider.java:126)
at org.wildfly.naming.client.remote.RemoteNamingProvider.getPeerIdentityForNaming(RemoteNamingProvider.java:106)
... 18 more
We are able to telnet to the server and it works fine, even the authentication is correct. Any help will be really appreciated.
Thanks !
Hi There,
Thank you for asking this question on the
Microsoft Q&A Platform
.
I would suggest to trace the connectivity between both endpoints and check where it's dropping your connection. As you are able to do the telnet, I feel it's more on some property in new upgrade. Check with JNBridge support team for troubleshooting.
Regards,
Kamlesh Kumar
If this answer solved your problem, please click the Verify Answer button (found below the answer) to help other users who have the same question.
We finally resolved this. Here is what we did, in case anyone is facing the same issue:
So we tried a bunch of combinations in the Adapter configurations, but finally changing the JMS scheme to http+remote & port to 8080 worked. We also added the Jboss ips to the hosts file in Biztalk server.
Thanks !
jnbridge team says the configurations are correct at the adapter end. And we also did some changes at JBoss end, opened a few more ports. And changed the JMS scheme to http+remote with port 8080. Now the error is different :
Exception: Failed to create session factory
Stack Trace:
at JNBridge.JMSAdapter.Core.JMSContext.getContext(Uri aUri, String aPassWord, String aUserName, String anInitialContextFactory, String aQueueFactory, String aTopicFactory, String topicConnectionClientID, String queueConnectionClientID, String aJMSScheme, String aSecurityLevel, String anAckMode, TimeSpan sendTimeout, TimeSpan receiveTimeout, Type aType, Boolean isOffLine, String customConnectionString)
at JNBridge.JMSAdapter.JMSReceiverEndpoint.initContext()
at JNBridge.JMSAdapter.JMSReceiverEndpoint.Start()
at JNBridge.JMSAdapter.JMSReceiverEndpoint.Open(String uri, IPropertyBag config, IPropertyBag bizTalkConfig, IPropertyBag handlerPropertyBag, IBTTransportProxy transportProxy, String transportType, String propertyNamespace, ControlledTermination control)
Nested Exception: Exception has been thrown by the target of an invocation.
Stack Trace:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at JNBridge.JMSAdapter.Core.JMSContext.getContext(Uri aUri, String aPassWord, String aUserName, String anInitialContextFactory, String aQueueFactory, String aTopicFactory, String topicConnectionClientID, String queueConnectionClientID, String aJMSScheme, String aSecurityLevel, String anAckMode, TimeSpan sendTimeout, TimeSpan receiveTimeout, Type aType, Boolean isOffLine, String customConnectionString)
Nested Exception: Failed to create session factory
Stack Trace:
at JNBridge.JMSAdapter.Core.JMSContext.createQueueConnection()
at JNBridge.JMSAdapter.Core.JMSContext..ctor(Uri aUri, String aPassWord, String aUserName, String anInitialContextFactory, String aQueueFactory, String aTopicFactory, String topicConnectionClientID, String queueConnectionClientID, String aJMSScheme, String aSecurityLevel, String anAckMode, TimeSpan sendTimeout, TimeSpan receiveTimeout, Boolean isOffLine, String customConnectionString)
Nested Exception: Failed to create session factory
Stack Trace:
.NET-side stack trace:
at com.jnbridge.jnbproxy.ExceptionFactory.throwException(JNBException e, Hashtable objMap)
at org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory.createQueueConnection(String arg0, String arg1)
at JNBridge.JMSAdapter.Core.JMSQueueConnectionFactory.createQueueConnection()
at JNBridge.JMSAdapter.Core.JMSQueueConnection..ctor(IJMSConnectionFactory aFactory)
at JNBridge.JMSAdapter.Core.JMSContext.createQueueConnection()
Java-side stack trace:
javax.jms.JMSException: Failed to create session factory
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:862)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createQueueConnection(ActiveMQConnectionFactory.java:347)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.jnbridge.jnbcore.JNBDispatcher.objectVirtualCall(Unknown Source)
at com.jnbridge.jnbcore.JNBDispatcher.call(Unknown Source)
at com.jnbridge.jnbcore.server.sharedmem.SharedMemRequestHandler.handleRequest2(Unknown Source)
at com.jnbridge.jnbcore.server.sharedmem.SharedMemRequestHandler.handleRequest(Unknown Source)
Caused by: ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ219007: Cannot connect to server(s). Tried with all available servers.]
at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:798)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:860)
... 9 more
We have tried other schemes like the 'http-remoting' as well, but didnt make any difference. Does anyone have any pointers as to what we could be doing wrong ?
Thanks in advance.