Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 40439 invoked from network); 16 Nov 2007 09:51:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Nov 2007 09:51:51 -0000 Received: (qmail 2671 invoked by uid 500); 16 Nov 2007 09:51:28 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 1706 invoked by uid 500); 16 Nov 2007 09:51: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 1695 invoked by uid 99); 16 Nov 2007 09:51:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Nov 2007 01:51:25 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,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; Fri, 16 Nov 2007 09:51:12 +0000 Received: from [127.0.0.1] ([192.9.202.231]) by mail2.imx.fr with Microsoft SMTPSVC(6.0.3790.3959); Fri, 16 Nov 2007 11:51:04 +0200 Message-ID: <473D6807.2040608@imx.fr> Date: Fri, 16 Nov 2007 11:51:03 +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: <241CA6EFCF458048AFCD6DCABC7FA6E6047F6300@edgemail1.edgewater.com> In-Reply-To: <241CA6EFCF458048AFCD6DCABC7FA6E6047F6300@edgemail1.edgewater.com> Content-Type: multipart/alternative; boundary="------------090406020700040309030003" X-OriginalArrivalTime: 16 Nov 2007 09:51:04.0043 (UTC) FILETIME=[33ADC3B0:01C82836] X-Virus-Checked: Checked by ClamAV on apache.org --------------090406020700040309030003 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I used the Complex cluster configuration from this link http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html There is such element mcastBindAddress="127.0.0.1" I just changed the IP to be equal with the IP of my interface eth0 which on the first server is 192.9.202.21 and on the second server 192.9.202.166 On both servers there are no firewalls and eth0 interfaces are set with MULTICAST mode Today I also did route add -host 228.0.0.4 dev eth0 now 228.0.0.4 (which is the multicast address from the example) is pingable. But still this message in catalina.out 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:136) at java.net.DatagramSocket.receive(DatagramSocket.java:712) at org.apache.catalina.cluster.mcast.McastServiceImpl.receive(McastServiceImpl.java:238) at org.apache.catalina.cluster.mcast.McastServiceImpl$ReceiverThread.run(McastServiceImpl.java:330) Nov 16, 2007 11:38:30 AM org.apache.catalina.cluster.mcast.McastServiceImpl$RecoveryThread run INFO: Cluster membership, running recovery thread, multicasting is not functional. Nov 16, 2007 11:38:30 AM org.apache.catalina.cluster.mcast.McastServiceImpl$SenderThread run WARNING: Sender Thread ends with errorCounter=0. Nov 16, 2007 11:38:31 AM org.apache.catalina.cluster.mcast.McastServiceImpl$ReceiverThread run WARNING: Receiver Thread ends with errorCounter=1. Nov 16, 2007 11:38:32 AM org.apache.catalina.cluster.mcast.McastServiceImpl setupSocket INFO: Setting multihome multicast interface to:/192.9.202.21 Nov 16, 2007 11:38:32 AM org.apache.catalina.cluster.mcast.McastServiceImpl setupSocket INFO: Setting cluster mcast soTimeout to 1000 Nov 16, 2007 11:38:32 AM org.apache.catalina.cluster.mcast.McastServiceImpl$RecoveryThread run INFO: Membership recovery was successful. Nov 16, 2007 11:38:34 AM org.apache.catalina.cluster.deploy.WarWatcher check INFO: check cluster wars at /extranet/tomcat/war-listen Nov 16, 2007 11:38:52 AM 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:136) at java.net.DatagramSocket.receive(DatagramSocket.java:712) at org.apache.catalina.cluster.mcast.McastServiceImpl.receive(McastServiceImpl.java:238) at org.apache.catalina.cluster.mcast.McastServiceImpl$ReceiverThread.run(McastServiceImpl.java: || 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: > I don't think that you need to mcastBindAddr in the tag. The > default tag doesn't have an mcastBindAddr attribute defined. > > You can try setting the tcpListenAddr to the IP address of each machine. > > -----Original Message----- > From: Niki Diulgerov [mailto:ndiulgerov@imx.fr] > Sent: Thursday, November 15, 2007 12:19 PM > To: Tomcat Users List > Subject: Re: clustering mode in apache tomcat 5.5.25 > > 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 > > > > This e-mail and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. This communication may contain information that is protected from disclosure by applicable law. If you are not the intended recipient, or the employee or agent responsible for delivering this communication to the intended recipient, be advised that you have received this e-mail in error and any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. If you believe that you have received this e-mail in error, please immediately notify Edgewater Technology by telephone at (781) 246-3343 and delete the communication from all e-mail files. > > > --------------------------------------------------------------------- > 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 > > --------------090406020700040309030003--