Ok, I figured this out. Just so everyone knows in tomcat 5.5.7, the cluster multicast functionality is a little flaky (no offense to the developers who spent long hours figuring this stuff out). IF YOU DO NOT HAVE A MULTIHOMED NETWORK, YOU DO NOT NEED TO SPECIFY THE PARAMETER mcastBindAddress="10.111.22.167". I have found that this only confuses the instances joining the cluster and as a result, multicast does not work properly. So long story short, do not specify mcastBindAddress="10.111.22.167" if you do not absolutely have to!!!!
Randall -----Original Message----- From: Randall Svancara [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 01, 2005 12:12 PM To: Tomcat Users List Subject: RE: Tomcat Cluster I used the tools that I downloaded from javagroups as described and I can send messages back and forth over multicast on 224.0.0.4 on port 45564 just fine. I am using the private address space of 10.111.22.x. My servers both contain one network card and each server defined as device eth0. Networking is working fine on each machine as I can ping to anywhere in the world. The only thing I can deduce is that I have a configuration issue that I need to figure out. Just a quick check list.... 1. Uncomment cluster elements in server.xml 2. Uncomment the replication valve in server.xml.....I am assuming this is the valve that is listed in the cluster element in the server.xml. 3. Set all of you session attributes to implement java.io.seriazable 4. Tomcat instances are not on the same machine, so the tcpListenPort can be the same????? 5. My web xml is set to distributable for my testapp web application. Possible problems that I have come up with include: Explicitly defining mcastBindAddress="10.111.22.167" when it is not necessary. Explicitly defining tcpListenAddress="10.111.22.167" when it is not necessary. I did not uncomment the correct valve?? Any thoughts/opinions on the matter would be appreciated. Randall -----Original Message----- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 01, 2005 9:16 AM To: Tomcat Users List Subject: RE: Tomcat Cluster Randall, Below is the clustering section of my server.xml running under SuSE Linux (SLES9). Things to check I can think of: 1. Is your server multi-homed (more than one network adapter)? If so you "must" (at least from my experience) specify both "mcastBindAddr" and tcpListendAddress as shown below. In my case I'm using a dedicated adapter to connect the cluster over the private address space 192.168.11.x. Obviously the values are different for the Tomcat instance on each server. 2. If after reviewing this it still does not work you can test that multicasting is really working by using the utilities included in the JGroups jars. See: http://www.jgroups.org/javagroupsnew/docs/newuser/node15.html#ItDoesnt Work HTH - Richard <SNIP> <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" managerClassName="org.apache.catalina.cluster.session.DeltaMa nager" expireSessionsOnShutdown="false" useDirtyFlag="true" notifyListenersOnReplication="true"> <Membership className="org.apache.catalina.cluster.mcast.McastService" mcastAddr="228.0.0.4" mcastPort="45564" mcastBindAddr="192.168.11.3" mcastFrequency="500" mcastDropTime="3000"/> <Receiver className="org.apache.catalina.cluster.tcp.ReplicationListener " tcpListenAddress="192.168.11.3" tcpListenPort="4001" tcpSelectorTimeout="100" tcpThreadCount="6"/> <Sender className="org.apache.catalina.cluster.tcp.ReplicationTransmit ter" replicationMode="pooled" ackTimeout="15000"/> <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve" filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\ .css;.*\.txt;"/> <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer" tempDir="/tmp/war-temp/" deployDir="/home/tomcat1/jakarta-tomcat-5.5.7/webapps" watchDir="/home/tomcat1/jakarta-tomcat-5.5.7-deployer/bu ild/webapp" watchEnabled="false"/> </Cluster> <SNIP> -----Original Message----- From: Randall Svancara [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 01, 2005 8:47 AM To: Tomcat Users List Subject: RE: Tomcat Cluster Apparently this was too verbose for anyone to read. I simply just don't understand why each tomcat instance is failing to recognize any other instance in the cluster. Multicast messages are being broadcasted. Is there any configuration parameter I can turn on that will verify that each tomcat instance can see the other instances??? Thanks, Randall -----Original Message----- From: Randall Svancara [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 23, 2005 9:44 AM To: Tomcat Users List Subject: Tomcat Cluster I have attempted to configure a tomcat cluster using version 5.5.7 of tomcat. I have configured a simple tcp cluster in the server.xml. I have two tomcat instances installed on two different Linux servers (Fedora core 3, IPTAPLES is turned off, there is not firewall). I have apache and mod_jk set up on a third server. Multicast is enabled!!! When I start up each tomcat instance I receive the following message in the catalina.out file. ------ Feb 23, 2005 9:21:49 AM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Feb 23, 2005 9:21:49 AM org.apache.catalina.cluster.mcast.McastServiceImpl setupSocket INFO: Setting multihome multicast interface to:/10.111.22.163 Feb 23, 2005 9:21:49 AM org.apache.catalina.cluster.mcast.McastService start INFO: Sleeping for 2000 secs to establish cluster membership Feb 23, 2005 9:21:51 AM org.apache.catalina.cluster.deploy.FarmWarDeployer start INFO: Cluster FarmWarDeployer started. Feb 23, 2005 9:21:51 AM org.apache.catalina.cluster.session.DeltaManager start INFO: Starting clustering manager...:/testapp Feb 23, 2005 9:21:51 AM org.apache.catalina.cluster.session.DeltaManager start INFO: Manager[/testapp], skipping state transfer. No members active in cluster group. ----- The important thing to note here is that in the last line, I see "INFO: Manager[/testapp], skipping state transfer. No members active in cluster group." At first I was thinking that multicast was not working properly. However, I was researching the Tomcat mailing list and found another thread discussing the same issue. I tried to use the tool, tomcat-replication.jar located on the CVS for tomcat. I can see the multicast sessions being generated between both servers using this tool. I also started up ethereal, the packet sniffer. I noticed that both servers are generating multicast packets. However after careful analysis of the packet information, I noticed that my servers were looking for 127.0.0.1/4001 for the receiver port. So I set the tcpListenAddress from "auto" to "10.111.22.163" This seemed to fix the problem with the multicast packets sending out the incorrect listener addresses. However, I am still getting the same error... "INFO: Manager[/testapp], skipping state transfer. No members active in cluster group." So here are my questions: 1. Is this really an error, or is session replication working and I am not testing it properly? 2.What is the proper way to test that session replication is working properly? Can anyone provide me with code that works. I am currently using a bean that I declare with <jsp:usebean scope=session.............Is this wrong, should I use request.getAttribute(), request.setAttribute()instead. 3.Can session replication replicate things like a class that I implement as java.io.serializable? Thanks in advance, Randall Cluster configuration from server.xml: <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" managerClassName="org.apache.catalina.cluster.session.DeltaManager" expireSessionsOnShutdown="false" useDirtyFlag="true" notifyListenersOnReplication="true"> <Membership className="org.apache.catalina.cluster.mcast.McastService" mcastAddr="224.0.0.5" mcastPort="45564" mcastFrequency="500" mcastDropTime="3000" mcastBindAddress="10.111.22.163"/> <Receiver className="org.apache.catalina.cluster.tcp.ReplicationListener" tcpListenAddress="10.111.22.163" tcpListenPort="4001" tcpSelectorTimeout="100" tcpThreadCount="6"/> <Sender className="org.apache.catalina.cluster.tcp.ReplicationTransmitter" replicationMode="pooled" ackTimeout="15000"/> <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve" filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt; "/> <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer" tempDir="/tmp/war-temp/" deployDir="/tmp/war-deploy/" watchDir="/tmp/war-listen/" watchEnabled="false"/> </Cluster> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]