geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Maximov" <pavel.maxi...@returnpath.net>
Subject Clustering setup
Date Fri, 03 Nov 2006 21:05:18 GMT
Hello everybody, question about serating cluster configuration in a
separate deployable module.
 
Specifying cluster configuration in the web application itself works
fine.
 
I separated cluster config into a separate deployment descriptor:
 
<?xml version="1.0" encoding="UTF-8"?>

<application
xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">

<environment>

<moduleId>

<groupId>mygroup</groupId>

<artifactId>mycluster</artifactId>

<version>1.2.0</version>

<type>car</type>

</moduleId>

<dependencies>

<dependency>

<groupId>geronimo</groupId>

<artifactId>tomcat</artifactId>

<type>car</type>

</dependency>

</dependencies>

</environment>

<!-- Cluster --> 

<gbean name="TomcatCluster"
class="org.apache.geronimo.tomcat.cluster.CatalinaClusterGBean">

<attribute
name="className">org.apache.catalina.cluster.tcp.SimpleTcpCluster</attri
bute> 

<attribute name="initParams">

managerClassName=org.apache.catalina.cluster.session.DeltaManager

expireSessionsOnShutdown=false

useDirtyFlag=false

notifyListenersOnReplication=true

</attribute> 

<reference name="Membership">

<name>TomcatClusterMembership</name> 

</reference>

<reference name="Receiver">

<name>TomcatClusterReceiver</name> 

</reference>

<reference name="Sender">

<name>TomcatClusterSender</name> 

</reference>

<reference name="TomcatValveChain">

<name>TomcatClusterReplicationValve</name> 

</reference>

<!-- 

<reference name="ClusterDeployer"> <name>FarmWarDeployer</name>
</reference> 

--> 

</gbean>

<!-- Membership --> 

<gbean name="TomcatClusterMembership"
class="org.apache.geronimo.tomcat.cluster.MembershipServiceGBean">

<attribute
name="className">org.apache.catalina.cluster.mcast.McastService</attribu
te> 

<attribute name="initParams">

mcastAddr=228.0.0.9

<!-- mcastBindAddress=IPAddressMultiIn DON'T SET THIS - IT WILL SCREW
YOU -->

mcastPort=45564

mcastFrequency=500

mcastDropTime=3000

</attribute> 

</gbean>

<!-- Receiver --> 

<gbean name="TomcatClusterReceiver"
class="org.apache.geronimo.tomcat.cluster.ReceiverGBean">

<attribute
name="className">org.apache.catalina.cluster.tcp.ReplicationListener</at
tribute> 

<attribute name="initParams">

tcpListenAddress=172.16.215.1

tcpListenPort=4001

tcpSelectorTimeout=100

tcpThreadCount=6

</attribute> 

</gbean>

<!-- Sender --> 

<gbean name="TomcatClusterSender"
class="org.apache.geronimo.tomcat.cluster.SenderGBean">

<attribute
name="className">org.apache.catalina.cluster.tcp.ReplicationTransmitter<
/attribute> 

<attribute name="initParams">

replicationMode=pooled

ackTimeout=15000

</attribute> 

</gbean>

<!-- Valves --> 

<gbean name="TomcatClusterReplicationValve"
class="org.apache.geronimo.tomcat.ValveGBean">

<attribute
name="className">org.apache.catalina.cluster.tcp.ReplicationValve</attri
bute> 

<attribute
name="initParams">filter=.*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg
;.*\.htm;.*\.html;.*\.txt;</attribute> 

<reference name="NextValve">

<name>JvmRouteBinderValve</name> 

</reference>

</gbean>

<!-- Valve to allow sticky session failover to work properly for more
than two nodes --> 

<gbean name="JvmRouteBinderValve"
class="org.apache.geronimo.tomcat.ValveGBean">

<attribute
name="className">org.apache.catalina.cluster.session.JvmRouteBinderValve
</attribute> 

<attribute name="initParams">enabled=true</attribute> 

</gbean>

</application>

It deploys just fine and shows up as "started" in Applications EARs in
geronimo console.

However, when I deploy a web application which has 

<cluster>TomcatCluster</cluster>

in geronimo-web.xml - it fails to start:

 

org.apache.geronimo.kernel.config.LifecycleException: start of
returnpath/prequal/1.6.0/war failed
        at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfig
uration(SimpleConfigurationManager.java:544)
        at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfig
uration(SimpleConfigurationManager.java:508)
        at
org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassB
yCGLIB$$ce77a924.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInv
oker.java:38)
        at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.j
ava:122)
        at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.jav
a:817)
        at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperation
Invoker.java:35)
        at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyM
ethodInterceptor.java:96)
        at
org.apache.geronimo.kernel.config.EditableConfigurationManager$$Enhancer
ByCGLIB$$f0762b40.startConfiguration(<generated>)
        at
org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartComman
d.java:67)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.geronimo.kernel.config.InvalidConfigException:
Unknown start exception
        at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGB
eans(ConfigurationUtil.java:440)
        at
org.apache.geronimo.kernel.config.KernelConfigurationManager.start(Kerne
lConfigurationManager.java:187)
        at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfig
uration(SimpleConfigurationManager.java:527)
        ... 12 more
Caused by: org.apache.geronimo.gbean.InvalidConfigurationException:
Configuration returnpath/prequal/1.6.0/war failed to start due to the
following reasons:
  The service
J2EEApplication=null,j2eeType=WebModule,name=returnpath/prequal/1.6.0/wa
r did not start because
returnpath/prequal/1.6.0/war?J2EEApplication=null,WebModule=returnpath/p
requal/1.6.0/war,j2eeType=Cluster,name=TomcatCluster did not start.

        at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGB
eans(ConfigurationUtil.java:403)
        ... 14 more
Deployer operation failed: start of returnpath/prequal/1.6.0/war failed
org.apache.geronimo.kernel.config.LifecycleException: start of
returnpath/prequal/1.6.0/war failed
        at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfig
uration(SimpleConfigurationManager.java:544)
        at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfig
uration(SimpleConfigurationManager.java:508)
        at
org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassB
yCGLIB$$ce77a924.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInv
oker.java:38)
        at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.j
ava:122)
        at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.jav
a:817)
        at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperation
Invoker.java:35)
        at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyM
ethodInterceptor.java:96)
        at
org.apache.geronimo.kernel.config.EditableConfigurationManager$$Enhancer
ByCGLIB$$f0762b40.startConfiguration(<generated>)
        at
org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartComman
d.java:67)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.geronimo.kernel.config.InvalidConfigException:
Unknown start exception
        at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGB
eans(ConfigurationUtil.java:440)
        at
org.apache.geronimo.kernel.config.KernelConfigurationManager.start(Kerne
lConfigurationManager.java:187)
        at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfig
uration(SimpleConfigurationManager.java:527)
        ... 12 more
Caused by: org.apache.geronimo.gbean.InvalidConfigurationException:
Configuration returnpath/prequal/1.6.0/war failed to start due to the
following reasons:
  The service
J2EEApplication=null,j2eeType=WebModule,name=returnpath/prequal/1.6.0/wa
r did not start because
returnpath/prequal/1.6.0/war?J2EEApplication=null,WebModule=returnpath/p
requal/1.6.0/war,j2eeType=Cluster,name=TomcatCluster did not start.

        at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGB
eans(ConfigurationUtil.java:403)
        ... 14 more

 

Anything I'm doing wrong? I want to keep cluster configuration separate.

--Pavel.


Mime
View raw message