Clustering question
Hi, I have setup two tomcat 5.5.7 servers which are clustered. Everything is working and the basic session is replication. However, when I add my own custom java object to the session this is not replicated. I have made it Serializable but this object also contains other java objects which are not serializable. Is this a problem? Is there anything special I need to consider to get my custom session objects to replicate?? Thanks, Steve. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Clustering question
Yes this is a problem. All objects contained within a serializable object must in turn be serializable themselves. -Original Message- From: Steven Pannell [mailto:[EMAIL PROTECTED] Sent: 01 April 2005 12:33 To: 'tomcat-user@jakarta.apache.org' Subject: Clustering question Hi, I have setup two tomcat 5.5.7 servers which are clustered. Everything is working and the basic session is replication. However, when I add my own custom java object to the session this is not replicated. I have made it Serializable but this object also contains other java objects which are not serializable. Is this a problem? Is there anything special I need to consider to get my custom session objects to replicate?? Thanks, Steve. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Serialization (was RE: Clustering question)
From: Dale, Matt [mailto:[EMAIL PROTECTED] Yes this is a problem. All objects contained within a serializable object must in turn be serializable themselves. Or marked as 'transient'. This omits them from serialization. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clustering question
Not all the objects inside your class must be serializable. Set all the objects you don't want to persist as transient. [ For instance, I don't want to persist a data connection [in this way] or a logger ] Viorel Dragomir . .. --- - Original Message - From: Dale, Matt To: Tomcat Users List Sent: Friday, April 01, 2005 13:38 Subject: RE: Clustering question Yes this is a problem. All objects contained within a serializable object must in turn be serializable themselves. -Original Message- From: Steven Pannell [mailto:[EMAIL PROTECTED] Sent: 01 April 2005 12:33 To: 'tomcat-user@jakarta.apache.org' Subject: Clustering question Hi, I have setup two tomcat 5.5.7 servers which are clustered. Everything is working and the basic session is replication. However, when I add my own custom java object to the session this is not replicated. I have made it Serializable but this object also contains other java objects which are not serializable. Is this a problem? Is there anything special I need to consider to get my custom session objects to replicate?? Thanks, Steve. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : Clustering question
Or they can be transient i.e. not serialized in a serialization process Sébastien Letélié -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Dale, Matt Envoyé : vendredi 1 avril 2005 13:38 À : Tomcat Users List Objet : RE: Clustering question Yes this is a problem. All objects contained within a serializable object must in turn be serializable themselves. -Original Message- From: Steven Pannell [mailto:[EMAIL PROTECTED] Sent: 01 April 2005 12:33 To: 'tomcat-user@jakarta.apache.org' Subject: Clustering question Hi, I have setup two tomcat 5.5.7 servers which are clustered. Everything is working and the basic session is replication. However, when I add my own custom java object to the session this is not replicated. I have made it Serializable but this object also contains other java objects which are not serializable. Is this a problem? Is there anything special I need to consider to get my custom session objects to replicate?? Thanks, Steve. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Serialization (was RE: Clustering question)
Peter Crowther wrote: From: Dale, Matt [mailto:[EMAIL PROTECTED] Yes this is a problem. All objects contained within a serializable object must in turn be serializable themselves. Or marked as 'transient'. This omits them from serialization. If you mark them as transient, you may need need to implement a method (ReadObject I believe) that properly initializes the transient variables/objects. There is an earlier post on this list where I describe how to do this. I had a similar problem in that many of my classes had a Commons Logger object stored in them. This had to be re-instatiated correctly when the object was replicated. HTH - Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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
RE: Tomcat 5 clustering question...
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
re: Tomcat 5 clustering question...
I was looking at the wrong part of my log from some earlier testing. On startup the two clusters are correctly transferring the state for my app: INFO: Processing Context configuration file URL ... Apr 14, 2004 10:43:50 AM org.apache.catalina.cluster.session.DeltaManager start INFO: Starting clustering manager...:/ourapp Apr 14, 2004 10:43:50 AM 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=132536]. This operation will timeout if no session state has been received within 60 seconds Apr 14, 2004 10:43:50 AM org.apache.catalina.cluster.session.DeltaManager start INFO: Manager[/ourapp], session state received in 103 ms. Also, the class not found exception I described from my previous post does exist and does implement Serializable. Thanks, Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
at most 4 cluster members, the cluster is at a host level, so yes, that would be 4 hosts in your scenario Filip -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 7:53 AM To: Tomcat Users List Subject: Re: clustering question? So let me get this straight. You are saying that I should only have 2-4 hosts in a cluster? or are saying that I should only have 2-4 physical boxes in a cluster? I have over 10 different host and was thinking that each one needed to be in its own cluster(is that the right way of thinking about it). Which lives on 2 tomcat boxes running and will be adding more in the long run. Thanks Daniel Schulken - Original Message - From: Aadi Deshpande [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 11:41 AM Subject: Re: clustering question? Hi, You're changing the wrong port. You should not change the mcastPort, instead you should change the tcpListenPort The mcastPort and mcastAddr should be the same for every instance participating in the cluster. Also, as a word of advice, it's best to keep the cluster size down to 2-3 ( and at most 4 ). we've had a lot of trouble with larger cluster sizes, not because of any fault of the cluster manager, just that it's a huge (network/memory ) resource hog having all your sessions replicated six times over. Of course, this is only for our case so YMMV. hth, -a [EMAIL PROTECTED] wrote: I am getting the following info in my log file. Mar 8, 2004 12:45:10 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Mar 8, 2004 12:45:10 PM org.apache.catalina.cluster.tcp.ReplicationListener run SEVERE: Unable to start cluster listener. java.net.SocketException: Address already in use at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:108 ) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52) at org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationLi stener.java:148) at org.apache.catalina.cluster.tcp.ReplicationListener.run(ReplicationListe ner.java:129) at java.lang.Thread.run(Thread.java:534) Mar 8, 2004 12:45:10 PM org.apache.catalina.cluster.mcast.McastService start INFO: Sleeping for 2000 secs to establish cluster membership 2004-03-08 12:45:13,151 [main] DEBUG (ManagerBase.java:671) - Registering Tomcat-Standalone:type=Manager,path=/,host=etrak-plus.com 2004-03-08 12:45:13,156 [main] DEBUG (StandardManager.java:697) - Force random number initialization starting 2004-03-08 12:45:13,157 [main] DEBUG (ManagerBase.java:555) - Opening /dev/urandom 2004-03-08 12:45:13,158 [main] DEBUG (ManagerBase.java:366) - Getting message digest component for algorithm MD5 2004-03-08 12:45:13,158 [main] DEBUG (ManagerBase.java:380) - Completed getting message digest component 2004-03-08 12:45:13,159 [main] DEBUG (ManagerBase.java:383) - getDigest() 1 2004-03-08 12:45:13,160 [main] DEBUG (StandardManager.java:700) - Force random number initialization completed 2004-03-08 12:45:13,161 [main] DEBUG (StandardManager.java:406) - Start: Loading persisted sessions 2004-03-08 12:45:13,161 [main] DEBUG (StandardManager.java:416) - Loading persisted sessions from SESSIONS.ser 2004-03-08 12:45:13,165 [main] DEBUG (StandardManager.java:430) - Creating custom object input stream for class loader 2004-03-08 12:45:13,171 [main] DEBUG (StandardManager.java:460) - Loading 0 persisted sessions 2004-03-08 12:45:13,172 [main] DEBUG (StandardManager.java:507) - Finish: Loading persisted sessions Here is the cluster info that i have in my server.xml. Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster name=etrakCluster1 managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.106 mcastPort=45100 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=auto tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ /Cluster my mcastAddr range is from 228.0.0.106 - 228.0.0.115 and the ports run from 45100-45109. Note each host has its own cluster entry and i have 10 different hosts. This is on tomcat 5.0.19 running on slackware 9.X Would i need to reboot the server to clear this up? Is this a problem with clustering or could it be a setup problem on my part. Thanks, Daniel Schulken --- Outgoing mail is certified Virus
Re: clustering question?
So let me get this straight. You are saying that I should only have 2-4 hosts in a cluster? or are saying that I should only have 2-4 physical boxes in a cluster? I have over 10 different host and was thinking that each one needed to be in its own cluster(is that the right way of thinking about it). Which lives on 2 tomcat boxes running and will be adding more in the long run. Thanks Daniel Schulken - Original Message - From: Aadi Deshpande [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 11:41 AM Subject: Re: clustering question? Hi, You're changing the wrong port. You should not change the mcastPort, instead you should change the tcpListenPort The mcastPort and mcastAddr should be the same for every instance participating in the cluster. Also, as a word of advice, it's best to keep the cluster size down to 2-3 ( and at most 4 ). we've had a lot of trouble with larger cluster sizes, not because of any fault of the cluster manager, just that it's a huge (network/memory ) resource hog having all your sessions replicated six times over. Of course, this is only for our case so YMMV. hth, -a [EMAIL PROTECTED] wrote: I am getting the following info in my log file. Mar 8, 2004 12:45:10 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Mar 8, 2004 12:45:10 PM org.apache.catalina.cluster.tcp.ReplicationListener run SEVERE: Unable to start cluster listener. java.net.SocketException: Address already in use at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:108 ) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52) at org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationLi stener.java:148) at org.apache.catalina.cluster.tcp.ReplicationListener.run(ReplicationListe ner.java:129) at java.lang.Thread.run(Thread.java:534) Mar 8, 2004 12:45:10 PM org.apache.catalina.cluster.mcast.McastService start INFO: Sleeping for 2000 secs to establish cluster membership 2004-03-08 12:45:13,151 [main] DEBUG (ManagerBase.java:671) - Registering Tomcat-Standalone:type=Manager,path=/,host=etrak-plus.com 2004-03-08 12:45:13,156 [main] DEBUG (StandardManager.java:697) - Force random number initialization starting 2004-03-08 12:45:13,157 [main] DEBUG (ManagerBase.java:555) - Opening /dev/urandom 2004-03-08 12:45:13,158 [main] DEBUG (ManagerBase.java:366) - Getting message digest component for algorithm MD5 2004-03-08 12:45:13,158 [main] DEBUG (ManagerBase.java:380) - Completed getting message digest component 2004-03-08 12:45:13,159 [main] DEBUG (ManagerBase.java:383) - getDigest() 1 2004-03-08 12:45:13,160 [main] DEBUG (StandardManager.java:700) - Force random number initialization completed 2004-03-08 12:45:13,161 [main] DEBUG (StandardManager.java:406) - Start: Loading persisted sessions 2004-03-08 12:45:13,161 [main] DEBUG (StandardManager.java:416) - Loading persisted sessions from SESSIONS.ser 2004-03-08 12:45:13,165 [main] DEBUG (StandardManager.java:430) - Creating custom object input stream for class loader 2004-03-08 12:45:13,171 [main] DEBUG (StandardManager.java:460) - Loading 0 persisted sessions 2004-03-08 12:45:13,172 [main] DEBUG (StandardManager.java:507) - Finish: Loading persisted sessions Here is the cluster info that i have in my server.xml. Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster name=etrakCluster1 managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.106 mcastPort=45100 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=auto tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ /Cluster my mcastAddr range is from 228.0.0.106 - 228.0.0.115 and the ports run from 45100-45109. Note each host has its own cluster entry and i have 10 different hosts. This is on tomcat 5.0.19 running on slackware 9.X Would i need to reboot the server to clear this up? Is this a problem with clustering or could it be a setup problem on my part. Thanks, Daniel Schulken --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.598 / Virus Database: 380 - Release Date: 2/28/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail
Re: clustering question?
Hi, You're changing the wrong port. You should not change the mcastPort, instead you should change the tcpListenPort The mcastPort and mcastAddr should be the same for every instance participating in the cluster. Also, as a word of advice, it's best to keep the cluster size down to 2-3 ( and at most 4 ). we've had a lot of trouble with larger cluster sizes, not because of any fault of the cluster manager, just that it's a huge (network/memory ) resource hog having all your sessions replicated six times over. Of course, this is only for our case so YMMV. hth, -a [EMAIL PROTECTED] wrote: I am getting the following info in my log file. Mar 8, 2004 12:45:10 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Mar 8, 2004 12:45:10 PM org.apache.catalina.cluster.tcp.ReplicationListener run SEVERE: Unable to start cluster listener. java.net.SocketException: Address already in use at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:108 ) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52) at org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationLi stener.java:148) at org.apache.catalina.cluster.tcp.ReplicationListener.run(ReplicationListe ner.java:129) at java.lang.Thread.run(Thread.java:534) Mar 8, 2004 12:45:10 PM org.apache.catalina.cluster.mcast.McastService start INFO: Sleeping for 2000 secs to establish cluster membership 2004-03-08 12:45:13,151 [main] DEBUG (ManagerBase.java:671) - Registering Tomcat-Standalone:type=Manager,path=/,host=etrak-plus.com 2004-03-08 12:45:13,156 [main] DEBUG (StandardManager.java:697) - Force random number initialization starting 2004-03-08 12:45:13,157 [main] DEBUG (ManagerBase.java:555) - Opening /dev/urandom 2004-03-08 12:45:13,158 [main] DEBUG (ManagerBase.java:366) - Getting message digest component for algorithm MD5 2004-03-08 12:45:13,158 [main] DEBUG (ManagerBase.java:380) - Completed getting message digest component 2004-03-08 12:45:13,159 [main] DEBUG (ManagerBase.java:383) - getDigest() 1 2004-03-08 12:45:13,160 [main] DEBUG (StandardManager.java:700) - Force random number initialization completed 2004-03-08 12:45:13,161 [main] DEBUG (StandardManager.java:406) - Start: Loading persisted sessions 2004-03-08 12:45:13,161 [main] DEBUG (StandardManager.java:416) - Loading persisted sessions from SESSIONS.ser 2004-03-08 12:45:13,165 [main] DEBUG (StandardManager.java:430) - Creating custom object input stream for class loader 2004-03-08 12:45:13,171 [main] DEBUG (StandardManager.java:460) - Loading 0 persisted sessions 2004-03-08 12:45:13,172 [main] DEBUG (StandardManager.java:507) - Finish: Loading persisted sessions Here is the cluster info that i have in my server.xml. Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster name=etrakCluster1 managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.106 mcastPort=45100 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=auto tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ /Cluster my mcastAddr range is from 228.0.0.106 - 228.0.0.115 and the ports run from 45100-45109. Note each host has its own cluster entry and i have 10 different hosts. This is on tomcat 5.0.19 running on slackware 9.X Would i need to reboot the server to clear this up? Is this a problem with clustering or could it be a setup problem on my part. Thanks, Daniel Schulken --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.598 / Virus Database: 380 - Release Date: 2/28/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: clustering question?
Aadi, do you have this working properly with 5.0.19? I can't get session replication to work. I see lots of errors in my catalina.out request.registerRequests=false i added this to jk2.properties to stop the error messages. On Tue, 9 Mar 2004, Aadi Deshpande wrote: Date: Tue, 09 Mar 2004 11:41:43 -0500 From: Aadi Deshpande [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: clustering question? Hi, You're changing the wrong port. You should not change the mcastPort, instead you should change the tcpListenPort The mcastPort and mcastAddr should be the same for every instance participating in the cluster. Also, as a word of advice, it's best to keep the cluster size down to 2-3 ( and at most 4 ). we've had a lot of trouble with larger cluster sizes, not because of any fault of the cluster manager, just that it's a huge (network/memory ) resource hog having all your sessions replicated six times over. Of course, this is only for our case so YMMV. hth, -a - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
request.registerRequests=false is related to jk2 and not to session replication. what is your problem with session replication? Filip -Original Message- From: Alex [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 11:53 AM To: Tomcat Users List Subject: Re: clustering question? Aadi, do you have this working properly with 5.0.19? I can't get session replication to work. I see lots of errors in my catalina.out request.registerRequests=false i added this to jk2.properties to stop the error messages. On Tue, 9 Mar 2004, Aadi Deshpande wrote: Date: Tue, 09 Mar 2004 11:41:43 -0500 From: Aadi Deshpande [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: clustering question? Hi, You're changing the wrong port. You should not change the mcastPort, instead you should change the tcpListenPort The mcastPort and mcastAddr should be the same for every instance participating in the cluster. Also, as a word of advice, it's best to keep the cluster size down to 2-3 ( and at most 4 ). we've had a lot of trouble with larger cluster sizes, not because of any fault of the cluster manager, just that it's a huge (network/memory ) resource hog having all your sessions replicated six times over. Of course, this is only for our case so YMMV. hth, -a - 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.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
Mar 9, 2004 6:45:28 PM org.apache.jk.common.HandlerRequest decodeRequest WARNING: Error registering request This occurs when I uncomment the jk2.property noted below. All the classes that could/do/will/would get stored to session are serializable. I have two exact machines running rh 9.0 with java version 1.4.2_03 and running tomcat 5.0.19 from server.xml: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false debug=4 useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastPort=45564 mcastFrequency=500 debug=4 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=10.99.116.2 tcpListenPort=4001 tcpSelectorTimeout=100 debug=4 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter debug=4 replicationMode=asynchronous/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve debug=4 filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ /Cluster From the other server set up identically (same code, same confs -- different ip) Mar 9, 2004 6:45:08 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberDisappeared INFO: Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://10.99.116.2:4001,10.99.116.2,4001, alive=384926336] Mar 9, 2004 6:45:09 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.99.116.2:4001,10.99.116.2,4001, alive=18] Mar 9, 2004 6:45:09 PM org.apache.catalina.cluster.tcp.AsyncSocketSender init INFO: Started async sender thread for TCP replication. On Tue, 9 Mar 2004, Filip Hanik (lists) wrote: Date: Tue, 9 Mar 2004 12:17:31 -0600 From: Filip Hanik (lists) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: clustering question? request.registerRequests=false is related to jk2 and not to session replication. what is your problem with session replication? Filip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
on RH9, you MUST set export LD_ASSUME_KERNEL=2.4 before starting your Java process. There is a bug in the java.nio package Filip -Original Message- From: Alex [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 12:35 PM To: Tomcat Users List Subject: RE: clustering question? Mar 9, 2004 6:45:28 PM org.apache.jk.common.HandlerRequest decodeRequest WARNING: Error registering request This occurs when I uncomment the jk2.property noted below. All the classes that could/do/will/would get stored to session are serializable. I have two exact machines running rh 9.0 with java version 1.4.2_03 and running tomcat 5.0.19 from server.xml: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false debug=4 useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastPort=45564 mcastFrequency=500 debug=4 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=10.99.116.2 tcpListenPort=4001 tcpSelectorTimeout=100 debug=4 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter debug=4 replicationMode=asynchronous/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve debug=4 filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ /Cluster From the other server set up identically (same code, same confs -- different ip) Mar 9, 2004 6:45:08 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberDisappeared INFO: Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://10.99.116.2: 4001,10.99.116.2,4001, alive=384926336] Mar 9, 2004 6:45:09 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.99.116.2:4001,1 0.99.116.2,4001, alive=18] Mar 9, 2004 6:45:09 PM org.apache.catalina.cluster.tcp.AsyncSocketSender init INFO: Started async sender thread for TCP replication. On Tue, 9 Mar 2004, Filip Hanik (lists) wrote: Date: Tue, 9 Mar 2004 12:17:31 -0600 From: Filip Hanik (lists) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: clustering question? request.registerRequests=false is related to jk2 and not to session replication. what is your problem with session replication? Filip - 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.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
I also stronly recommend using pooled as a replication mode, it is fast and guaranteed Filip -Original Message- From: Alex [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 12:35 PM To: Tomcat Users List Subject: RE: clustering question? Mar 9, 2004 6:45:28 PM org.apache.jk.common.HandlerRequest decodeRequest WARNING: Error registering request This occurs when I uncomment the jk2.property noted below. All the classes that could/do/will/would get stored to session are serializable. I have two exact machines running rh 9.0 with java version 1.4.2_03 and running tomcat 5.0.19 from server.xml: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false debug=4 useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastPort=45564 mcastFrequency=500 debug=4 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=10.99.116.2 tcpListenPort=4001 tcpSelectorTimeout=100 debug=4 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter debug=4 replicationMode=asynchronous/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve debug=4 filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ /Cluster From the other server set up identically (same code, same confs -- different ip) Mar 9, 2004 6:45:08 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberDisappeared INFO: Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://10.99.116.2: 4001,10.99.116.2,4001, alive=384926336] Mar 9, 2004 6:45:09 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.99.116.2:4001,1 0.99.116.2,4001, alive=18] Mar 9, 2004 6:45:09 PM org.apache.catalina.cluster.tcp.AsyncSocketSender init INFO: Started async sender thread for TCP replication. On Tue, 9 Mar 2004, Filip Hanik (lists) wrote: Date: Tue, 9 Mar 2004 12:17:31 -0600 From: Filip Hanik (lists) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: clustering question? request.registerRequests=false is related to jk2 and not to session replication. what is your problem with session replication? Filip - 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.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
I put the export LD_ASSUME_KERNEL=2.4 in my startup.sh which is called and still get: Mar 9, 2004 7:11:22 PM org.apache.jk.common.HandlerRequest decodeRequest WARNING: Error registering request Thanks for the suggestion though. I've been reading and googlin' for a week now... On Tue, 9 Mar 2004, Filip Hanik (lists) wrote: Date: Tue, 9 Mar 2004 13:04:00 -0600 From: Filip Hanik (lists) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: clustering question? on RH9, you MUST set export LD_ASSUME_KERNEL=2.4 before starting your Java process. There is a bug in the java.nio package Filip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
Once I can get it working i'll be playing and see what suits the application setup best. On Tue, 9 Mar 2004, Filip Hanik (lists) wrote: Date: Tue, 9 Mar 2004 13:04:31 -0600 From: Filip Hanik (lists) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: clustering question? I also stronly recommend using pooled as a replication mode, it is fast and guaranteed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
to get session replication working, take jk2 out of the equation first. use a loadbalancer like balance (balance.sourceforge.net) or pen (siag.nu) Filip -Original Message- From: Alex [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 12:58 PM To: Tomcat Users List Subject: RE: clustering question? I put the export LD_ASSUME_KERNEL=2.4 in my startup.sh which is called and still get: Mar 9, 2004 7:11:22 PM org.apache.jk.common.HandlerRequest decodeRequest WARNING: Error registering request Thanks for the suggestion though. I've been reading and googlin' for a week now... On Tue, 9 Mar 2004, Filip Hanik (lists) wrote: Date: Tue, 9 Mar 2004 13:04:00 -0600 From: Filip Hanik (lists) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: clustering question? on RH9, you MUST set export LD_ASSUME_KERNEL=2.4 before starting your Java process. There is a bug in the java.nio package Filip - 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.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
jk2 is only being utilized to provide the connection between IIS5.0 and tomcat using ajp13. when i've been testing, this is going direct to tomcats port 8080 and utilizing the tomcat web server. if i understand it properly, when the session is instantiated on one server, it's replicated via tcp to the other's that are listening and added to the pool that's been discovered by the multicast. correct? On Tue, 9 Mar 2004, Filip Hanik (lists) wrote: Date: Tue, 9 Mar 2004 13:34:45 -0600 From: Filip Hanik (lists) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: clustering question? to get session replication working, take jk2 out of the equation first. use a loadbalancer like balance (balance.sourceforge.net) or pen (siag.nu) Filip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
that is correct, should work out of the box :) Filip -Original Message- From: Alex [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 1:23 PM To: Tomcat Users List Subject: RE: clustering question? jk2 is only being utilized to provide the connection between IIS5.0 and tomcat using ajp13. when i've been testing, this is going direct to tomcats port 8080 and utilizing the tomcat web server. if i understand it properly, when the session is instantiated on one server, it's replicated via tcp to the other's that are listening and added to the pool that's been discovered by the multicast. correct? On Tue, 9 Mar 2004, Filip Hanik (lists) wrote: Date: Tue, 9 Mar 2004 13:34:45 -0600 From: Filip Hanik (lists) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: clustering question? to get session replication working, take jk2 out of the equation first. use a loadbalancer like balance (balance.sourceforge.net) or pen (siag.nu) Filip - 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.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
my box isn't pretty. i've also had some other weirdness which others haven't experienced. some odd jndi errors, rah rah rah. anyways, it doesn't work. between this and not being able to get jk2 to do sticky sessions, i'm going nuts. have two different routes to go and neither are working. *sigh* On Tue, 9 Mar 2004, Filip Hanik (lists) wrote: Date: Tue, 9 Mar 2004 13:44:08 -0600 From: Filip Hanik (lists) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: clustering question? that is correct, should work out of the box :) Filip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: clustering question?
Hi, The register requests error is independent of the cluster setup ( like Filip said ) and will in no way affect it. Beyond that, the register requests error is completely harmless ( see http://www.mail-archive.com/[EMAIL PROTECTED]/msg119877.html ) and does not prevent me from providing stickySessions or clustering. You should enable logging for the package org.apache.catalina.cluster ( i use JDK14 logging so ask me if that's what you're using ) to see if replication is occurring. hth, -a Alex wrote: my box isn't pretty. i've also had some other weirdness which others haven't experienced. some odd jndi errors, rah rah rah. anyways, it doesn't work. between this and not being able to get jk2 to do sticky sessions, i'm going nuts. have two different routes to go and neither are working. *sigh* On Tue, 9 Mar 2004, Filip Hanik (lists) wrote: Date: Tue, 9 Mar 2004 13:44:08 -0600 From: Filip Hanik (lists) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: clustering question? that is correct, should work out of the box :) Filip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: clustering question?
log4j for the application. i really don't believe replication is occuring. i see nothing in the application logs, localhost_log or catalina.out aside from the error On Tue, 9 Mar 2004, Aadi Deshpande wrote: Date: Tue, 09 Mar 2004 16:29:36 -0500 From: Aadi Deshpande [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: clustering question? Hi, The register requests error is independent of the cluster setup ( like Filip said ) and will in no way affect it. Beyond that, the register requests error is completely harmless ( see http://www.mail-archive.com/[EMAIL PROTECTED]/msg119877.html ) and does not prevent me from providing stickySessions or clustering. You should enable logging for the package org.apache.catalina.cluster ( i use JDK14 logging so ask me if that's what you're using ) to see if replication is occurring. hth, -a - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: clustering question?
like many other people, you probably don't have the element distributable/ in your web.xml Filip log4j for the application. i really don't believe replication is occuring. i see nothing in the application logs, localhost_log or catalina.out aside from the error On Tue, 9 Mar 2004, Aadi Deshpande wrote: Date: Tue, 09 Mar 2004 16:29:36 -0500 From: Aadi Deshpande [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: clustering question? Hi, The register requests error is independent of the cluster setup ( like Filip said ) and will in no way affect it. Beyond that, the register requests error is completely harmless ( see http://www.mail-archive.com/[EMAIL PROTECTED]/msg119877.html ) and does not prevent me from providing stickySessions or clustering. You should enable logging for the package org.apache.catalina.cluster ( i use JDK14 logging so ask me if that's what you're using ) to see if replication is occurring. hth, -a - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: clustering question?
Filip, thanks for the reply. I do indeed have that tag in web.xml for that web application. session-config session-timeout40/session-timeout /session-config distributable/ /web-app this is correct, yes? On Tue, 9 Mar 2004 [EMAIL PROTECTED] wrote: Date: Tue, 9 Mar 2004 22:36:10 -0500 (EST) From: [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: clustering question? like many other people, you probably don't have the element distributable/ in your web.xml Filip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: clustering question?
Alex wrote, On 3/9/2004 10:26 PM: thanks for the reply. I do indeed have that tag in web.xml for that web application. session-config session-timeout40/session-timeout /session-config distributable/ /web-app this is correct, yes? The distributable element should go before any context-param elements and after any description elements. See the DTD for the correct order of elements in the web.xml file. http://java.sun.com/j2ee/dtds/web-app_2_2.dtd http://java.sun.com/dtd/web-app_2_3.dtd -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
clustering question?
I am getting the following info in my log file. Mar 8, 2004 12:45:10 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Mar 8, 2004 12:45:10 PM org.apache.catalina.cluster.tcp.ReplicationListener run SEVERE: Unable to start cluster listener. java.net.SocketException: Address already in use at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:108) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52) at org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationListener.java:148) at org.apache.catalina.cluster.tcp.ReplicationListener.run(ReplicationListener.java:129) at java.lang.Thread.run(Thread.java:534) Mar 8, 2004 12:45:10 PM org.apache.catalina.cluster.mcast.McastService start INFO: Sleeping for 2000 secs to establish cluster membership 2004-03-08 12:45:13,151 [main] DEBUG (ManagerBase.java:671) - Registering Tomcat-Standalone:type=Manager,path=/,host=etrak-plus.com 2004-03-08 12:45:13,156 [main] DEBUG (StandardManager.java:697) - Force random number initialization starting 2004-03-08 12:45:13,157 [main] DEBUG (ManagerBase.java:555) - Opening /dev/urandom 2004-03-08 12:45:13,158 [main] DEBUG (ManagerBase.java:366) - Getting message digest component for algorithm MD5 2004-03-08 12:45:13,158 [main] DEBUG (ManagerBase.java:380) - Completed getting message digest component 2004-03-08 12:45:13,159 [main] DEBUG (ManagerBase.java:383) - getDigest() 1 2004-03-08 12:45:13,160 [main] DEBUG (StandardManager.java:700) - Force random number initialization completed 2004-03-08 12:45:13,161 [main] DEBUG (StandardManager.java:406) - Start: Loading persisted sessions 2004-03-08 12:45:13,161 [main] DEBUG (StandardManager.java:416) - Loading persisted sessions from SESSIONS.ser 2004-03-08 12:45:13,165 [main] DEBUG (StandardManager.java:430) - Creating custom object input stream for class loader 2004-03-08 12:45:13,171 [main] DEBUG (StandardManager.java:460) - Loading 0 persisted sessions 2004-03-08 12:45:13,172 [main] DEBUG (StandardManager.java:507) - Finish: Loading persisted sessions Here is the cluster info that i have in my server.xml. Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster name=etrakCluster1 managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.106 mcastPort=45100 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=auto tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ /Cluster my mcastAddr range is from 228.0.0.106 - 228.0.0.115 and the ports run from 45100-45109. Note each host has its own cluster entry and i have 10 different hosts. This is on tomcat 5.0.19 running on slackware 9.X Would i need to reboot the server to clear this up? Is this a problem with clustering or could it be a setup problem on my part. Thanks, Daniel Schulken --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.598 / Virus Database: 380 - Release Date: 2/28/2004
Re: Clustering question...
As I was not involved in the design decision, I can not say whether or not that it is a good call or not. But the reason that we need application context replication is that the entire site serves up relatively static data(infrequent updates) to all of it the users. They did not feel that hitting the DB every time a page is accessed was efficient. Rick Filip Hanik wrote: application context data doesn't get replicated, since this is not tied to a user, hence it doesn't serve any purpose in fail over. ie, what ever got stored in application context on server A, should have got stored on B by the same mechanism, not by session replication. Is there a huge need to replicate context data? Filip - Original Message - From: Rick Szeto [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 19, 2004 1:53 PM Subject: Clustering question... Hi All, I have question about synchronizing data within the application context. If the data of a webapp's application context changes within one of the nodes in the cluster, how does the other nodes get the updated application context data? Is it handle the same way as user session data(via some session manager implementation)? Or does the change(s) get distributed? Thanks for any help you can give, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clustering question...
if I understand correctly, you have multiple tomcat instances. 1. each system has the same webapp 2. each system caches data locally 3. you want to update the application context 4. you want the cluster to replicate the application context 5. you didn't design it and have to live with it replicating the app context ideally should happen in a push manner if being in sync is of any importance. I'm not convinced enhancing the exist session replication is the best way to handle this because the data could be huge. Even if the documentation were to state, do not put large amounts of data in the application context, people will still do it and blame tomcat. the worse part is caching app context data means an additional burden on the session replication mechanism, which is dangerous. It might be better off for your app context to register for updates with a JMS server. this way, changes can be pushed to the tomcat instances. Or something equivalent to a push mechanism. peter lin Rick Szeto [EMAIL PROTECTED] wrote: As I was not involved in the design decision, I can not say whether or not that it is a good call or not. But the reason that we need application context replication is that the entire site serves up relatively static data(infrequent updates) to all of it the users. They did not feel that hitting the DB every time a page is accessed was efficient. Rick - Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
Re: Clustering question...
As of now I don' think the Tomcat clustering code of Filip supports any of what you ask. The only thing replicated is the session and the date within. The principal is not replicated as of yet. (I think Filip is working on that) You will have to find another centralized spot to store those data for each node to access. Jean-Philippe Bélanger CGI Rick Szeto wrote: Hi All, I have question about synchronizing data within the application context. If the data of a webapp's application context changes within one of the nodes in the cluster, how does the other nodes get the updated application context data? Is it handle the same way as user session data(via some session manager implementation)? Or does the change(s) get distributed? Thanks for any help you can give, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clustering question...
Ok, thanks for your quick response. Rick [EMAIL PROTECTED] wrote: As of now I don' think the Tomcat clustering code of Filip supports any of what you ask. The only thing replicated is the session and the date within. The principal is not replicated as of yet. (I think Filip is working on that) You will have to find another centralized spot to store those data for each node to access. Jean-Philippe Bélanger CGI Rick Szeto wrote: Hi All, I have question about synchronizing data within the application context. If the data of a webapp's application context changes within one of the nodes in the cluster, how does the other nodes get the updated application context data? Is it handle the same way as user session data(via some session manager implementation)? Or does the change(s) get distributed? Thanks for any help you can give, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clustering question...
I replicate the principal with the DeltaManager, a manager that only replicates changes instead of the entire session. to use the DeltaManager in T5 clustering, add the attribute to your cluster element in server.xml managerClassName=org.apache.catalina.cluster.session.DeltaManager I am still working on performance enhancement for this class but it is ready to go. Filip - Original Message - From: Rick Szeto [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, January 20, 2004 11:09 AM Subject: Re: Clustering question... Ok, thanks for your quick response. Rick [EMAIL PROTECTED] wrote: As of now I don' think the Tomcat clustering code of Filip supports any of what you ask. The only thing replicated is the session and the date within. The principal is not replicated as of yet. (I think Filip is working on that) You will have to find another centralized spot to store those data for each node to access. Jean-Philippe Bélanger CGI Rick Szeto wrote: Hi All, I have question about synchronizing data within the application context. If the data of a webapp's application context changes within one of the nodes in the cluster, how does the other nodes get the updated application context data? Is it handle the same way as user session data(via some session manager implementation)? Or does the change(s) get distributed? Thanks for any help you can give, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clustering question...
application context data doesn't get replicated, since this is not tied to a user, hence it doesn't serve any purpose in fail over. ie, what ever got stored in application context on server A, should have got stored on B by the same mechanism, not by session replication. Is there a huge need to replicate context data? Filip - Original Message - From: Rick Szeto [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 19, 2004 1:53 PM Subject: Clustering question... Hi All, I have question about synchronizing data within the application context. If the data of a webapp's application context changes within one of the nodes in the cluster, how does the other nodes get the updated application context data? Is it handle the same way as user session data(via some session manager implementation)? Or does the change(s) get distributed? Thanks for any help you can give, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clustering question...
sounds more like cluster deployment tool and not replication at runtime. since tomcat 5 now uses JMX, writing a cluster deployment tool should be straight forward. peter Filip Hanik [EMAIL PROTECTED] wrote: application context data doesn't get replicated, since this is not tied to a user, hence it doesn't serve any purpose in fail over. ie, what ever got stored in application context on server A, should have got stored on B by the same mechanism, not by session replication. Is there a huge need to replicate context data? Filip - Original Message - From: Rick Szeto To: Sent: Monday, January 19, 2004 1:53 PM Subject: Clustering question... Hi All, I have question about synchronizing data within the application context. If the data of a webapp's application context changes within one of the nodes in the cluster, how does the other nodes get the updated application context data? Is it handle the same way as user session data(via some session manager implementation)? Or does the change(s) get distributed? Thanks for any help you can give, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
RE: Clustering question...
we are talking about context data (context.setAttribute), not the context itself which you are referring to as the application. Filip -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 20, 2004 6:04 PM To: Tomcat Users List Subject: Re: Clustering question... sounds more like cluster deployment tool and not replication at runtime. since tomcat 5 now uses JMX, writing a cluster deployment tool should be straight forward. peter Filip Hanik [EMAIL PROTECTED] wrote: application context data doesn't get replicated, since this is not tied to a user, hence it doesn't serve any purpose in fail over. ie, what ever got stored in application context on server A, should have got stored on B by the same mechanism, not by session replication. Is there a huge need to replicate context data? Filip - Original Message - From: Rick Szeto To: Sent: Monday, January 19, 2004 1:53 PM Subject: Clustering question... Hi All, I have question about synchronizing data within the application context. If the data of a webapp's application context changes within one of the nodes in the cluster, how does the other nodes get the updated application context data? Is it handle the same way as user session data(via some session manager implementation)? Or does the change(s) get distributed? Thanks for any help you can give, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Clustering question...
Hi All, I have question about synchronizing data within the application context. If the data of a webapp's application context changes within one of the nodes in the cluster, how does the other nodes get the updated application context data? Is it handle the same way as user session data(via some session manager implementation)? Or does the change(s) get distributed? Thanks for any help you can give, Rick Szeto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
clustering question for newbie ???
Hello, I setup an environment to make two Tomcat servers in clustering and with the Apache for Load Balance. All the configuration is no problem. when one Tomcat crashed, it can switch to another one. But I wonder if the new one can keep the session attributes ? For example, An application create a session in Tomcat1, and setAttribute() into that session. After that, the Tomcat1 is crashed. Apache will switch it to Tomcat2, but the Tomcat2 will create another new session for that application. Therefore, the attributes in the previous Tomcat1's session is destroyed. I am a newbie in clustering, is that Clustering ike that can't keep the session values to another server Eric == If you know what you are doing, it is not called RESEARCH! == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]