Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 92942 invoked from network); 15 Feb 2006 15:12:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Feb 2006 15:12:37 -0000 Received: (qmail 87840 invoked by uid 500); 15 Feb 2006 15:12:20 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 87810 invoked by uid 500); 15 Feb 2006 15:12:20 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 87798 invoked by uid 99); 15 Feb 2006 15:12:20 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2006 07:12:20 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of d.avenante@gmail.com designates 64.233.182.199 as permitted sender) Received: from [64.233.182.199] (HELO nproxy.gmail.com) (64.233.182.199) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2006 07:12:18 -0800 Received: by nproxy.gmail.com with SMTP id a25so616130nfc for ; Wed, 15 Feb 2006 07:11:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Qq79Xn01odN0ehC2xwZ8TjAAI5xandWhQmFpu270kU6nbUhv95lZ7BWltU5Zx8OfquXTSD4eH0xZLjYKIajxjyRxctGoG1kME65jDlcQBB3zzu1DBE4UiI5kOn3wLg6/jBgtYP35coU+SrhBYzBk3FMPCyKu5G+4a8Xr4RohC40= Received: by 10.49.58.19 with SMTP id l19mr51326nfk; Wed, 15 Feb 2006 07:11:56 -0800 (PST) Received: by 10.48.210.12 with HTTP; Wed, 15 Feb 2006 07:11:56 -0800 (PST) Message-ID: Date: Wed, 15 Feb 2006 10:11:56 -0500 From: David Avenante To: Tomcat Users List Subject: Re: Tomcat 5.5.15 Clustering ? In-Reply-To: <43F33685.2090501@hanik.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3238_28413993.1140016316677" References: <79F89A5F-05F6-4923-8768-1A1EF134A1B6@objektpark.de> <43F33685.2090501@hanik.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_3238_28413993.1140016316677 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thank you very much for the toolkit ;) My feeling was also on my multicast support. But i' ve read more documentation for my Linux and i think that my servers support MULTICAST like explaned on my first message (compile kernel support and add route + test with tcpdump) So this toolkit seems confirme the fact that my servers support multicast. When i test on agnes with target ovea-inspiron i've: java -cp tomcat-replication.jar MCaster 224.0.0.1 45564 ovea-inspiron Usage MCaster [address port message] BEGIN TO RECEIVE SENT:ovea-inspiron1 RECEIVED:ovea-inspiron1 FROM /192.168.2.102:45564 SENT:ovea-inspiron2 BEGIN TO RECEIVE RECEIVED:(gtcp://192.168.2.103:400cluster1 FROM /192.168.2.103:45564 SENT:ovea-inspiron3 BEGIN TO RECEIVE RECEIVED:(ftcp://192.168.2.102:400catalina FROM /192.168.2.102:45564 SENT:ovea-inspiron4 BEGIN TO RECEIVE RECEIVED:(gtcp://192.168.2.103:400cluster1 FROM /192.168.2.103:45564 And when i test on ovea-inspiron with target agnes i've: java -cp tomcat-replication.jar MCaster 224.0.0.1 45566 agnes Usage MCaster [address port message] BEGIN TO RECEIVE SENT:agnes1 RECEIVED:agnes1 FROM /192.168.2.103:45566 SENT:agnes2 BEGIN TO RECEIVE RECEIVED:agnes2 FROM /192.168.2.103:45566 SENT:agnes3 BEGIN TO RECEIVE RECEIVED:agnes3 FROM /192.168.2.103:45566 SENT:agnes4 BEGIN TO RECEIVE RECEIVED:agnes4 FROM /192.168.2.103:45566 SENT:agnes5 BEGIN TO RECEIVE RECEIVED:agnes5 FROM /192.168.2.103:45566 SENT:agnes6 BEGIN TO RECEIVE RECEIVED:agnes6 FROM /192.168.2.103:45566 SENT:agnes7 BEGIN TO RECEIVE RECEIVED:agnes7 FROM /192.168.2.103:45566 So it's not a multicast probleme but most a configuration probleme. ovea-inspiron sent is ok but the received is empty ? Some suggestion(s) ? Thank's for the progress On 2/15/06, Filip Hanik - Dev Lists wrote: > > >1) Clustering need sticky_session=3Dtrue and is only design for > failover (see servlet spec). > > Not true for Tomcat, using replicationMode=3D"pooled" and > waitForAck=3D"true", you can do round robin non sticky load balancing as > long as you don't have more than one thread accessing the session at any > point in time. > > >INFO: Manager [/cluster-1.0-SNAPSHOT]: skipping state transfer. No > members active in cluster group. > > yes, your multicast isn't working, or it should have said that you had a > member. > Take a look at the bottom of the page and run the MCaster test included > in a super old version of Tomcat 4 clustering. > http://people.apache.org/~fhanik/ > > On multihomed hosts, it can get a little tricky to get multicasting > working and you might have to setup some routes to help. Check with your > sysadmin. > > Filip > > > > Peter Rossbach wrote: > > Hey, > > > > 1) Clustering need sticky_session=3Dtrue and is only design for > > failover (see servlet spec). > > 2) Are your sure that MULTICAST is enabled at eth0? > > > > regards > > Peter > > pr@objektpark.de > > > > > > > > Am 15.02.2006 um 02:26 schrieb David Avenante: > > > >> Hi, > >> > >> I' ve try to use Tomcat 5.5.15 in cluster mod. And after some work on > >> configuration and test > >> i seems to be on limit of my all possibilities ;) > >> > >> I try to use two tomcat in cluster with apache web server and mod_jk a= s > >> connector. > >> > >> my Apache configuration look like : > >> > >> > >> # workers.properties > >> > >> ps=3D/ > >> > >> # List the workers name > >> worker.list=3Dloadbalancer > >> > >> # ---------------- > >> # First worker > >> # ---------------- > >> worker.node01.port=3D8009 > >> worker.node01.host=3Dagnes > >> worker.node01.type=3Dajp13 > >> worker.node01.lbfactor=3D1 > >> #worker.node01.domain=3Dcluster1 > >> # ---------------- > >> # Second worker > >> # ---------------- > >> worker.node02.port=3D9009 > >> worker.node02.host=3Dovea-inspiron > >> worker.node02.type=3Dajp13 > >> worker.node02.lbfactor=3D1 > >> #worker.node02.domain=3Dcluster1 > >> # ---------------------- > >> # Load Balancer worker > >> # ---------------------- > >> worker.loadbalancer.type=3Dlb > >> worker.loadbalancer.sticky_session=3Dfalse > >> worker.loadbalancer.balanced_workers=3Dnode01,node02 > >> > >> As you can see i use two server ('agnes' IP : 192.168.2.102 and > >> 'ovea-inspiron' IP : 192.168.2.103) > >> I' ve coded a little aplication who read un file and create a > >> sessions if > >> session not exist. > >> > >> If i use the system in mod load balancing (with no cluster mod > activate) > >> all is great (my config is of course > >> worker.loadbalancer.sticky_session=3Dtrue > >> ) > >> > >> So system run with session affinitu but the two server are accessible > ;) > >> > >> Now i try to configure as cluster mode with session replication > >> (my config is now worker.loadbalancer.sticky_session=3D3Dfalse) > >> > >> I configure my to server.xml like that : > >> agnes (IP : 192.168.2.102) > >> > >> > >> > >> >> type=3D"org.apache.catalina.UserDatabase" > >> description=3D"User database that can be updated an= d > >> saved" > >> factory=3D" > >> org.apache.catalina.users.MemoryUserDatabaseFactory" > >> pathname=3D"conf/tomcat-users.xml" /> > >> > >> > >> > >> > >> >> maxThreads=3D"150" minSpareThreads=3D"25" > >> maxSpareThreads=3D"75" > >> enableLookups=3D"false" redirectPort=3D"8443" > >> acceptCount=3D"100" > >> connectionTimeout=3D"20000" > >> disableUploadTimeout=3D"true" > >> /> > >> > >> >> redirectPort=3D"8443" protocol=3D"AJP/1.3" /> > >> > >> > >> > >> >> resourceName=3D"UserDatabase" /> > >> > >> >> unpackWARs=3D"true" autoDeploy=3D"true" > >> xmlValidation=3D"false" xmlNamespaceAware=3D"false"> > >> >> className=3D"org.apache.catalina.cluster.tcp.SimpleTcpCluster" > >> doClusterLog=3D"true" > >> clusterLogName=3D"clusterlog" > >> manager.className=3D" > >> org.apache.catalina.cluster.session.DeltaManager" > >> manager.expireSessionsOnShutdown=3D"false" > >> manager.notifyListenersOnReplication=3D"true" > >> manager.notifySessionListenersOnReplication=3D"true" > >> manager.sendAllSessions=3D"true" > >> manager.sendAllSessionsSize=3D"500" > >> manager.sendAllSessionsWaitTime=3D"20"> > >> > >> >> org.apache.catalina.cluster.mcast.McastService" > >> mcastBindAddress=3D"192.168.2.102" > >> mcastAddr=3D"224.0.0.1" > >> mcastPort=3D"45564" > >> mcastFrequency=3D"1000" > >> mcastDropTime=3D"30000"/> > >> > >> >> org.apache.catalina.cluster.tcp.ReplicationListener" > >> tcpListenAddress=3D"192.168.2.102" > >> tcpListenPort=3D"4000" > >> tcpSelectorTimeout=3D"100" > >> tcpThreadCount=3D"6" /> > >> > >> >> org.apache.catalina.cluster.tcp.ReplicationTransmitter" > >> replicationMode=3D"fastasyncqueue" > >> doTransmitterProcessingStats=3D"true" > >> doProcessingStats=3D"true" > >> doWaitAckStats=3D"true" > >> queueTimeWait=3D"true" > >> queueDoStats=3D"true" > >> queueCheckLock=3D"true" > >> ackTimeout=3D"15000" > >> waitForAck=3D"true" > >> keepAliveTimeout=3D"80000" > >> keepAliveMaxRequestCount=3D"-1" /> > >> > >> > >> > >> > >> > >> > >> > >> ovea-inspiron (IP : 192.168.2.103) > >> > >> > >> > >> >> type=3D"org.apache.catalina.UserDatabase" > >> description=3D"User database that can be updated = and > >> saved" > >> factory=3D" > >> org.apache.catalina.users.MemoryUserDatabaseFactory" > >> pathname=3D"conf/tomcat-users.xml" /> > >> > >> > >> > >> > >> >> maxThreads=3D"150" minSpareThreads=3D"25" > >> maxSpareThreads=3D"75" > >> enableLookups=3D"false" redirectPort=3D"8443" > >> acceptCount=3D"100" > >> connectionTimeout=3D"20000" > >> disableUploadTimeout=3D"true" > >> /> > >> > >> >> redirectPort=3D"8443" protocol=3D"AJP/1.3" /> > >> > >> > >> >> resourceName=3D"UserDatabase"/> > >> > >> >> unpackWARs=3D"true" autoDeploy=3D"true" > >> xmlValidation=3D"false" xmlNamespaceAware=3D"false"> > >> > >> >> className=3D"org.apache.catalina.cluster.tcp.SimpleTcpCluster" > >> doClusterLog=3D"true" > >> clusterLogName=3D"clusterlog" > >> manager.className=3D" > >> org.apache.catalina.cluster.session.DeltaManager" > >> manager.expireSessionsOnShutdown=3D"false" > >> manager.notifyListenersOnReplication=3D"true" > >> manager.notifySessionListenersOnReplication=3D"true" > >> manager.sendAllSessions=3D"true" > >> manager.sendAllSessionsSize=3D"500" > >> manager.sendAllSessionsWaitTime=3D"20"> > >> > >> >> org.apache.catalina.cluster.mcast.McastService" > >> mcastBindAddress=3D"192.168.2.103" > >> mcastAddr=3D"224.0.0.1" > >> mcastPort=3D"45564" > >> mcastFrequency=3D"1000" > >> mcastDropTime=3D"30000"/> > >> > >> >> org.apache.catalina.cluster.tcp.ReplicationListener" > >> tcpListenAddress=3D"192.168.2.103" > >> tcpListenPort=3D"4000" > >> tcpSelectorTimeout=3D"100" > >> tcpThreadCount=3D"6" /> > >> > >> >> org.apache.catalina.cluster.tcp.ReplicationTransmitter" > >> replicationMode=3D"fastasyncqueue" > >> doTransmitterProcessingStats=3D"true" > >> doProcessingStats=3D"true" > >> doWaitAckStats=3D"true" > >> queueTimeWait=3D"true" > >> queueDoStats=3D"true" > >> queueCheckLock=3D"true" > >> ackTimeout=3D"15000" > >> waitForAck=3D"true" > >> keepAliveTimeout=3D"80000" > >> keepAliveMaxRequestCount=3D"-1" /> > >> > >> > >> > >> > >> > >> > >> > >> I'm user linux so i've compiled my kernel with multicat kernel option > >> I add the rout like rooute add -host 224.0.0.1 dev eth0 > >> > >> N.B : why 224.0.0.1 =3D> > >> http://www.iana.org/assignments/multicast-addresses > >> > >> So route is : > >> ALL-SYSTEMS.MCA * 255.255.255.255 UH 0 0 0 eth0 > >> 192.168.2.0 * 255.255.255.0 U 0 > >> 0 0 > >> eth0 > >> loopback * 255.0.0.0 U 0 0 > >> 0 lo > >> default . 0.0.0.0 UG 0 = 0 > >> 0 eth0 > >> > >> now i start the two tomcat with the same application in webapp > >> directories > >> with tcpdump i verify the multicasting btewen my server .. so : > >> > >> 19:39:17.809978 IP 192.168.2.102.45564 > > >> all-systems.mcast.net.45564:UDP, > >> length 56 > >> 19:39:18.546034 IP ovea-inspiron.45564 > > >> all-systems.mcast.net.45564:UDP, > >> length 56 > >> 19:39:18.814418 IP 192.168.2.102.45564 > all-systems.mcast.net.45564UD= P > , > >> length 56 > >> 19:39:19.790470 IP ovea-inspiron.45564 > > >> all-systems.mcast.net.45564:UDP, > >> length 56 > >> 19:39:19.818691 IP 192.168.2.102.45564 > > >> all-systems.mcast.net.45564:UDP, > >> length 56 > >> 19:39:20.826650 IP 192.168.2.102.45564 > > >> all-systems.mcast.net.45564:UDP, > >> length 56 > >> 19:39:20.943933 IP ovea-inspiron.45564 > > >> all-systems.mcast.net.45564:UDP, > >> length 56 > >> 19:39:21.806813 arp who-has . tell 192.168.2.102 > >> 19:39:21.806972 arp reply . is-at 00:04:e2:b6:65:0a (oui Unknown) > >> 19:39:21.831048 IP 192.168.2.102.45564 > > >> all-systems.mcast.net.45564:UDP, > >> length 56 > >> 19:39:22.164812 IP ovea-inspiron.45564 > > >> all-systems.mcast.net.45564:UDP, > >> length 56 > >> 19:39:22.835240 IP 192.168.2.102.45564 > > >> all-systems.mcast.net.45564:UDP, > >> length 56 > >> > >> So all semms to be OK but i've > >> > >> Feb 14, 2006 6:33:26 PM > >> org.apache.catalina.cluster.tcp.SimpleTcpCluster st > >> art > >> INFO: Cluster is about to start > >> Feb 14, 2006 6:33:26 PM > >> > org.apache.catalina.cluster.tcp.SimpleTcpClustercreateDefaultClusterValve= s > >> > >> INFO: Add Default ClusterValves at cluster localhost > >> Feb 14, 2006 6:33:26 PM > >> > org.apache.catalina.cluster.tcp.SimpleTcpClustercreateDefaultClusterListe= ner > >> > >> INFO: Add Default ClusterListener at cluster localhost > >> Feb 14, 2006 6:33:26 PM > >> org.apache.catalina.cluster.tcp.ReplicationTransmitter start > >> INFO: Start ClusterSender at cluster > >> Catalina:type=3D3DCluster,host=3D3Dlocalhost > >> with name Catalina:type=3D3DClusterSender,host=3D3Dlocalhost > >> Feb 14, 2006 6:33:26 PM > >> org.apache.catalina.cluster.mcast.McastServiceImplsetupSocket > >> INFO: Setting multihome multicast interface to:/192.168.2.102 > >> Feb 14, 2006 6:33:26 PM > >> org.apache.catalina.cluster.mcast.McastService start > >> INFO: Sleeping for 4000 secs to establish cluster membership > >> Feb 14, 2006 6:33:30 PM > >> org.apache.catalina.cluster.mcast.McastServiceregisterMBean > >> INFO: membership mbean registered > >> (Catalina:type=3D3DClusterMembership,host=3D3Dlocalhost) > >> Feb 14, 2006 6:33:31 PM org.apache.catalina.startup.HostConfigdeployWA= R > >> INFO: Deploying web application archive cluster-1.0-SNAPSHOT.war > >> Feb 14, 2006 6:33:31 PM > >> org.apache.catalina.cluster.session.DeltaManager st > >> art > >> INFO: Register manager /cluster-1.0-SNAPSHOT to cluster element Host > >> with > >> name localhost > >> Feb 14, 2006 6:33:31 PM > >> org.apache.catalina.cluster.session.DeltaManager st > >> art > >> INFO: Starting clustering manager at /cluster-1.0-SNAPSHOT > >> Feb 14, 2006 6:33:31 PM > >> org.apache.catalina.cluster.session.DeltaManagergetAllClusterSessions > >> INFO: Manager [/cluster-1.0-SNAPSHOT]: skipping state transfer. No > >> members > >> active in cluster group. > >> > >> As you can see in the last line cluster member are not found !!!! > >> > >> What's the hell ;) > >> > >> When i test my application i've always the sequences : > >> > >> This page is rendered on server : *Cluster Node - 01 (One) New > >> session is > >> created with saved value ....UserId : 123456 > >> This page is rendered on server : *Cluster Node - 02 (Two) New > >> session is > >> created with saved value ....UserId : 123456 > >> This page is rendered on server : *Cluster Node - 01 (One) New > >> session is > >> created with saved value ....UserId : 123456 > >> > >> So the request is well balanced but a new session is alway created > !!!!! > >> > >> Some ideas ... > >> > >> Thank you guys > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > > For additional commands, e-mail: users-help@tomcat.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > ------=_Part_3238_28413993.1140016316677--