Friday 5 June 2015

JMS Client could not establish connection with weblogic server

Issue : 

When an external application tries to establish connection to the weblogic JMS server, the connection does not seem to work.

We observe the below error in the logs :


weblogic.jms.common.JMSException: weblogic.messaging.dispatcher.DispatcherException: Could not register a DisconnectListener for [Delegate(253822924) [weblogic.iiop.IOR[RMI:weblogic.messaging.dispatcher.DispatcherImpl:0000000000000000] @<ip addres>:48508, <0, null>]] for weblogic.jms.C:vmohsitut151:od8:-419rn532v3nc
        at weblogic.jms.frontend.FEConnectionFactory.connectionCreateInternal(FEConnectionFactory.java:371)
        at weblogic.jms.frontend.FEConnectionFactoryImpl.connectionCreateInternal(FEConnectionFactoryImpl.java:79)
        at weblogic.jms.frontend.FEConnectionFactoryImpl.connectionCreateRequest(FEConnectionFactoryImpl.java:62)
        at weblogic.jms.frontend.FEConnectionFactoryImpl_WLSkel.invoke(Unknown Source)
        at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
        at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
        at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
        at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
        at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: weblogic.messaging.dispatcher.DispatcherException: Could not register a DisconnectListener for [Delegate(253822924) [weblogic.iiop.IOR[RMI:weblogic.messaging.dispatcher.DispatcherImpl:0000000000000000] @<ip addres>:48508, <0, null>]] for weblogic.jms.C:vmohsitut151:od8:-419rn532v3nc
        at weblogic.messaging.dispatcher.DispatcherWrapperState.addPeerGoneListener(DispatcherWrapperState.java:412)
        at weblogic.messaging.dispatcher.DispatcherWrapperState.<init>(DispatcherWrapperState.java:79)
        at weblogic.messaging.dispatcher.DispatcherManager.dispatcherAdd(DispatcherManager.java:222)
        at weblogic.messaging.dispatcher.DispatcherManager.addDispatcherReference(DispatcherManager.java:118)
        at weblogic.jms.dispatcher.JMSDispatcherManager.addDispatcherReference(JMSDispatcherManager.java:187)
        at weblogic.jms.frontend.FEConnectionFactory.connectionCreateInternal(FEConnectionFactory.java:368)
        ... 12 more
Caused by: weblogic.rmi.extensions.DisconnectMonitorUnavailableException: Could not register a DisconnectListener for [Delegate(253822924) [weblogic.iiop.IOR[RMI:weblogic.messaging.dispatcher.DispatcherImpl:0000000000000000] @<ip addres>:48508, <0, null>]]
        at weblogic.rmi.extensions.DisconnectMonitorListImpl.addDisconnectListener(DisconnectMonitorListImpl.java:83)
        at weblogic.messaging.dispatcher.DispatcherWrapperState.addPeerGoneListener(DispatcherWrapperState.java:409)
        ... 17 more



Observations made : 

This issue does not occur if the source client ( from where the connection to WLS JMS is made ) and Weblogic server are in the same network subnet.

The above issue has been observed under two conditions :

--> If these 2 systems are on different network
or
--> If the two systems are on different subnet in the same network

Solution : 

On the client side, Try to find out which weblogic jar file is being used to make the connection.

If the wlclient.jar file is used for making the connection, then this is the root cause of the issue. Instead of using the wlclient.jar, please use wlthint3client.jar and then try to make a connection to the weblogic JMS.

In our case, wlclient.jar file was being used and we replaced it with wlthint3client.jar

This resolved the issue.

After making the changes, our application file which made connection to JMS looked like below :

#$clp="${clp}:${lib_dir}/wlclient.jar";

$clp="${clp}:${lib_dir}/wlthint3client.jar";

2 comments: