Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 80A7497A3 for ; Wed, 5 Oct 2011 18:22:28 +0000 (UTC) Received: (qmail 53032 invoked by uid 500); 5 Oct 2011 18:22:25 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 52957 invoked by uid 500); 5 Oct 2011 18:22:25 -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 52948 invoked by uid 99); 5 Oct 2011 18:22:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2011 18:22:24 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.138.91.58] (HELO nm17-vm0.bullet.mail.ne1.yahoo.com) (98.138.91.58) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 05 Oct 2011 18:22:13 +0000 Received: from [98.138.90.53] by nm17.bullet.mail.ne1.yahoo.com with NNFMP; 05 Oct 2011 18:21:52 -0000 Received: from [98.138.89.163] by tm6.bullet.mail.ne1.yahoo.com with NNFMP; 05 Oct 2011 18:21:52 -0000 Received: from [127.0.0.1] by omp1019.mail.ne1.yahoo.com with NNFMP; 05 Oct 2011 18:21:52 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 56869.53701.bm@omp1019.mail.ne1.yahoo.com Received: (qmail 9767 invoked by uid 60001); 5 Oct 2011 18:21:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1317838911; bh=hf2Jwl0w4c9uhq2mDXSC7GC6+l9CmnHiWLtQ+CsDYxc=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=NCplH+hpENg780tfAszfixFpxGeg2WsYUGNoHuNw7sDY8QK95j/ZC8uxmI2YUk0hN9kr0bA5omyt97/BPZ2kVSOWIWWJbj0QqOeuzNY3myW8POCINuAeIU91t4VfjzvJYFQUf6u1BSF0rg3ujvxRtrGSU3m62E/0cIzA9rYb5A0= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=whETEqqOBQfwSKRgmjuB7s2gXCVi6FhbUHIqDJ++kjXsNynOJm9qZU7Bnx0YbrlA91xISLsEPU8FML0LZoWbNBLj982SIWIUMxuT/IgKGOWxczrwBsTXLTIF9ZcwxSZSdpQV9xFpNJZwmYxrc6fW0FjDoJIqROtNFEoByY6wQaU=; X-YMail-OSG: sYtCVPkVM1kcTuz.VsePbGMxDCxLsnLeEU7VS7G5GPxakcY segM7VFzp Received: from [98.138.197.88] by web125519.mail.ne1.yahoo.com via HTTP; Wed, 05 Oct 2011 11:21:51 PDT X-Mailer: YahooMailWebService/0.8.114.317681 References: Message-ID: <1317838911.7887.YahooMailNeo@web125519.mail.ne1.yahoo.com> Date: Wed, 5 Oct 2011 11:21:51 -0700 (PDT) From: Mark Eggers Reply-To: Mark Eggers Subject: Re: problem with session replication in tomcat 5.5.23 To: Tomcat Users List In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org ----- Original Message -----=0A=0A> From: Gabriele Faelli =0A> To: users@tomcat.apache.org=0A> Cc: =0A> Sent: Wednesday, Oc= tober 5, 2011 1:17 AM=0A> Subject: Re: problem with session replication in = tomcat 5.5.23=0A> =0A> Really any idea?=0A> Il giorno 04/ott/2011 19:13, "G= abriele Faelli" =0A> =0A> ha scritto:=0A>> Hi a= ll,=0A>> I'm running tomcat 5.5.23 on two RHEL 5.6.=0A>> I'm having big t= rouble making the session replication working across =0A> these=0A>> two n= odes.=0A>> I configured a cluster and it looks like working: each node dis= covers the=0A>> other one, I can see in the logs every received and transm= itted ping.=0A>> Well, when I create a session in the logs there are no me= ntion of sessions=0A>> being replicated and/or errors encounter while tryi= ng.=0A>> The applications running on tomcat have the entr= y in=0A> their=0A>> web.xml and this is the cluster config part of the ser= ver.xml:=0A>> =0A>> className=3D"org.apache.catalina.cluster= .tcp.SimpleTcpCluster"=0A>> defaultMode=3D"true"=0A>> =0A>> =0A> managerCl= assName=3D"org.apache.catalina.cluster.session.DeltaManager"=0A>> manager.= expireSessionsOnShutdown=3D"false"=0A>> manager.useDirtyFlag=3D"false"=0A>= > manager.notifyListenersOnReplication=3D"true"=0A>> manager.notifySessio= nListenersOnReplication=3D"true"=0A>> manager.sendAllSessions=3D"true">=0A= >> > className=3D"org.apache.catalina.cluster.mcast.McastS= ervice"=0A>> mcastAddr=3D"228.0.0.4"=0A>> mcastPort=3D"45564"=0A>> mcast= Frequency=3D"500"=0A>> mcastDropTime=3D"3000"/>=0A>> > clas= sName=3D"org.apache.catalina.cluster.tcp.ReplicationListener"=0A>> tcpList= enAddress=3D"192.168.199.101"=0A>> tcpListenPort=3D"4001"=0A>> tcpSelecto= rTimeout=3D"100"=0A>> tcpThreadCount=3D"6"/>=0A>> > =0A> class= Name=3D"org.apache.catalina.cluster.tcp.ReplicationTransmitter"=0A>> repli= cationMode=3D"synchronous"=0A>> ackTimeout=3D"15000"=0A>> waitForAck=3D"t= rue"=0A>> autoConnect=3D"true"/>=0A>> > className=3D"org.apach= e.catalina.cluster.tcp.ReplicationValve"=0A>> =0A>> =0A> filter=3D".*\.gif;= .*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>=0A>> > className=3D"org.apache.catalina.cluster.deploy.FarmWarDeployer"=0A>= > tempDir=3D"/tmp/war-temp/"=0A>> deployDir=3D"/tmp/war-deploy/"=0A>> wa= tchDir=3D"/tmp/war-listen/"=0A>> watchEnabled=3D"false"/>=0A>> =0A>> > =0A> className=3D"org.apache.catalina.cluster.session.Clu= sterSessionListener"/>=0A>> =0A>> =0A>> Any Idea? Where I'm wro= ng? I did something stupid for sure :)=0A>> I tried every configuration, s= uggest... well everything I found on the=0A>> official an unofficial docum= entation... I'm quite frustated :P=0A>> Thanks in advance=0A>> G.=0A>=0A= =0AI'm by no means a clustering expert, and I've only run a 5.5.x (5.5.33) = cluster on my local machine (Fedora 15). I was going to work on improving t= he documentation (and my understanding), but since EOL for the 5.5.x series= is less than one year out that's fallen lower on my things to do list.=0A= =0AA few things to check:=0A=0A1. Make sure all your session objects implem= ent java.io.Serializable=0A=0A2. You have as the first lin= e after in your web.xml file=0A=0A3. Apparently (from the Tomcat d= ocumentation) when you override any of the defaults you=A0=0A=A0 =A0have to= specify everything.=0A=0AThis has tripped me up in the past. I noticed for= example that your configuration appears to be missing a ClusterListener. T= ry adding the following line to your cluster configuration after your other= ClusterListener.=0A=0A=0A=0A4. Make sur= e that each Tomcat has a unique jvmRoute attribute on the Engine element=0A= =0A5. Make sure your firewall is not blocking new connections on your tcpLi= stenPort=0A=0A=0A6. Make sure that you're set up for multicasting on the pr= oper interface (which it=0A=A0 =A0sounds=A0like you do)=0A=0ASo ifconfig should show in part:=A0UP BROADCAST RUNNING MULTICAST=0ASo i= p route list should show something like:=A0multicast 224.0.0.0/4 dev eth0 s= cope link=0A=0A7. Run something like Wireshark or tcpdump and watch for tra= ffic on the tcpListenPort=0A=0A=0AItems 3 and 4 are for load balancing with= AJP (think mod_ajp and Apache HTTPD), so I don't know if it's necessary.= =0A=0AI'm not sure how the FarmDeployer works. I have mine set up so it fun= ctions, but there doesn't seem to be any documentation. The javadoc doesn't= seem to be internally consistent (I know, patches welcome). I've set my Fa= rmDeployer up as follows:=0A=0AAdmin (or source) node:=0A=0A=A0 =0A=0AAll other (client) nodes:=0A=0A=A0 =0A=0AThis seems to work (auto-deploy, etc.), except that wh= en I restart the cluster all of the applications in watchDir are deleted fr= om deployDir and then redeployed.=0A=0AFinally, you can get some more loggi= ng information by modifying $CATALINA_HOME/logging.properties. This might h= elp in figuring out what's going on.=0A=0AHope this helps.=0A=0A. . . . jus= t my two cents.=0A/mde/ --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org