Also, for some reason when I deploy the cluster config, nothing is logged in geronimo.out
 
Could that be an issue?
 
--Pavel.


From: Pavel Maximov [mailto:pavel.maximov@returnpath.net]
Sent: Friday, November 03, 2006 4:05 PM
To: user@geronimo.apache.org
Subject: Clustering setup

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</attribute>

<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</attribute>

<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</attribute>

<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</attribute>

<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.startConfiguration(SimpleConfigurationManager.java:544)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:508)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
        at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$f0762b40.startConfiguration(<generated>)
        at org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.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.startConfigurationGBeans(ConfigurationUtil.java:440)
        at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(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/war did not start because returnpath/prequal/1.6.0/war?J2EEApplication=null,WebModule=returnpath/prequal/1.6.0/war,j2eeType=Cluster,name=TomcatCluster did not start.

        at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(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.startConfiguration(SimpleConfigurationManager.java:544)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:508)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
        at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$f0762b40.startConfiguration(<generated>)
        at org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.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.startConfigurationGBeans(ConfigurationUtil.java:440)
        at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
        at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(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/war did not start because returnpath/prequal/1.6.0/war?J2EEApplication=null,WebModule=returnpath/prequal/1.6.0/war,j2eeType=Cluster,name=TomcatCluster did not start.

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

 

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

--Pavel.