Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 24752 invoked from network); 6 Apr 2009 07:55:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Apr 2009 07:55:22 -0000 Received: (qmail 71059 invoked by uid 500); 6 Apr 2009 07:55:19 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 70986 invoked by uid 500); 6 Apr 2009 07:55:18 -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 70975 invoked by uid 99); 6 Apr 2009 07:55:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2009 07:55:18 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=FS_REPLICA,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [72.22.94.67] (HELO virtual.halosg.com) (72.22.94.67) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2009 07:55:08 +0000 Received: (qmail 9248 invoked from network); 6 Apr 2009 02:54:48 -0500 Received: from unknown (HELO ?172.16.8.45?) (218.185.66.190) by halosg.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 6 Apr 2009 02:54:46 -0500 Message-ID: <49D9B4E5.6050307@hanik.com> Date: Mon, 06 Apr 2009 01:53:09 -0600 From: Filip Hanik - Dev Lists User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Session Replication in Cluster References: <49D4D2CB.3060103@mdibl.org> In-Reply-To: <49D4D2CB.3060103@mdibl.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org what you're seeing is correct. the server did fail over, and by changing the session id, it ensures that it does not do "fail back" Filip Roy McMorran wrote: > Hello all, > > > I've built a very simple 2-member Tomcat cluster for testing, but I am > unable to get the session replication quite right. The problem is > when I fail one member of the cluster. The behavior I was expecting > is that the other cluster member would take over the session ids for > the failed member. However it is appending it's own jvmRoute value to > the session id, and thus setting a new cookie. > > > Details: > I have 2 cluster members, "itchy" and "scratchy", running on the same > physical server, and CATALINA_BASE is /var/tomcat/itchy and > /var/tomcat/scratchy respectively. Tomcat 6.0.18 binaries, etc. are > at /usr/local/tomcat. Using mod_jk 1.2.27 on Apache 2.2.11 (Apache is > also on the same server). I am using sticky sessions. > > > Here are the access logs for the 2 members from a short "failover" > experiment (note I'm including the session ID in the 2nd field). The > session starts on scratchy. From scratchy_access_log.2009-04-02.txt: > > 192.168.200.177 E5BF3FFA9AEE1E3AB0DD4A96BA5E4011.scratchy - > [02/Apr/2009:10:19:55 -0400] "GET / HTTP/1.1" 200 14612 > 192.168.200.177 E5BF3FFA9AEE1E3AB0DD4A96BA5E4011.scratchy - > [02/Apr/2009:10:20:14 -0400] "GET /about/ HTTP/1.1" 200 19507 > > > At 10:21:39 AM I do a kill -9 on the scratchy instance. Now the > traffic goes to the other cluster member as expected. From > itchy_access_log.2009-04-02.txt: > > 192.168.200.177 E5BF3FFA9AEE1E3AB0DD4A96BA5E4011.itchy - > [02/Apr/2009:10:22:11 -0400] "GET /about/publications/ HTTP/1.1" 200 > 18263 > 192.168.200.177 E5BF3FFA9AEE1E3AB0DD4A96BA5E4011.itchy - > [02/Apr/2009:10:22:32 -0400] "GET /about/changes/ HTTP/1.1" 200 12736 > > > Note however that the new member's jvmRoute value is now appended to > the session id. I thought is was supposed to stay exactly the same > after failover. > > > Additional details can be found as follows: > > server.xml for "itchy" - see: > http://gillnet.mdibl.org/~mcmorran/itchy-server.xml.txt > > server.xml for "scratchy" - see: > http://gillnet.mdibl.org/~mcmorran/scratchy-server.xml.txt > > context.xml (identical) - see: > https://gillnet.mdibl.org/~mcmorran/context.xml.txt > > workers.properties: > https://gillnet.mdibl.org/~mcmorran/workers.properties > > I've also included the catalina.out file for both, from startup and > through the test at: > https://gillnet.mdibl.org/~mcmorran/itchy-catalina.out > https://gillnet.mdibl.org/~mcmorran/scratchy-catalina.out > > > I'd appreciate any advice on where I went wrong. Thanks and best wishes, > Roy > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org