I am trying to setup a tomcat cluster as told in the tomcat cluster
document. There are 3 PCs in my environment. All of them are
running RHEL AS 3.
apache (2.0.26) /w mod_jk (1.2.19) ip: 10.0.0.20
|
___________ | ________
| |
ip:10.0.0.10 10.0.0.11
tomcat1 tomcat2 (version 5.5.17 with jre
1.5.0_08)
ip:192.168.5.223 192.168.5.224
The 10.0.0.0/24 is the subnet for apache and tomcat, and
192.168.5.0/24 is the subnet for tomcat session replication/cluster.
The apache and tomcat part runs without problem. But I just can't
make the cluster part run successfully.
First, I got "No such device" error. So I insert
mcastBindAddress="192.168.5.223" in tomcat1 and
mcastBindAddress="192.168.5.224" in tomcat2, the problem is solved.
But I got another problem, inside the log, there is a line said,
"INFO: Manager [/jspSession]: skipping state transfer. No members
active in cluster group." I have search the internet, people say it
should be the problem of multicast. So I use the javagroup's
McastReceiverTest/McastSenderTest to test multicast, it works (some
people use tomcat-replication.jar, but I can't find it on the
internet now). Then I wonder if tomcat clusters are not sending
the correct message, I use tcpdump to capture the message. I can
see that tcp://192.168.5.223:4001 & tcp://192.168.5.224:4001 in the
capture log. Then I think it may be a tomcat version problem. So I
upgrade tomcat to 5.5.20, and then upgrade jre to 1.5.0_09, but
still no lucks. Now I really need the help from you.
Below the tomcat config and my PCs network config. ( just don't
want this mail become too large, I just post the tomcat2 config.
I've double check the config, the only different is the ip address).
<!-- -->
<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="228.0.0.4"
mcastBindAddress="192.168.5.224"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>
<Receiver
className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="192.168.5.224"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>
<Sender
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
replicationMode="pooled"
ackTimeout="15000"
waitForAck="true"/>
<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"/>
<ClusterListener
className="org.apache.catalina.cluster.session.ClusterSessionListene
r"
/>
</Cluster>
<!-- -->
Script started on Wed 25 Oct 2006 11:52:21 AM CST
[EMAIL PROTECTED] conf]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:0C:29:7B:43:3A
inet addr:10.0.0.11 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:25 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3871 (3.7 Kb) TX bytes:168 (168.0 b)
Interrupt:10 Base address:0x1400
eth1 Link encap:Ethernet HWaddr 00:0C:29:7B:43:44
inet addr:192.168.5.224 Bcast:192.168.5.255 Mask:
255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1584 errors:0 dropped:0 overruns:0 frame:0
TX packets:1563 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:156767 (153.0 Kb) TX bytes:152906 (149.3 Kb)
Interrupt:9 Base address:0x1480
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1356 (1.3 Kb) TX bytes:1356 (1.3 Kb)
[EMAIL PROTECTED] conf]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window
irtt Iface
192.168.5.0 0.0.0.0 255.255.255.0 U 0
0 0 eth1
10.0.0.0 0.0.0.0 255.255.255.0 U 0
0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0
0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0
0 0 lo
[EMAIL PROTECTED] conf]# netstat -na | grep 4001
tcp 0 0 192.168.5.224:4001 0.0.0.0:*
LISTEN
[EMAIL PROTECTED] conf]# netstat -na | grep 45564
udp 0 0 192.168.5.224:45564 0.0.0.0:*
[EMAIL PROTECTED] conf]# uname -r
2.4.21-4.EL
[EMAIL PROTECTED] conf]# exit
Script done on Wed 25 Oct 2006 11:52:43 AM CST
Below is the tomcat log file
TOMCAT1 log file
Oct 25, 2006 11:21:46 AM
org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: /usr/java/jre1.5.0_09/lib/i386/client:/usr/java/
jre1.5.0_09/lib/i386:/usr/java/jre1.5.0_09/../lib/i386
Oct 25, 2006 11:21:47 AM
org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 25, 2006 11:21:47 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2564 ms
Oct 25, 2006 11:21:47 AM org.apache.catalina.core.StandardService
start
INFO: Starting service Catalina
Oct 25, 2006 11:21:47 AM org.apache.catalina.core.StandardEngine
start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.20
Oct 25, 2006 11:21:47 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Oct 25, 2006 11:21:47 AM
org.apache.catalina.cluster.tcp.SimpleTcpCluster start
INFO: Cluster is about to start
Oct 25, 2006 11:21:47 AM
org.apache.catalina.cluster.tcp.ReplicationTransmitter start
INFO: Start ClusterSender at cluster
Catalina:type=Cluster,host=localhost with name
Catalina:type=ClusterSender,host=localhost
Oct 25, 2006 11:21:47 AM
org.apache.catalina.cluster.mcast.McastServiceImpl setupSocket
INFO: Setting multihome multicast interface to:/192.168.5.223
Oct 25, 2006 11:21:47 AM
org.apache.catalina.cluster.mcast.McastService start
INFO: Sleeping for 2000 milliseconds to establish cluster membership
Oct 25, 2006 11:21:49 AM
org.apache.catalina.cluster.mcast.McastService registerMBean
INFO: membership mbean registered
(Catalina:type=ClusterMembership,host=localhost)
Oct 25, 2006 11:21:49 AM
org.apache.catalina.cluster.deploy.FarmWarDeployer start
INFO: Cluster FarmWarDeployer started.
Oct 25, 2006 11:21:52 AM
org.apache.catalina.cluster.session.DeltaManager start
INFO: Register manager /jspSession to cluster element Host with
name localhost
Oct 25, 2006 11:21:52 AM
org.apache.catalina.cluster.session.DeltaManager start
INFO: Starting clustering manager at /jspSession
Oct 25, 2006 11:21:52 AM
org.apache.catalina.cluster.session.DeltaManager
getAllClusterSessions
INFO: Manager [/jspSession]: skipping state transfer. No members
active in cluster group.
Oct 25, 2006 11:21:52 AM
org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 25, 2006 11:21:52 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 25, 2006 11:21:52 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/76 config=null
Oct 25, 2006 11:21:52 AM
org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Oct 25, 2006 11:21:52 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5019 ms
TOMCAT 2 log file
Oct 25, 2006 11:39:05 AM
org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: /usr/java/jre1.5.0_09/lib/i386/client:/usr/java/
jre1.5.0_09/lib/i386:/usr/java/jre1.5.0_09/../lib/i386
Oct 25, 2006 11:39:06 AM
org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 25, 2006 11:39:06 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4670 ms
Oct 25, 2006 11:39:07 AM org.apache.catalina.core.StandardService
start
INFO: Starting service Catalina
Oct 25, 2006 11:39:07 AM org.apache.catalina.core.StandardEngine
start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.20
Oct 25, 2006 11:39:07 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Oct 25, 2006 11:39:07 AM
org.apache.catalina.cluster.tcp.SimpleTcpCluster start
INFO: Cluster is about to start
Oct 25, 2006 11:39:07 AM
org.apache.catalina.cluster.tcp.ReplicationTransmitter start
INFO: Start ClusterSender at cluster
Catalina:type=Cluster,host=localhost with name
Catalina:type=ClusterSender,host=localhost
Oct 25, 2006 11:39:07 AM
org.apache.catalina.cluster.mcast.McastServiceImpl setupSocket
INFO: Setting multihome multicast interface to:/192.168.5.224
Oct 25, 2006 11:39:07 AM
org.apache.catalina.cluster.mcast.McastService start
INFO: Sleeping for 2000 milliseconds to establish cluster membership
Oct 25, 2006 11:39:09 AM
org.apache.catalina.cluster.mcast.McastService registerMBean
INFO: membership mbean registered
(Catalina:type=ClusterMembership,host=localhost)
Oct 25, 2006 11:39:09 AM
org.apache.catalina.cluster.deploy.FarmWarDeployer start
INFO: Cluster FarmWarDeployer started.
Oct 25, 2006 11:39:12 AM
org.apache.catalina.cluster.session.DeltaManager start
INFO: Register manager /jspSession to cluster element Host with
name localhost
Oct 25, 2006 11:39:12 AM
org.apache.catalina.cluster.session.DeltaManager start
INFO: Starting clustering manager at /jspSession
Oct 25, 2006 11:39:12 AM
org.apache.catalina.cluster.session.DeltaManager
getAllClusterSessions
INFO: Manager [/jspSession]: skipping state transfer. No members
active in cluster group.
Oct 25, 2006 11:39:13 AM
org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 25, 2006 11:39:13 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 25, 2006 11:39:13 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/138 config=null
Oct 25, 2006 11:39:13 AM
org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Oct 25, 2006 11:39:13 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6905 ms
HoTszKin
--------------------------------------------------------------------
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]