Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 9635 invoked from network); 15 Nov 2007 17:19:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Nov 2007 17:19:41 -0000 Received: (qmail 7008 invoked by uid 500); 15 Nov 2007 17:19:15 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 6986 invoked by uid 500); 15 Nov 2007 17:19:15 -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 6975 invoked by uid 99); 15 Nov 2007 17:19:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Nov 2007 09:19:15 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ndiulgerov@imx.fr designates 213.222.54.136 as permitted sender) Received: from [213.222.54.136] (HELO mail2.imx.fr) (213.222.54.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Nov 2007 17:19:03 +0000 Received: from [127.0.0.1] ([192.9.202.231]) by mail2.imx.fr with Microsoft SMTPSVC(6.0.3790.3959); Thu, 15 Nov 2007 19:18:55 +0200 Message-ID: <473C7F7F.4010201@imx.fr> Date: Thu, 15 Nov 2007 19:18:55 +0200 From: Niki Diulgerov User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: clustering mode in apache tomcat 5.5.25 References: <241CA6EFCF458048AFCD6DCABC7FA6E6047F6235@edgemail1.edgewater.com> In-Reply-To: <241CA6EFCF458048AFCD6DCABC7FA6E6047F6235@edgemail1.edgewater.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 15 Nov 2007 17:18:55.0432 (UTC) FILETIME=[99DC9480:01C827AB] X-Virus-Checked: Checked by ClamAV on apache.org Thank you very much for the help. Indeed I figured out that have to be in web.xml I was not changing multicast address... it is 228.0.0.4 But I changed multicast bind address on the first machine which have IP address 192.9.202.166 I set mcastBindAddress="192.9.202.166" and on the second with IP 192.9.202.21 I set mcastBindAddress="192.9.202.21" So the idea was the broadcast address to bind to the appropriate interface (one of the machines have more than one ) Both machines and their interfaces are set with multicasting eth0 Link encap:Ethernet HWaddr 00:03:25:2B:05:8C inet addr:192.9.202.21 Bcast:192.9.202.255 Mask:255.255.255.0 inet6 addr: fe80::203:25ff:fe2b:58c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:66929626 errors:0 dropped:48 overruns:0 frame:0 TX packets:70048545 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1201688058 (1.1 GiB) TX bytes:3733631693 (3.4 GiB) Base address:0x5000 Memory:dd480000-dd4a0000 I dont know why to add route to 239.255.0.1 as it doesnt belong to any of my networks Please help Best regards, Nikolay Diulgerov Network Administrator E-mail: ndiulgerov@imx.fr Telephone : +33 4 89 87 77 77 Fax : +33 4 89 87 77 00 Web: http://www.codix-france.com Clifford Bryant wrote: > You should be able to just uncomment the tag in the Tomcat > /conf/server.xml file. Then, open the ports, and do 1-3 below, and set > up multicast. You need to enable multicast on your network. You need > to do 1-3 on both machines. > > Set the multicast address back to what it was, 228.0.0.4. The multicast > address is needed for the multiple machines to communicate and share > session information. > > The multicast address is a broadcast address. It is a single address. > All servers on the network will listen for it. You put the > tag in the web.xml of the applications that want to be > clustered. > > Run these commands as root. > 1. You will need to open the multicast port 45564 for UDP, and the TCP > listen port 4001 for TCP. > 2. The network interfaces should be enabled for multicast. > ifconfig eth0 multicast > 3. Create a multicast route for each network interface. > route add -host 239.255.0.1 dev eth0 > > You can check if multicast is working with, > ping 239.255.0.1 > You should get multiple responses back. > > > -----Original Message----- > From: Niki Diulgerov [mailto:ndiulgerov@imx.fr] > Sent: Thursday, November 15, 2007 11:08 AM > To: users@tomcat.apache.org > Subject: clustering mode in apache tomcat 5.5.25 > > Hello friends, > I read a lot in internet, connected to #tomcat irc channel but still no > help (except one user in irc who told me in this mailing list there are > very nice people). > So my problem is that I'm trying to use 2 tomcats in clustering mode. > I installed standard tomcat 5.5.25 downloaded from the official site. > The operating systems are RHEL4 and Open SuSE10.2 > I have setenv.sh > JAVA_OPTS="-server -Xms512m -Xmx1024m -XX:PermSize=512m > -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError" > CATALINA_OPTS="-Dlogs.root=/extranet/logs -Dwas.install.root=/extranet" > JAVA_HOME=/jdk1.5.0_13 > ENCODING=utf-8 > > Java version jdk1.5.0_13 (I tried with java 1.4 and the compat package > for tomcat 5.5.25 but still the same) > I changed only server.xml file on both machines. Here is how it looks > like: > > shutdown="SHUTDOWN" > > > type="org.apache.catalina.UserDatabase" > description="User database that can be updated and > saved" > > factory="org.apache.catalina.users.MemoryUserDatabaseFactory" > pathname="conf/tomcat-users.xml" /> > > > protocol="AJP/1.3" /> > maxThreads="100" > minSpareThreads="4" > maxSpareThreads="4" > /> > defaultHost="localhost" > jvmRoute="node01"> > className="org.apache.catalina.realm.UserDatabaseRealm" > resourceName="UserDatabase" /> > appBase="webapps"> > className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" > doClusterLog="true" > clusterLogName="clusterlog" > > manager.className="org.apache.catalina.cluster.session.DeltaManager" > manager.expireSessionsOnShutdown="false" > manager.notifyListenersOnReplication="false" > manager.notifySessionListenersOnReplication="false" > manager.sendAllSessions="false" > manager.sendAllSessionsSize="500" > manager.sendAllSessionsWaitTime="20"> > > className="org.apache.catalina.cluster.mcast.McastService" > mcastAddr="228.0.0.4" > mcastBindAddress="127.0.0.1" > mcastClusterDomain="d10" > mcastPort="45564" > mcastFrequency="1000" > mcastDropTime="30000" > recoveryCounter="10" > recoveryEnabled="true" > recoverySleepTime="5000"/> > > className="org.apache.catalina.cluster.tcp.ReplicationListener" > tcpListenAddress="auto" > tcpListenPort="9015" > tcpSelectorTimeout="100" > tcpThreadCount="6"/> > > className="org.apache.catalina.cluster.tcp.ReplicationTransmitter" > replicationMode="fastasyncqueue" > recoverTimeout="5000" > recoverCounter="6" > doTransmitterProcessingStats="true" > doProcessingStats="true" > doWaitAckStats="true" > queueTimeWait="true" > queueDoStats="true" > queueCheckLock="true" > ackTimeout="15000" > waitForAck="true" > keepAliveTimeout="80000" > keepAliveMaxRequestCount="-1"/> > className="org.apache.catalina.cluster.tcp.ReplicationValve" > > filter=".*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html > ;.*\.txt;" > primaryIndicator="true" /> > className="org.apache.catalina.cluster.session.JvmRouteBinderValve" > enabled="true" /> > className="org.apache.catalina.cluster.session.ClusterSessionListener" > /> > className="org.apache.catalina.cluster.session.JvmRouteSessionIDBinderLi > stener" > /> > className="org.apache.catalina.cluster.deploy.FarmWarDeployer" > > tempDir="${catalina.base}/war-temp" > > deployDir="${catalina.base}/war-deploy/" > > watchDir="${catalina.base}/war-listen/" > watchEnabled="true"/> > > > > > > > I changed only mcastBindAddress="127.0.0.1" > on both machines and replaced 127.0.0.1 with the appropriate IP address > of any of these machines. > everything else was the same. (Here I'm not sure if I should use the > same jvmRoute on both machines) > > The problem is that in the catalina.out I have > WARNING: Error receiving mcast package (errorCounter=10). Try Recovery! > java.net.SocketTimeoutException: Receive timed out > at java.net.PlainDatagramSocketImpl.receive0(Native Method) > at > java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:13 > 6) > at java.net.DatagramSocket.receive(DatagramSocket.java:712) > at > org.apache.catalina.cluster.mcast.McastServiceImpl.receive(McastServiceI > mpl.java:238) > at > org.apache.catalina.cluster.mcast.McastServiceImpl$ReceiverThread.run(Mc > astServiceImpl.java:330) > Nov 15, 2007 5:22:33 PM > org.apache.catalina.cluster.mcast.McastServiceImpl$RecoveryThread run > INFO: Cluster membership, running recovery thread, multicasting is not > functional. > Nov 15, 2007 5:22:33 PM > org.apache.catalina.cluster.mcast.McastServiceImpl$SenderThread run > WARNING: Sender Thread ends with errorCounter=0. > Nov 15, 2007 5:22:34 PM > org.apache.catalina.cluster.mcast.McastServiceImpl$ReceiverThread run > WARNING: Receiver Thread ends with errorCounter=1. > Nov 15, 2007 5:22:35 PM > org.apache.catalina.cluster.mcast.McastServiceImpl setupSocket > INFO: Setting multihome multicast interface to:/192.9.202.166 > Nov 15, 2007 5:22:35 PM > org.apache.catalina.cluster.mcast.McastServiceImpl setupSocket > INFO: Setting cluster mcast soTimeout to 1000 > Nov 15, 2007 5:22:35 PM > org.apache.catalina.cluster.mcast.McastServiceImpl$RecoveryThread run > INFO: Membership recovery was successful. > Nov 15, 2007 5:22:43 PM org.apache.catalina.cluster.deploy.WarWatcher > check > INFO: check cluster wars at /extranet/tomcat/war-listen > Nov 15, 2007 5:22:55 PM > org.apache.catalina.cluster.mcast.McastServiceImpl$ReceiverThread run > WARNING: Error receiving mcast package (errorCounter=10). Try Recovery! > java.net.SocketTimeoutException: Receive timed out > at java.net.PlainDatagramSocketImpl.receive0(Native Method) > at > java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:13 > 6) > at java.net.DatagramSocket.receive(DatagramSocket.java:712) > at > org.apache.catalina.cluster.mcast.McastServiceImpl.receive(McastServiceI > mpl.java:238) > at > org.apache.catalina.cluster.mcast.McastServiceImpl$ReceiverThread.run(Mc > astServiceImpl.java:330) > Nov 15, 2007 5:22:55 PM > org.apache.catalina.cluster.mcast.McastServiceImpl$RecoveryThread run > INFO: Cluster membership, running recovery thread, multicasting is not > functional. > Nov 15, 2007 5:22:55 PM > org.apache.catalina.cluster.mcast.McastServiceImpl$SenderThread run > WARNING: Sender Thread ends with errorCounter=0. > Nov 15, 2007 5:22:56 PM > org.apache.catalina.cluster.mcast.McastServiceImpl$ReceiverThread run > WARNING: Receiver Thread ends with errorCounter=1. > Nov 15, 2007 5:22:57 PM > org.apache.catalina.cluster.mcast.McastServiceImpl setupSocket > INFO: Setting multihome multicast interface to:/192.9.202.166 > Nov 15, 2007 5:22:57 PM > org.apache.catalina.cluster.mcast.McastServiceImpl setupSocket > INFO: Setting cluster mcast soTimeout to 1000 > Nov 15, 2007 5:22:57 PM > org.apache.catalina.cluster.mcast.McastServiceImpl$RecoveryThread run > INFO: Membership recovery was successful. > Nov 15, 2007 5:23:03 PM org.apache.catalina.cluster.deploy.WarWatcher > check > INFO: check cluster wars at /extranet/tomcat/war-listen > Nov 15, 2007 5:23:17 PM > org.apache.catalina.cluster.mcast.McastServiceImpl$ReceiverThread run > > > Please help. > > > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org