tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From János Löbb <janos.l...@yale.edu>
Subject unable to start ReplicatedContext
Date Mon, 09 Feb 2009 16:48:04 GMT
Hi

I have a three machine Tomcat cluster with one tomcat instance on  
each.  Machine names are "pathsrv1", "raid2b" and "reptile".  The OS  
is OSX 10.5 on two machines and OSX 10.4.11 on one machine.  The JVM  
is the latest for the particular OS.  "pathsrv1" act as a reverse  
proxy for all three machines.  I am getting the error bellow in all  
three machines onto the catalina.out.

<snip>
Feb 8, 2009 7:02:19 PM  
org.apache.catalina.ha.context.ReplicatedContext start
SEVERE: Unable to start ReplicatedContext
java.lang.NullPointerException
	at java.io.File.<init>(File.java:194)
	at  
org 
.apache.catalina.core.StandardContext.getBasePath(StandardContext.java: 
4784)
	at  
org 
.apache 
.catalina.ha.context.ReplicatedContext.start(ReplicatedContext.java:62)
	at  
org 
.apache 
.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java: 
771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java: 
525)
	at  
org 
.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java: 
627)
	at  
org 
.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java: 
553)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java: 
488)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
	at  
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java: 
311)
	at  
org 
.apache 
.catalina 
.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 
1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 
1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java: 
443)
	at  
org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java: 
710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at  
sun 
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
39)
	at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Feb 8, 2009 7:02:19 PM org.apache.catalina.core.ContainerBase  
addChildInternal
SEVERE: ContainerBase.addChild: start:
LifecycleException:  Failed to start ReplicatedContext:   
java.lang.NullPointerException
	at  
org 
.apache 
.catalina.ha.context.ReplicatedContext.start(ReplicatedContext.java:73)
	at  
org 
.apache 
.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java: 
771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java: 
525)
	at  
org 
.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java: 
627)
	at  
org 
.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java: 
553)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java: 
488)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
	at  
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java: 
311)
	at  
org 
.apache 
.catalina 
.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 
1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 
1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java: 
443)
	at  
org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java: 
710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at  
sun 
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
39)
	at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Feb 8, 2009 7:02:19 PM org.apache.catalina.startup.HostConfig  
deployDescriptor
SEVERE: Error deploying configuration descriptor CassetteLabeler.xml
java.lang.IllegalStateException: ContainerBase.addChild: start:  
LifecycleException:  Failed to start ReplicatedContext:   
java.lang.NullPointerException
	at  
org 
.apache 
.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:795)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java: 
771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java: 
525)
	at  
org 
.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java: 
627)
	at  
org 
.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java: 
553)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java: 
488)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
	at  
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java: 
311)
	at  
org 
.apache 
.catalina 
.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 
1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 
1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java: 
443)
	at  
org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java: 
710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at  
sun 
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
39)
	at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

</snip>

The replicatedContext is in the webapp's META-INF/context.xml:

pathsrv1:META-INF administrator$ cat context.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context  path="" docBase="ROOT"  
className="org.apache.catalina.ha.context.ReplicatedContext">
</Context>

Any good idea what did I misconfigured ?

The server.xml is the standard one, with only the following  
modifications

<snip>
     <Engine name="Catalina" defaultHost="localhost"  
jvmRoute="pathsrv1">

       <!--For clustering, please take a look at documentation at:
           /docs/cluster-howto.html  (simple how to)
           /docs/config/cluster.html (reference documentation) -->

       <Cluster  
className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>

</snip>
of course the jvmRoute is different in all three machines.  So I use  
the default settings as much as I could.

I am getting these into the mod_jk.log of "pathsrv1":
[Sun Feb 08 16:42:11 2009] [41658:0000] [info]   
ajp_send_request::jk_ajp_common.c (1215): (raid2b) error sending  
request. Will try another pooled connection
[Sun Feb 08 16:42:11 2009] [41658:0000] [info]   
ajp_send_request::jk_ajp_common.c (1241): (raid2b) all endpoints are  
disconnected
[Sun Feb 08 16:42:11 2009] [41658:0000] [info]   
ajp_send_request::jk_ajp_common.c (1244): (raid2b) increase the  
backend idle connection timeout or the connection_pool_minsize
[Sun Feb 08 16:42:11 2009] [41658:0000] [info]   
ajp_service::jk_ajp_common.c (1941): (raid2b) sending request to  
tomcat failed,  recoverable operation attempt=1
[Sun Feb 08 16:50:01 2009] [43073:0000] [info]   
ajp_send_request::jk_ajp_common.c (1215): (reptile) error sending  
request. Will try another pooled connection
[Sun Feb 08 16:50:01 2009] [43073:0000] [info]   
ajp_send_request::jk_ajp_common.c (1241): (reptile) all endpoints are  
disconnected
[Sun Feb 08 16:50:01 2009] [43073:0000] [info]   
ajp_send_request::jk_ajp_common.c (1244): (reptile) increase the  
backend idle connection timeout or the connection_pool_minsize
[Sun Feb 08 16:50:01 2009] [43073:0000] [info]   
ajp_service::jk_ajp_common.c (1941): (reptile) sending request to  
tomcat failed,  recoverable operation attempt=1


