Sorry if I am annoying..  one more thing I stumbled upon.. 

Clustering the MBean and deploying it via the JBoss farming service works very 
well now.. I tried the RoundRobin and RandomRobin LoadBalancing Policies and 
this works the way one would expect (impressively easy once you get it going, I 
love it :-)  ).. the next thing I tried was fooling around with the failover 
behavior of the clustered MBeans and I noticed some strange behavior (I am not 
blaming JBoss but rather  my cluelessness, but I really dont know what I am 
doing wrong here)... 

I have a cluster of three nodes.  Two of them (Node A and Node B) run the 
clustered MBean service I have been developing. They are deployed via the 
farming service, and  each of them creates a  ProxyFactoryHA. The third node 
(Node C) looks up the ProxyFactory via HA-JNDI and performs a number of 
invocations on the MBean. These invocations are evenly distributed between the 
two MBeans as one would expect.. 

Now my problem is the failover: as soon as one of the MBean nodes (say Node A)  
"fails"  (by shutting down the server via  ctrl+c  or the shutdown script) I 
would expect the Node B to receive all the invocations from Node C.  But 
instead, an exception is thrown on Node C: 


  | java.lang.reflect.UndeclaredThrowableException
  | at $Proxy62.test(Unknown Source)
  | at 
at.arsenal.spirit.request.RequestListenerServlet.service(RequestListenerServlet.java:83)
  | at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | at 
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  | at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  | at 
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
  | at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
  | at 
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
  | at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  | at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  | at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  | at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  | at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
  | at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
  | at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  | at 
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  | at java.lang.Thread.run(Thread.java:595)
  | 
  | 
  | Caused by: org.jboss.invocation.ServiceUnavailableException: Service 
unavailable.
  | at 
org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxyHA.invoke(JRMPInvokerProxyHA.java:292)
  | at 
org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:227)
  | at 
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:167)
  | at 
org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:59)
  | at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
  | ... 22 more
  | 

Still the cluster detects the failed node correctly and updates it's state, 
therefore I think the problem has somehow to do with the ProxyFactoryHA..

I fooled around a little and discovered, if I shut down the ProxyFactoryHA 
MBean of a Node  by hand (call the stop() method of the MBean via the JMX 
Console) then all works as expected. The other Node gets all the Invocations, 
no exceptions. If I start the ProxyFactoryHA again (via JMX console) the 
Invocations are distributed again.  

But as soon as I shut down the Node via ctrl+c the invocations fail. When I 
restart the shut down node, the invocations succeed again, but now all calls 
are answered by the node that was restarted. The node that was running all the 
time is ignored now. 

Now this is just a guess, but I believe part of the problem is, that the JBoss 
server should call the stop() method of the ProxyHAFactory when it is shut down 
normally...  
but this would not solve the problem of a node failing (the failing Node would 
not call the stop() method of the  ProxyFactoryHA, because it failed).. so my 
guess is that something with my configuration (posted a few messages above) is 
wrong.. or maybe the ProxyFactoryHA is not supposed to be able to handle the 
situation of a Node failing? 

Can anybody help me with this? Thanks a lot.  :-)



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3926823#3926823

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3926823


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to