[JBoss-user] [Clustering/JBoss] - After failover, not getting POST data for ~120 seconds
All, I have set up two instances of JBoss with one Apache box in front of them doing load balancing and connected via mod_jk. Load balancing is working fine, as is HTTP Session Replication. However, I am getting an odd error: - I hit my application through the Apache box, and am redirected to JBoss box 1. - I begin an application workflow that puts some data in the session. - I then shutdown JBoss on box 1, and continue the application flow. - JBoss on box 2 deserializes the session data correctly, and gets the request. - *BUT*, the POST data does *not* come along with the request. When I recieve the POST data (eg by not shutting down JBoss 1), I see output like the following from JBoss2: 10:52:24,216 INFO [JkInputStream] Receiving: getting request body chunk 67 67 10:52:24,218 INFO [STDOUT] 12 34 00 43 00 41 6c 6f 77 61 6d 6f 75 6e 74 3d | .4.C.Alowamount= 10:52:24,219 INFO [STDOUT] 31 30 26 6c 6f 61 64 61 6d 6f 75 6e 74 3d 31 30 | 10loadamount=10 10:52:24,219 INFO [STDOUT] 26 63 68 65 63 6b 73 3d 6e 6f 6e 65 26 61 64 64 | checks=noneadd 10:52:24,220 INFO [STDOUT] 72 65 73 73 65 73 3d 26 73 70 6f 6e 73 6f 72 6d | resses=sponsorm 10:52:24,221 INFO [STDOUT] 65 73 73 61 67 65 3d | essage= However, when the POST data is absent (eg when JBoss 1 is shutdown), I see output like the following from JBoss2: 10:43:40,477 INFO [JkInputStream] Receiving: getting request body chunk 0 0 An interesting piece of evidence is that if I wait for about 150 seconds after shutting down JBoss1 before submitting the form to JBoss2, the POST data *does* come through to JBoss2. This is odd, since, even when JBoss2 is not getting the POST data, it is getting the request. Is there some timeout happening somewhere that affects the sending of POST data but not the request? Weird. Does anyone have any experience with this phenomenon, or know where to look to begin to debug this? many thanks!! Chris --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id56alloc_id438op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Clustering/JBoss] - ClassCastException during HTTP Session Replication Deserialization
All, I have recently been testing my app with JBoss clustering, with the hopes of achieving HTTP Session Replication. For very simple cases (eg a String in the session), it works flawlessly out of the box. However, with more complicated objects in the session, I am getting ClassCastExceptions as JBoss tries to deserialize the session. The trace is pasted below. Having looked at the code for ClusteredHTTPSessionBeanImpl.unserializeSession() (the method is pasted below), I can't figure out why it would be trying to cast to one of my objects (specifically OrderedMap), nor why this exception was raised. Does anyone have any idea: - How deserialization works and why I would get a ClassCastException? - What tests to run to figure out what's going on? - Is there documentation or any other web discussion that covers this process in detail? (I have searched this list) - Is there an online resource discussing strategy for how complex or deep objects in the session should be to make HTTP session replication efficient? Any help would be greatly appreciated. thanks so much! Chris ClusteredHTTPSessionBeanImpl.unserializeSession() -- protected void unserializeSession() throws EJBException { try { MarshalledValue mo = (MarshalledValue)this.getSerializedSession (); if (mo != null) this.tmpSession = (SerializableHttpSession)(mo.get ()); } catch (Exception e) { throw new EJBException (e.toString ()); } } The stack trace -- 17:49:04,096 INFO [DefaultPartition] New cluster view (id: 2, delta: -1) : [172.16.2.13:1099] 17:49:04,104 INFO [DefaultPartition:ReplicantManager] Dead members: 1 17:49:17,478 INFO [STDOUT] 2004.02.09-17:49:17 E=091025 L=DEBUG U=null A=null SQL : : : SELECT * FROM TBLEFTREWARDSIMPORT WHERE SSTATUS = Imported 17:49:19,337 INFO [JkInputStream] Receiving: getting request body chunk 0 0 17:49:19,510 ERROR [LogInterceptor] EJBException: javax.ejb.EJBException: java.lang.ClassCastException: com.higherone.util.OrderedMap at org.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanImpl.unser ializeSession(ClusteredHTTPSessionBeanImpl.java:128) at org.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanImpl.getSe ssion(ClusteredHTTPSessionBeanImpl.java:71) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContaine r.java:1095) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySync hronizationInterceptor.java:304) at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInt erceptor.java:163) at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor .java:89) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryF inderInterceptor.java:122) at org.jboss.ha.httpsession.beanimpl.ejb.ServerTCLInterceptor.invoke(Server TCLInterceptor.java:40) at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:490) at org.jboss.ejb.Container.invoke(Container.java:700) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDi spatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101) at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:9 0) at org.jboss.ha.httpsession.beanimpl.ejb.ClientTCLInterceptor.invoke(Client TCLInterceptor.java:46) at org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:97) at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85) at $Proxy35.getSession(Unknown Source) at org.jboss.ha.httpsession.server.ClusteredHTTPSessionService.getHttpSessi on(ClusteredHTTPSessionService.java:138) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDi spatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy38.getHttpSession(Unknown Source) at org.jboss.web.tomcat.session.ClusterManager.loadSession(ClusterManager.j ava:595) at org.jboss.web.tomcat.session.ClusterManager.findSession(ClusterManager.j ava:273) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :173) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve.java:171) at