The workers.properties are:
pathsrv1:apache2 administrator$ cat workers.properties
ps=/
worker.list=loadbalancer, jkstatus

worker.jkstatus.type=status

# ------------------------
# First Tomcat server named pathsrv1
# ------------------------
worker.pathsrv1.type=ajp13
worker.pathsrv1.host=localhost
worker.pathsrv1.port=8009
worker.pathsrv1.lbfactor=10
worker.pathsrv1.redirect=reptile
worker.pathsrv1.sticky_session=True
worker.pathsrv1.sticky_session_force=False

# ------------------------
# Second Tomcat server named reptile
# ------------------------
worker.reptile.type=ajp13
worker.reptile.host=reptile.yalepath.org
worker.reptile.port=8009
worker.reptile.lbfactor=10
worker.reptile.redirect=raid2b
worker.reptile.sticky_session=True
worker.reptile.sticky_session_force=False

# ---------------------------
# Third Tomcat server named raid2b
# ---------------------------
worker.raid2b.type=ajp13
worker.raid2b.host=raid2b.yalepath.org
worker.raid2b.port=8009
worker.raid2b.lbfactor=10
worker.raid2b.redirect=pathsrv1
worker.raid2b.sticky_session=True
worker.raid2b.sticky_session_force=False

# ------------------------
# Load Balancer worker
# ------------------------

#
# The loadbalancer (type lb) worker performs weighted round-robin
# load balancing with sticky sessions.
# Note:
#  ----> If a worker dies, the load balancer will check its state
#        once in a while. Until then all work is redirected to peer
#        worker.
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=pathsrv1, reptile, raid2b

of course it is slightly changed for the other two machines.

Interestingly if I am ps-ing for java on the machines:
this is on pathsrv1:
pathsrv1:apache2 administrator$ ps -avx |grep java
41068 S      1:08.05   0   0      0   477616  69040     -        0    
0.0  1.6 /System/Library/Frameworks/JavaVM.framework/Versions/ 
CurrentJDK/Home/bin/java - 
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager - 
Djava.util.logging.config.file=/Library/Tomcat/conf/logging.properties  
-Djava.endorsed.dirs=/Library/Tomcat/endorsed -classpath :/Library/ 
Tomcat/bin/bootstrap.jar -Dcatalina.base=/Library/Tomcat - 
Dcatalina.home=/Library/Tomcat -Djava.io.tmpdir=/Library/Tomcat/temp  
org.apache.catalina.startup.Bootstrap start
15284 R+     0:00.00   0   0      0   599740    372     -        0    
0.0  0.0 grep java

this is on raid2b:
raid2b:/usr/local/apache/logs administrator$ ps -avx |grep java
10364 R    1129:31.91   0 2316      0  1462244 126144     -        0   
100.1 -6.0 /System/Library/Frameworks/JavaVM.framework/Versions/ 
CurrentJDK/Home/bin/java - 
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager - 
Djava.util.logg
12790 S+     0:00.00   0 812      0    27376    420     -        0    
0.0 -0.0 grep java
10365 Z      0:00.00   0 404      0        0      0     -        0    
0.0 -0.0 (java)

reptile:logs administrator$ ps -avx |grep java
68266 S     16:44.41   0   0      0   496476  99864     -        0    
0.0  2.4 /System/Library/Frameworks/JavaVM.framework/Versions/ 
CurrentJDK/Home/bin/java - 
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager - 
Djava.util.logging.config.file=/usr/local/tomcat/conf/ 
logging.properties -Djava.endorsed.dirs=/usr/local/tomcat/endorsed - 
classpath :/usr/local/tomcat/bin/bootstrap.jar -Dcatalina.base=/usr/ 
local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/ 
local/tomcat/temp org.apache.catalina.startup.Bootstrap start
73272 S+     0:00.00   0   0      0   599740    376     -        0    
0.4  0.0 grep java


Looks to me that Tomcat is not running right on raid2b.  I do not know  
of any other programs using the 8009 port.  The java -version on the  
three machines:

pathsrv1:apache2 administrator$ java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16- 
b06-284)
Java HotSpot(TM) Server VM (build 1.5.0_16-133, mixed mode)


raid2b:/usr/local/apache/logs administrator$ java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16- 
b06-275)
Java HotSpot(TM) Client VM (build 1.5.0_16-132, mixed mode)


reptile:logs administrator$ java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16- 
b06-284)
Java HotSpot(TM) Server VM (build 1.5.0_16-133, mixed mode)



Thanks ahead,

János
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message