wow, you wrote a book :) 1. where is the class com.mycompany.ourapp.common.model.ReturnPolicy?
2. WARNING: Manager[/ourapp], requesting session state from org.apache.catalina.cluster.mcast.McastMember[tcp://127.0.0.1:4001,127.0.0.1 ,4001, alive=1259] Your network is misconfigured. Your are using the "AUTO" setting, which does java.net.InetAddress.getLocalHost().getHostAddress(), and on your machine it return 127.0.0.1, it should return the actual IP. So either change "auto" to the actual IP, or add your hostname to /etc/hosts under the correct ip. 3. SEVERE: Session event listener threw exception java.lang.IllegalStateException: getAttribute: Session already invalidated Your session listener is trying to get an attribute out of the session upon session creation, the the valid flag has not yet been set. I believe this was fixed in the CVS tree by now. you can correspond with me at fhanik -at- apache -dot- org and I can help you get this straightened out. Filip -----Original Message----- From: Spiegelberg, Eric [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 14, 2004 10:35 AM To: [EMAIL PROTECTED] Subject: Tomcat 5 clustering question... We have a developed an large scale application that is clustered using WebLogic. I have been exploring getting the app clustered on Tomcat as a learning experience and to possibly sway the management away from WebLogic. I have Tomcat 5.0.19 set up with the latest production version of Apache using mod_jk. I have one Tomcat instance configured to use port 8080 and another on 9090 on a RedHat 9.0 box. I am setting LD_ASSUME_KERNEL to 2.4. No error messages are displayed during startup. I have done enough testing to feel confident in the Apache/jk_mod/tomcat configuration. For example, I can use Tomcat's included SessionExample to go to host:8080 and enter a session variable, and when I then go to host:9090 the variable is displayed along with the correct session id. The session has .worker1 appended to the end of the string. I can add variables and bounce back and forth (through apache, 8080, and 9090 url's) and all variables are displayed correctly with the same session id. This indicates to me that the two clusters are aware of each other and are passing session information back and forth. I can confirm this in the catalina.out log. In our app the web.xml contains the <distributable/> tag and both Tomcat instances have the useDirtyFlag set to false. Now, when I log into our app and start driving around I receive several of the following exception: Apr 14, 2004 10:15:29 AM org.apache.catalina.cluster.session.DeltaManager messageReceived SEVERE: Unable to receive message through TCP channel java.lang.ClassNotFoundException: com.mycompany.ourapp.common.model.ReturnPolicy at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:891) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:756) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:219) at java.io.ObjectInputStream.resolveProxyClass(ObjectInputStream.java:630) at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1469) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1432) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at org.apache.catalina.cluster.session.DeltaRequest$AttributeInfo.readExternal( DeltaRequest.java:335) at org.apache.catalina.cluster.session.DeltaRequest.readExternal(DeltaRequest.j ava:247) at org.apache.catalina.cluster.session.DeltaManager.loadDeltaRequest(DeltaManag er.java:420) at org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaManage r.java:921) at org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(DeltaMa nager.java:794) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleT cpCluster.java:561) at org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:117) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplica tionThread.java:176) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThrea d.java:114 I have looked in our deployed .war and that class does exist. There appears to be no ryme or reason as to when the exception is thrown - it seems random with no pattern. Can anyone give me more information on what causes this exception? Any ideas? Also, when I then shutdown an instance and click on a link within the app (attempting to cause the Apache to swith over to another worker), I'm logged out of the app and the following exception is thrown: Apr 14, 2004 10:16:10 AM org.apache.catalina.cluster.session.DeltaSession tellNew SEVERE: Session event listener threw exception java.lang.IllegalStateException: getAttribute: Session already invalidated at org.apache.catalina.cluster.session.DeltaSession.getAttribute(DeltaSession.j ava:1054) at org.apache.catalina.cluster.session.DeltaSessionFacade.getAttribute(DeltaSes sionFacade.java:157) at com.mckesson.smo.app.SmoSession.get(SmoSession.java:41) at com.mckesson.smo.app.SmoSessionController.sessionCreated(SmoSessionControlle r.java:98) at org.apache.catalina.cluster.session.DeltaSession.tellNew(DeltaSession.java:4 59) at org.apache.catalina.cluster.session.DeltaSession.setId(DeltaSession.java:431 ) at org.apache.catalina.cluster.session.DeltaManager.createSession(DeltaManager. java:377) at org.apache.catalina.cluster.session.DeltaManager.createSession(DeltaManager. java:345) at org.apache.coyote.tomcat5.CoyoteRequest.doGetSession(CoyoteRequest.java:2285 ) at org.apache.coyote.tomcat5.CoyoteRequest.getSession(CoyoteRequest.java:2127) at org.apache.coyote.tomcat5.CoyoteRequestFacade.getSession(CoyoteRequestFacade .java:549) at org.apache.coyote.tomcat5.CoyoteRequestFacade.getSession(CoyoteRequestFacade .java:554) at com.mckesson.smo.app.SmoApplicationFilter.doFilter(SmoApplicationFilter.java :52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:233) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.jav a:182) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:578) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:490) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:339) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:415) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:716) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:650) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:829) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:688) at java.lang.Thread.run(Thread.java:534) Looking deeper into my log, I found this occurs on startup from both instances: INFO: Starting clustering manager...:/ourapp Apr 13, 2004 2:10:26 PM org.apache.catalina.cluster.session.DeltaManager start WARNING: Manager[/ourapp], requesting session state from org.apache.catalina.cluster.mcast.McastMember[tcp://127.0.0.1:4001,127.0.0.1 ,4001, alive=1259]. This operation will timeout if no session state has been received within 60 seconds Apr 13, 2004 2:11:26 PM org.apache.catalina.cluster.session.DeltaManager start SEVERE: Manager[/ourapp], No session state received, timing out. But latter in the log is: Apr 13, 2004 2:12:04 PM org.apache.catalina.cluster.session.DeltaManager start WARNING: Manager[/servlets-examples], requesting session state from org.apache.catalina.cluster.mcast.McastMember[tcp://127.0.0.1:4001,127.0.0.1 ,4001, alive=1259]. This operation will timeout if no session state has been received within 60 seconds Apr 13, 2004 2:12:04 PM org.apache.catalina.cluster.session.DeltaManager start INFO: Manager[/servlets-examples], session state received in 102 ms. Why would /servlets-examples be able to transfer the state correctly but not our app? I would assume this would relate to the above ClassNotFoundException. Does anyone have any ideas on what is the cause of this problem? Thank you in advance, Eric --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
