The Source for Java Technology Collaboration
Webmaster Alert: Posting to Jive Forums is currently not working. Estimated time for fix is unknown.

Home » java.net Forums » GlassFish » GlassFish

Thread: EJB Client hangs sporadically

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is not answered. Helpful answers available: 2. Correct answers available: 1.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 4 - Last Post: Feb 25, 2009 6:39 PM by: kennethmark
carmeyer

Posts: 12
EJB Client hangs sporadically
Posted: Sep 4, 2008 2:29 AM
 
  Click to reply to this thread Reply

Hi,

I have one bug(?) that's causing me massive headaches.

Configuration: Server: Windows XP, Glassfish V2ur2 - Client, Windows

We have an EJB client that is holding a reference to a remote interface and is using this to call remote methods. Most of the time this is running quite well, but very sporadically und unfortunately unreproducible it is running it what seems to be a CORBA timeout error. The client then hangs, is unresponsive and returns after 30 mins with the following error:

[slf5s.start]03 Sep 2008 17:03:29,265[slf5s.DATE] - ERROR[slf5s.PRIORITY] - exception caught...
java.rmi.MarshalException: CORBA COMM_FAILURE 1398079707 Maybe; nested exception is:
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 219 completed: Maybe
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:271)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)

.. business logic here ...

at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 219 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.communicationsTimeoutWaitingForResponse(ORBUtilSystemException.java:3180)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.communicationsTimeoutWaitingForResponse(ORBUtilSystemException.java:3195)
at com.sun.corba.ee.impl.transport.CorbaResponseWaitingRoomImpl.waitForResponse(CorbaResponseWaitingRoomImpl.java:198)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.waitForResponse(SocketOrChannelConnectionImpl.java:1196)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.waitForResponse(CorbaMessageMediatorImpl.java:291)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete1(CorbaClientRequestDispatcherImpl.java:389)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:357)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:219)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:192)
... 9 more
javax.ejb.EJBException: nested exception is: java.rmi.MarshalException: CORBA COMM_FAILURE 1398079707 Maybe; nested exception is:
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 219 completed: Maybe

... business logic here ...

at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)


There is no record of any error in the server log, and a wireshark network trace seems to show that the underlying CORBA communication was succesful.
There I think that the client is stuck somewhere in the CORBA stack and returns after a 30 min timeout.

Since I can not reproduce the error, I have no means of debugging anything.

Can anyone please help? Would an update to Glassfish V2.1 probably help?

Thanks!
Carsten

carmeyer

Posts: 12
Re: EJB Client hangs sporadically
Posted: Sep 4, 2008 2:48 AM   in response to: carmeyer
 
  Click to reply to this thread Reply

Some more information:

The client hangs in a business method. There is no CORBA (or GIOP) request in wireshark visible, although the server answers to this reqeust. This then leads to the timeout.
The hint is in "CorbaResponseWaitingRoomImpl.java:198" :

// This is an interesting case. It could mean that someone sent us a
// reply message, but we don't know what request it was for. That
// would probably call for an error. However, there's another case
// that's normal and we should think about --


This seems to be exactly what is happening.

Can anyone shed more light on this? Why is the server responding to a reply that was never sent (although the business logic seems to have sent it). Mysterious....

Thanks,
Carstn

remonvv

Posts: 8
Re: EJB Client hangs sporadically
Posted: Oct 2, 2008 7:54 AM   in response to: carmeyer
 
  Click to reply to this thread Reply

We are having the exact same issue. Glassfish V2UR2 on any OS. One of our servers will sporadically hang for 30 minutes (the default timeout) and then report this exception.

Is there a solution or a workaround for this issue?

kcavanaugh

Posts: 26
Re: EJB Client hangs sporadically
Posted: Dec 3, 2008 12:00 AM   in response to: carmeyer
 
  Click to reply to this thread Reply

All of these stack traces simply mean that something failed on the server
side without sending a response. Consequently the client side waits until it
times out (assuming that you aren't doing anything that takes longer than
the default 30 minute timeout in a single request).

You really need to look on the server side (GlassFish hopefully) and see
if there are any related log messages from the server. In particular, all
recent versions of GlassFish should catch any exception that escapes
all the way out to the ThreadPool worker thread and log it, precisely to
handle this sort of problem.

The GlassFish ORB should NEVER let exceptions propagate all the way
out to the worker thread, so if that is happening, it's a bug in the server side
code.

kennethmark

Posts: 5
Re: EJB Client hangs sporadically
Posted: Feb 25, 2009 6:39 PM   in response to: carmeyer
 
  Click to reply to this thread Reply

I believe someone already mentioned same issue in this forum and the workaround was not holding the reference of remote interface but instead one should always look up for a remote interface before method call.

I've not tried this method but hope this info could help.




 XML java.net RSS