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 330A297BF for ; Mon, 8 Dec 2014 20:22:55 +0000 (UTC) Received: (qmail 13027 invoked by uid 500); 8 Dec 2014 20:22:51 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 12960 invoked by uid 500); 8 Dec 2014 20:22:51 -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 12949 invoked by uid 99); 8 Dec 2014 20:22:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Dec 2014 20:22:51 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ameer.mawia@gmail.com designates 209.85.215.42 as permitted sender) Received: from [209.85.215.42] (HELO mail-la0-f42.google.com) (209.85.215.42) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Dec 2014 20:22:26 +0000 Received: by mail-la0-f42.google.com with SMTP id gd6so4683640lab.1 for ; Mon, 08 Dec 2014 12:22:25 -0800 (PST) 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=va5r30TSE7mcZjomL287HTtqsqtkt142pgoEAtUunLk=; b=mm4KCQ0EjIb+VWbI+QRD63rpdSPbopxptwz76vK+U/x8g6rWPKJj1lS2m5O3FxjE1k 6uamQKKt+V9vzI4CJhYQNWjZBxFIkxnKgSXwgimpiGGK81uAZx7hGsMZgPB59kKiSjBZ yji03bISK3r6WmXjxc3yPjvIsqEwrC3wn1hLtyBFGYuGp75Vx9TePW7uX0f2cX9w1p+3 N3ONh3CtJ9I8z3WJKjV+fHfQG6fYexVLbKCS2QCk6WxB4wHJjT0pxoP7YrpjvrmmuPhN wRZXzKTck9M8hN1LgpMD5Mm/XDK4XqQ1aCOjaIP2UP3Jh1aSc4iyzrsRCwjURUO2iZ4r ztOA== MIME-Version: 1.0 X-Received: by 10.152.4.233 with SMTP id n9mr18382952lan.61.1418070145110; Mon, 08 Dec 2014 12:22:25 -0800 (PST) Received: by 10.25.161.132 with HTTP; Mon, 8 Dec 2014 12:22:25 -0800 (PST) In-Reply-To: <13a81574a06947472f1b7f7abc670f28@mley.fr> References: <13a81574a06947472f1b7f7abc670f28@mley.fr> Date: Tue, 9 Dec 2014 01:52:25 +0530 Message-ID: Subject: Re: Tomcat cluster with static membership From: Ameer Mawia To: Tomcat Users List Content-Type: multipart/alternative; boundary=089e013d11984418ee0509ba2fb4 X-Virus-Checked: Checked by ClamAV on apache.org --089e013d11984418ee0509ba2fb4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Theo, Since you are using static membership and NOT dynamic(multi-cast) which auto-detect members, my current understanding says that you will have to add entry of all the members of your cluster in each of nodes server.xml. Example: My cluster has two nodes. So to configure these I had add these two members entries in both node's server.xml(since running on the same machine, they have varying port with same ip): Regards, Ameer Mawia On Mon, Dec 8, 2014 at 8:26 PM, Th=C3=A9o Chamley wrote: > Hello, > > I am trying to setup a simple Tomcat cluster with static membership. I > can't use multicast because I am on a virtualization environment that doe= s > not allow it. > > Debian 7 > Tomcat 8.0.14 > Oracle JVM 1.8.0_25 > > Both Tomcat are ok on their own, but I can't seem to make the clustering > work: the sessions are not replicated from one to another. > Following the official documentation, I wrote this configuration : > > > > BackupManager" > expireSessionsOnShutdown=3D"false" > notifyListenersOnReplication=3D"true" > mapSendOptions=3D"6"/> > GroupChannel"> > catalina.tribes.transport.nio.NioReceiver" > address=3D"0.0.0.0" > port=3D"4110" > selectorTimeout=3D"100" > maxThreads=3D"6"/> > > interceptors.StaticMembershipInterceptor"> > catalina.tribes.membership.StaticMember" > port=3D"4110" > host=3D"my.server.1" > domain=3D"staging-cluster" > uniqueId=3D"{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0}= "/> > > > ReplicationTransmitter"> > catalina.tribes.transport.nio.PooledParallelSender"/> > > interceptors.TcpFailureDetector"/> > interceptors.MessageDispatch15Interceptor"/> > interceptors.ThroughputInterceptor"/> > > filter=3D".*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.css= |. > *\.txt"/> > ClusterSessionListener"/> > > [...] > > > Note: I changed the host and uniqId on the StaticMembershipInterceptor on > the other Tomcat. > > This is not a network problem as I can telnet into the 4110 port from one > server to another. > Also, by running a tcpdump, I can't see any trafic between the two server= s. > > The Tomcats seem to be doing something, because I have the following in m= y > catalina.out: > > ****** > 08-Dec-2014 15:38:15.309 INFO [main] org.apache.catalina.ha.tcp.SimpleTcp= Cluster.startInternal > Cluster is about to start > 08-Dec-2014 15:38:15.312 INFO [main] org.apache.catalina.tribes.transport= .ReceiverBase.bind > Receiver Server Socket bound to:/0.0.0.0:4110 > 08-Dec-2014 15:38:15.328 INFO [Thread-5] org.apache.catalina.ha.tcp.Simpl= eTcpCluster.memberAdded > Replication member added:org.apache.catalina.tribes.membership. > StaticMember[t > cp://my.server.1:4110,my.server.1,4110, alive=3D0, securePort=3D-1, UDP > Port=3D-1, id=3D{1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 }, payload=3D{}, > command=3D{}, domain=3D{115 116 97 > 103 105 110 103 45 99 ...(15)}, ] > 08-Dec-2014 15:38:15.330 INFO [main] org.apache.catalina.tribes. > membership.McastServiceImpl.setupSocket Setting cluster mcast soTimeout > to 500 > 08-Dec-2014 15:38:15.332 INFO [main] org.apache.catalina.tribes. > membership.McastServiceImpl.waitForMembers Sleeping for 1000 milliseconds > to establish cluster membership, sta > rt level:4 > 08-Dec-2014 15:38:16.155 INFO [Membership-MemberAdded.] > org.apache.catalina.ha.tcp.SimpleTcpCluster.memberAdded Replication > member added:org.apache.catalina.tribes.membership > .MemberImpl[tcp://{0, 0, 0, 0}:4110,{0, 0, 0, 0},4110, alive=3D1277686, > securePort=3D-1, UDP Port=3D-1, id=3D{-22 -45 110 -29 21 -22 75 95 -103 8= 6 95 > -119 15 48 -17 -27 }, payload=3D{} > , command=3D{}, domain=3D{}, ] > 08-Dec-2014 15:38:16.259 INFO [Tribes-Task-Receiver-1] > org.apache.catalina.tribes.io.BufferPool.getBufferPool Created a buffer > pool with max size:104857600 bytes of type: org.apache.catalina.tribes.io= . > BufferPool15Impl > 08-Dec-2014 15:38:16.332 INFO [main] org.apache.catalina.tribes. > membership.McastServiceImpl.waitForMembers Done sleeping, membership > established, start level:4 > 08-Dec-2014 15:38:16.335 INFO [main] org.apache.catalina.tribes. > membership.McastServiceImpl.waitForMembers Sleeping for 1000 milliseconds > to establish cluster membership, start level:8 > 08-Dec-2014 15:38:17.335 INFO [main] org.apache.catalina.tribes. > membership.McastServiceImpl.waitForMembers Done sleeping, membership > established, start level:8 > ****** > > Could someone, please, help me finding what I am doing wrong? > > Thanks, > > Th=C3=A9o C. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --089e013d11984418ee0509ba2fb4--