tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: questions on tomcat cluster
Date Mon, 10 Aug 2009 14:46:40 GMT
so replication is actually working for you, you just have a classpath 
issues with how you setup your libraries.

Filip

On 08/10/2009 08:35 AM, TianJing wrote:
> thanks,
>
> the two tomcat are on different machines, one is on the same server 
> with apache.
>
> in the tomcat catalina.out, it says:
>
> 2009-8-10 18:57:53 
> org.apache.catalina.tribes.tipis.AbstractReplicatedMap messageReceived
> ÑÏÖØ: Unable to apply diff to key:4CFE0AE7D7D00AAB2536871C84FE7865.worker2
> java.lang.ClassNotFoundException: javax.faces.context.FacesContext
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:247)
>         at 
> org.apache.el.util.ReflectionUtil.forName(ReflectionUtil.java:68)
>         at 
> org.apache.el.util.ReflectionUtil.toTypeArray(ReflectionUtil.java:95)
>         at 
> org.apache.el.MethodExpressionImpl.readExternal(MethodExpressionImpl.java:291)
>         at 
> java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
>         at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
>         at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
>         at 
> com.sun.facelets.el.TagMethodExpression.readExternal(TagMethodExpression.java:101)
>         at 
> java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
>         at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
>         at 
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
>         at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
>         at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
>         at java.util.ArrayList.readObject(ArrayList.java:593)
>         at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at 
> java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
>         at 
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
>         at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
>         at 
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
>         at 
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
>         at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
>         at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
>         at java.util.HashMap.readObject(HashMap.java:1030)
>         at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at 
> java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
>         at 
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
>         at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
>         at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
>         at java.util.HashMap.readObject(HashMap.java:1030)
>         at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at 
> java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
>         at 
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
>         at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
>         at 
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
>         at 
> java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
>         at 
> org.ajax4jsf.application.AjaxStateHolder.readObject(AjaxStateHolder.java:184)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at 
> java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
>         at 
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
>         at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
>         at 
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
>         at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
>         at 
> org.apache.catalina.ha.session.DeltaRequest$AttributeInfo.readExternal(DeltaRequest.java:361)
>         at 
> org.apache.catalina.ha.session.DeltaRequest.readExternal(DeltaRequest.java:255)
>         at 
> org.apache.catalina.ha.session.DeltaSession.applyDiff(DeltaSession.java:171)
>         at 
> org.apache.catalina.tribes.tipis.AbstractReplicatedMap.messageReceived(AbstractReplicatedMap.java:626)
>         at 
> org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChannel.java:269)
>         at 
> org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
>         at 
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageReceived(TcpFailureDetector.java:110)
>         at 
> org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
>         at 
> org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
>         at 
> org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor.messageReceived(ThroughputInterceptor.java:86)
>         at 
> org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
>         at 
> org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(ChannelCoordinator.java:241)
>         at 
> org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(ReceiverBase.java:225)
>         at 
> org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:188)
>         at 
> org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:91)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
>
>
> 2009/8/10 TianJing <tianjing@genomics.org.cn 
> <mailto:tianjing@genomics.org.cn>>
>
>     the two tomcat are on different machines, one is on the same
>     server with apache.
>
>     2009/8/10 Filip Hanik - Dev Lists <devlists@hanik.com
>     <mailto:devlists@hanik.com>>
>
>         are the Tomcat machines on the same box?
>
>         if yes, and this is tomcat 6.0.20, there is a regression in
>         the tomcat code
>         https://issues.apache.org/bugzilla/show_bug.cgi?id=47308
>
>         If this is not the case, let us know and we can help you further
>         Filip
>
>
>         On 08/10/2009 05:51 AM, TianJing wrote:
>
>             Hi all,
>
>             i am now setting up a cluster with a  httpd-2.2.13 and two
>             tomcat 6.0, i
>             hope to use Session Replication,but there have some problems:
>             the session can not replication,when a tomcat is
>             disappeared, the session is
>             lost.
>
>             could you please give me some advices? thanks very much!
>
>             here is some detail information:
>
>             i set the cluser at engine level,and my routing table is :
>             Destination     Gateway         Genmask         Flags
>             Metric Ref    Use
>             Iface
>             255.255.255.255 0.0.0.0         255.255.255.255 UH    0  
>                0        0 eth0
>             224.0.0.4       0.0.0.0         255.255.255.255 UH    0  
>                0        0 eth1
>
>
>             my configure file is as follow:
>
>
>             ########workers.properties configuration
>             workers.java_home=/usr/java/latest
>             worker.list=controller
>             # Set properties for worker1;
>             worker.worker1.type=ajp13
>             worker.worker1.host=localhost
>             worker.worker1.port=8999
>             worker.worker1.lbfactor=50
>             worker.worker1.cachesize=10
>             worker.worker1.cache_timeout=600
>             worker.worker1.socket_keepalive=1
>             worker.worker1.socket_timeout=300
>             worker.worker1.redirect=worker2
>             # Set properties for worker2;
>             worker.worker2.type=ajp13
>             worker.worker2.host=192.168.8.129
>             worker.worker2.port=8999
>             worker.worker2.lbfactor=50
>             worker.worker2.cachesize=10
>             worker.worker2.cache_timeout=600
>             worker.worker2.socket_keepalive=1
>             worker.worker2.socket_timeout=300
>             worker.worker2.redirect=worker1
>             # Define the LB worker
>             worker.controller.type=lb
>             worker.controller.balance_workers=worker1,worker2
>             worker.controller.sticky_session=true
>
>             ########apache vhost:
>             <VirtualHost *:80>
>                 ServerAdmin xxxx.xxxx.xxxx
>                 #DocumentRoot "/share/bccdata/Cloud/src"
>                 DirectoryIndex  home.xhtml index.htm index.jsp index.php
>                 ServerName xxx.xxx.xxx.xxx
>                 JkMountFile /scratch/apache2.2.13/conf/worker.conf
>                 ErrorLog "logs/cloud-error.log"
>                 CustomLog "logs/cloud-access_log" common
>             </VirtualHost>
>
>             #######worker.conf
>             /*=controller
>
>
>             ##tomcat1 server.xml on server1
>             <Engine name="Catalina" defaultHost="xxx.xxxxx.xxx.xx"
>             jvmRoute="controller">
>             <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
>                          resourceName="UserDatabase"/>
>             <Cluster
>             className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
>             channelSendOptions="8">
>             <!--<Manager
>             className="org.apache.catalina.ha.session.BackupManager"
>                                            
>              expireSessionsOnShutdown="false"
>                                            
>              notifyListenersOnReplication="true"
>                                              mapSendOptions="6"/>-->
>             <Manager
>             className="org.apache.catalina.ha.session.DeltaManager"
>                                            
>              expireSessionsOnShutdown="false"
>                                            
>              notifyListenersOnReplication="true"/>
>
>             <Channel
>             className="org.apache.catalina.tribes.group.GroupChannel">
>             <Membership
>             className="org.apache.catalina.tribes.membership.McastService"
>                                                      address="224.0.0.4"
>                                                      port="45564"
>                                                  frequency="500"
>                                                  dropTime="3000"/>
>             <Receiver
>             className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>                                                address="auto"
>                                                port="4000"
>                                            selectorTimeout="100"
>                                                maxThreads="6"/>
>             <Sender
>             className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>             <Transport
>             className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
>             </Sender>
>             <Interceptor
>             className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
>             <Interceptor
>             className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
>             <Interceptor
>             className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
>             </Channel>
>             <Valve
>             className="org.apache.catalina.ha.tcp.ReplicationValve"
>
>             filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
>
>             <Deployer
>             className="org.apache.catalina.ha.deploy.FarmWarDeployer"
>                                               tempDir="/tmp/war-temp/"
>                                               deployDir="/tmp/war-deploy/"
>                                               watchDir="/tmp/war-listen/"
>                                               watchEnabled="false"/>
>             <ClusterListener
>             className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
>             <ClusterListener
>             className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>             </Cluster>
>             <Host name="xxx.xxx.xxx.xxx" debug="0" appBase="webapps"
>             unpackWARs="true"
>             autoDeploy="true">
>             <Context path="" docBase="Test"  debug="0" reloadable="false"
>             distributable="true"/>
>             </Host>
>
>             </Engine>
>
>
>             ##tomcat2 server.xml on server2
>             <Engine name="Catalina" defaultHost="xxx.xxx.xxx.xxx"
>             jvmRoute="controller">
>             <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
>                          resourceName="UserDatabase"/>
>             <!--<Engine name="Catalina" defaultHost="localhost">-->
>
>             <Cluster
>             className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
>             channelSendOptions="8">
>             <!--<Manager
>             className="org.apache.catalina.ha.session.BackupManager"
>                                            
>              expireSessionsOnShutdown="false"
>                                            
>              notifyListenersOnReplication="true"
>                                              mapSendOptions="6"/>-->
>             <Manager
>             className="org.apache.catalina.ha.session.DeltaManager"
>                                            
>              expireSessionsOnShutdown="false"
>                                            
>              notifyListenersOnReplication="true"/>
>
>             <Channel
>             className="org.apache.catalina.tribes.group.GroupChannel">
>             <Membership
>             className="org.apache.catalina.tribes.membership.McastService"
>                                                      address="224.0.0.4"
>                                                      port="45564"
>                                                  frequency="500"
>                                                  dropTime="3000"/>
>             <Receiver
>             className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>                                                address="auto"
>                                                port="4000"
>                                            selectorTimeout="100"
>                                                maxThreads="6"/>
>             <Sender
>             className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>             <Transport
>             className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
>             </Sender>
>             <Interceptor
>             className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
>             <Interceptor
>             className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
>             <Interceptor
>             className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
>             </Channel>
>             <Valve
>             className="org.apache.catalina.ha.tcp.ReplicationValve"
>
>             filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
>
>             <Deployer
>             className="org.apache.catalina.ha.deploy.FarmWarDeployer"
>                                               tempDir="/tmp/war-temp/"
>                                               deployDir="/tmp/war-deploy/"
>                                               watchDir="/tmp/war-listen/"
>                                               watchEnabled="false"/>
>             <ClusterListener
>             className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
>             <ClusterListener
>             className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>             </Cluster>
>             <Host name="xxxx.xxx.xxx.xxx" debug="0" appBase="webapps"
>             unpackWARs="true" autoDeploy="true">
>             <Context path="" docBase="Test"  debug="0" reloadable="false"
>             distributable="true"/>
>             </Host>
>
>             </Engine>
>
>
>
>
>
>         ---------------------------------------------------------------------
>         To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>         <mailto:users-unsubscribe@tomcat.apache.org>
>         For additional commands, e-mail: users-help@tomcat.apache.org
>         <mailto:users-help@tomcat.apache.org>
>
>
>
>
>     -- 
>     Tianjing
>
>     Bioinformatics Center,
>     Beijing Genomics Institute,Shenzhen
>     Tel:+86-755-25273851
>     MSN:tianjing217@hotmail.com <mailto:MSN%3Atianjing217@hotmail.com>
>
>
>
>
> -- 
> Tianjing
>
> Bioinformatics Center,
> Beijing Genomics Institute,Shenzhen
> Tel:+86-755-25273851
> MSN:tianjing217@hotmail.com <mailto:MSN%3Atianjing217@hotmail.com>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message