I will look into this for you
Filip
Gmail User wrote:
I am trying to configure a cluster with static members, but so far no
luck. Am I missing something or is it not meant to be tested with both
members on localhost?
Both instances create their own sessions and no session propagation is
recorded in the logs. The log also shows that there are no active
members in the cluster, so there is no session transfer.
Thanks for suggestions,
Ed
PS:
Sample config (all ports incremented by +10 for the 2nd instance, and
uniqueId is changed for the 2nd instance):
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener
className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Service name="Catalina">
<Connector port="8080" protocol="HTTP/1.1"
maxThreads="150" connectionTimeout="20000"
redirectPort="8443" />
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
<Engine name="Standalone" defaultHost="localhost"
jvmRoute="jvm1">
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="8">
<Manager
className="org.apache.catalina.ha.session.DeltaManager"
expireSessionsOnShutdown="false"
notifyListenersOnReplication="true"/>
<Channel
className="org.apache.catalina.tribes.group.GroupChannel">
<Receiver
className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="auto"
port="4000"
autoBind="100"
selectorTimeout="5000"
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.StaticMembershipInterceptor">
<Member
className="org.apache.catalina.tribes.membership.StaticMember"
port="5678"
securePort="-1"
host="localhost"
domain="staging-cluster"
uniqueId="{0,1,2,3,4,5,6,7,8,9}"/>
</Interceptor>
<Interceptor
className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
</Channel>
<Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*
\.html;.*\.css;.*\.txt;"/>
<Valve
className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
<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="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</Host>
</Engine>
</Service>
</Server>
Sample log:
Feb 23, 2007 10:32:58 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
setProperty
WARNING: Dynamic setProperty(className,value) has been disabled, please
use explicit properties for the element you are trying to identify
Feb 23, 2007 10:32:59 PM org.apache.catalina.core.AprLifecycleListener
init
INFO: The Apache Tomcat Native library which allows optimal performance
in production environments was not found on the
java.library.path:
/usr/java/jdk1.6.0/jre/lib/i386/client:/usr/java/jdk1.6.0/jre/lib/i386:/usr/java/jdk1.6.0/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Feb 23, 2007 10:32:59 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8090
Feb 23, 2007 10:32:59 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4302 ms
Feb 23, 2007 10:32:59 PM org.apache.catalina.realm.JAASRealm
setContainer
INFO: Set JAAS app name Standalone
Feb 23, 2007 10:32:59 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 23, 2007 10:32:59 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.9
Feb 23, 2007 10:32:59 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
start
INFO: Cluster is about to start
Feb 23, 2007 10:32:59 PM
org.apache.catalina.tribes.transport.ReceiverBase bind
INFO: Receiver Server Socket bound to:/127.0.0.1:4010
Feb 23, 2007 10:32:59 PM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Setting cluster mcast soTimeout to 500
Feb 23, 2007 10:32:59 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership,
start level:4
Feb 23, 2007 10:33:00 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:4
Feb 23, 2007 10:33:00 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership,
start level:8
Feb 23, 2007 10:33:01 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:8
Feb 23, 2007 10:33:02 PM org.apache.catalina.ha.deploy.FarmWarDeployer
start
SEVERE: Can't construct MBean object namejava.lang.NullPointerException
Feb 23, 2007 10:33:02 PM org.apache.catalina.ha.deploy.FarmWarDeployer
start
INFO: Cluster FarmWarDeployer started.
Feb 23, 2007 10:33:04 PM org.apache.catalina.ha.session.DeltaManager
start
INFO: Register manager /examples to cluster element Engine with name
Standalone
Feb 23, 2007 10:33:04 PM org.apache.catalina.ha.session.DeltaManager
start
INFO: Starting clustering manager at /examples
Feb 23, 2007 10:33:04 PM org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions
INFO: Manager [localhost#/examples]: skipping state transfer. No members
active in cluster group.
Feb 23, 2007 10:33:04 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Feb 23, 2007 10:33:04 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Feb 23, 2007 10:33:05 PM
org.apache.catalina.ha.session.JvmRouteBinderValve start
INFO: JvmRouteBinderValve started
Feb 23, 2007 10:33:05 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8090
Feb 23, 2007 10:33:05 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8019
Feb 23, 2007 10:33:05 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/26 config=null
Feb 23, 2007 10:33:05 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5820 ms
Feb 23, 2007 10:33:29 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener:
sessionCreated('895173205A0E86C96823F18BDBBFD443.jvm2')
Feb 23, 2007 10:33:44 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener:
sessionCreated('4B0BB611EC6F16F54FA81A22F51C6A3A.jvm2')
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]