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 3CE12DBC6 for ; Fri, 21 Sep 2012 04:59:17 +0000 (UTC) Received: (qmail 6945 invoked by uid 500); 21 Sep 2012 04:59:14 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 6382 invoked by uid 500); 21 Sep 2012 04:59:11 -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 5472 invoked by uid 99); 21 Sep 2012 04:59:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2012 04:59:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of nicolas.sarazin.pro@gmail.com designates 209.85.217.173 as permitted sender) Received: from [209.85.217.173] (HELO mail-lb0-f173.google.com) (209.85.217.173) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2012 04:59:02 +0000 Received: by lbbgm13 with SMTP id gm13so4052712lbb.18 for ; Thu, 20 Sep 2012 21:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ZB6R9NKCBcrN8/2PF2nxh/E3EgxWcrdu1jZODkl2JIU=; b=mt9X2SypPgIPgSw8DCIW1xpSk5mCjsdpo3XT3grSP1+cENrsfzDzNP+BNQd9NVKgZA 3AUUwq1tDucNkEzWiHb284NazmtCShdfEMdZbN4gwv+cjCxOmEZfCMM6MjZe5FqDxO9+ 1UIYrxrhMomKbJMncrvtQsXjnZpKIpRQwbUWBZaNc7Kv0eD3dd8hz346dUysSqrdvqDL aWe4Lu9QyrVbdmXt+YwtELfTqAvWGJMqpYeQ56rxa5vMTLWLLb3XUW1SNWdEaoAj5z7e m8xqWJfP1/jKwd3/pl1k4U8WanX9GIRsffkxsZHmOd/6iKCCNISDDnXT1Y8RNoSXWhVw y2Vw== MIME-Version: 1.0 Received: by 10.152.105.206 with SMTP id go14mr3221356lab.37.1348203521579; Thu, 20 Sep 2012 21:58:41 -0700 (PDT) Received: by 10.112.109.138 with HTTP; Thu, 20 Sep 2012 21:58:41 -0700 (PDT) In-Reply-To: References: Date: Fri, 21 Sep 2012 06:58:41 +0200 Message-ID: Subject: Re: Sticky sessions not working From: Nicolas Sarazin To: Tomcat Users List Content-Type: multipart/alternative; boundary=f46d04071173fd191304ca2f17ec --f46d04071173fd191304ca2f17ec Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello, Add : worker.node1.route=3Dnode1 And : worker.node2.route=3Dnode2 To use sticky session. These directives attach name route at the end of JSESSIONID. Best regards, Nicolas SARAZIN Le vendredi 21 septembre 2012, Lou Henry a =E9crit : > I'm running Apache Tomcat 7.0.14 and Apache 2.2.21 (mod_jk1.2.37). I > am trying to load balance two Tomcat Servers and sticky sessions are > not working. I am running > a two-factor authentication package and it looks like my LB > configuration is directing the user to one Tomcat for part of the > transaction and to the other Tomcat > server for the other part. When I bring down one of the Tomcat > servers, everything works fine; but with both Tomcat servers up, I get > 500 errors. So, I am trying > to stick the webserver session to one particular Tomcat server. > Listed below is my configuration. Also, I tried without the domain > directive also. I am not quite > sure if that's a random name or should it be something specific. > > Can someone please assist? Thank you... > > *workers.properties* > > worker.list=3Dloadbalancer,status > > > > # Define Node1 > > # modify the host as your host IP or DNS name. > > worker.node1.domain=3Djvm1 > > worker.node1.port=3Dxxxx > > worker.node1.host=3Dt*****20.xxxxx.xxxx > > worker.node1.type=3Dajp13 > > worker.node1.lbfactor=3D1 > > worker.node1.ping_mode=3DA > > > > # Define Node2 > > # modify the host as your host IP or DNS name. > > worker.node2.domain=3Djvm2 > > worker.node2.port=3Dxxxx > > worker.node2.host=3Dt*****21.xxxxx.xxxx > > worker.node2.type=3Dajp13 > > worker.node2.lbfactor=3D1 > > worker.node2.ping_mode=3DA > > > > # Load-balancing behaviour > > worker.loadbalancer.type=3Dlb > > worker.loadbalancer.balance_workers=3Dnode1,node2 > > worker.loadbalancer.sticky_session=3DTrue > > > > # Status worker for managing load balancer > > worker.status.type=3Dstatus > > > > # Added per Anakam direction 113010 > > worker.node1.socket_keepalive=3DTrue > > worker.node1.socket_timeout=3D300 > > > > # Added per Anakam direction 113010 > > worker.node2.socket_keepalive=3DTrue > > worker.node2.socket_keepalive=3D300 > > > *server.xml on Tomcat Node 1* > > > > *server.xml on Tomcat Node 2* > > > --f46d04071173fd191304ca2f17ec--