You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Phani Madgula <ph...@gmail.com> on 2006/03/29 16:16:40 UTC

Session replication in Geronimo clustering

Hi,

I have been trying to use tomcat clustering with Geronimo for a customer
application. Sometimes, I face the following problem.


I downloaded apache2.0.54 and mod_jk_1.2.15 and tested clustering. I have
three machines on a same subnet one windows and other are linux boxes. I
have also enabled IPMulticast and no firewalls between systems.

To my observation, session replication is not working. However, loadbalancer
is able to fail-over successfully.

When I shutdown the instance which is serving the HttpRequests, it will
throw an exception stating "not able to start cluster listener" and also "no
active members in the cluster"

11:09:10,572 DEBUG [WebappLoader] Stopping this Loader

11:09:10,573 ERROR [ReplicationListener] Unable to start cluster listener.

java.lang.NullPointerException

at org.apache.catalina.cluster.tcp.ReplicationListener.listen(
ReplicationListener.java(Compiled Code))

at org.apache.catalina.cluster.tcp.ReplicationListener.run(
ReplicationListener.java:125)

at java.lang.Thread.run(Thread.java:570)

11:09:10,573 DEBUG [StandardContext] resetContext Geronimo
:j2eeType=WebModule,name=//localhost/servlet-examples-cluster,J2EEApplication=none,J2EEServer=none
null

11:09:10,575 DEBUG [StandardContext] Stopping complete

or

11:03:07,998 INFO [DeltaManager] Manager [/servlet-examples-cluster]:
skipping state transfer. No members active in cluster group.

I have tested with both mod_jk_1.2.14 & mod_jk_1.2.15, but failed.
Any ideas on why this error comes?..

Thx
phani

Re: Session replication in Geronimo clustering

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
the correct attr name is mcastBindAddress if I remember it correctly, 
but if it is working for you now, then that is great

Phani Madgula wrote:
> Hi,
>  
> Sorry for deply in reply..I was out of the work...!
>  
> I did change the xx.yy.zz.aa to the  proper value. I am testing these 
> scenarios on Linux machines. I got information from google search 
> about this error.
> http://mail-archives.apache.org/mod_mbox/tomcat-users/200503.mbox/%3c9FACF2700DF15849849992AB521FF875024501@SWAN_MAIL1.ada.net.gov%3e 
> <http://mail-archives.apache.org/mod_mbox/tomcat-users/200503.mbox/%3c9FACF2700DF15849849992AB521FF875024501@SWAN_MAIL1.ada.net.gov%3e>
>  
> It said that, if the network is not multihomed, then we do not have to 
> specify the attribute "mcastBindAddress".
>  
> So, I just commented out
> mcastBindAddr="192.168.11.3 <http://192.168.11.3>" in the 
> geronimo-web.xml files and redeployed the applications on each node. 
> Now, all the session replication and fail-over is happening.
>  
> I do not know what is multihomed network. I will try to know and 
> update you on this.
>  
> To my surprise, when I tested on only windows machines, this problem 
> is not there. It is experienced only on Linux machines.
>  
> Thanks
> Phani
>  
>  
>  
>
>  
>
>  
>
>  
>
>  
>
>
>  
> On 3/30/06, *Filip Hanik - Dev Lists* <devlists@hanik.com 
> <ma...@hanik.com>> wrote:
>
>     >tcpListenAddress=xx.yy.zz.aa
>
>     yup, this would cause a null pointer later on if not changed. it
>     would
>     have to be a valid value, or "auto", which will decide the IP on
>     its own.
>
>     Filip
>
>     Jeff Genender wrote:
>     > Yep...those should be set if the example was followed...
>     >
>     > <gbean name="TomcatReceiver"
>     > class="org.apache.geronimo.tomcat.cluster.ReceiverGBean">
>     >   <attribute
>     > name="className">org.apache.catalina.cluster.tcp.ReplicationListener
>     > </attribute>
>     >
>     >   <attribute name="initParams">
>     >             tcpListenAddress=xx.yy.zz.aa
>     >             tcpListenPort=4001
>     >             tcpSelectorTimeout=100
>     >             tcpThreadCount=6
>     >   </attribute>
>     > </gbean>
>     >
>     > Phani, did you change the tcpListenAddress initParams attribute to a
>     > real address?
>     >
>     > Jeff
>     >
>     >
>     > Filip Hanik - Dev Lists wrote:
>     >
>     >> it would be one of these, they should all be set to a value.
>     >>
>     >> tcpListenAddress="auto"
>     >> tcpListenPort="9015"
>     >> tcpSelectorTimeout="100"
>     >> tcpThreadCount="6"
>     >>
>     >> also, if tcpListenAddress says "auto" instead of an IP address,
>     the the
>     >> following code gets executed
>     >>
>     >> public java.net.InetAddress getBind() {
>     >>        if (bind == null) {
>     >>            try {
>     >>                if ("auto".equals(tcpListenAddress))
>     >>                    tcpListenAddress =
>     >> java.net.InetAddress.getLocalHost ().getHostAddress();
>     >>                bind =
>     java.net.InetAddress.getByName(tcpListenAddress);
>     >>            } catch (IOException ioe) {
>     >>                log.error("Failed bind replication listener on
>     address:"+
>     >> tcpListenAddress, ioe);
>     >>            }
>     >>        }
>     >>      return bind;
>     >> }
>     >>
>     >> so, if there is an error getting the correct address for the
>     localhost
>     >> machine, it will return null, and could cause your nullpointer
>     exception
>     >>
>     >> my guess is of course that the attribute is missing all together.
>     >>
>     >> Filip
>     >>
>     >>
>     >>
>     >>
>     >> Jeff Genender wrote:
>     >>
>     >>> Filip,
>     >>>
>     >>> Thanks for the input...any idea on the missing attribute?
>     >>>
>     >>> Jeff
>     >>>
>     >>> Filip Hanik - Dev Lists wrote:
>     >>>
>     >>>
>     >>>> gentlemen,
>     >>>> looks like there is an attribute missing from the
>     >>>> "<Cluster...>*<Receiver.../>*</Cluster>" element.
>     >>>> the ReplicationListener.listen() method just gets the listen
>     address (or
>     >>>> tries to resolve the name, then gets the port)
>     >>>> then it starts up a server socket using NIO.
>     >>>>
>     >>>> the other error, no active members in group, just means that
>     the tomcat
>     >>>> instances didn't discover each other using multicast heart beats.
>     >>>>
>     >>>> Lets get the ReplicationListener error first, then we can
>     move on to
>     >>>> membership, can you post your tomcat config file
>     >>>> PS. the error is not related to mod_jk, its in the tomcat
>     java code.
>     >>>> thanks
>     >>>> Filip
>     >>>>
>     >>>> Phani Madgula wrote:
>     >>>>
>     >>>>
>     >>>>> Hi,
>     >>>>>
>     >>>>> I have been trying to use tomcat clustering with Geronimo for a
>     >>>>> customer application. Sometimes, I face the following problem.
>     >>>>>
>     >>>>>
>     >>>>> I downloaded apache2.0.54 and mod_jk_1.2.15 and tested
>     clustering. I
>     >>>>> have three machines on a same subnet one windows and other
>     are linux
>     >>>>> boxes. I have also enabled IPMulticast and no firewalls between
>     >>>>> systems.
>     >>>>>
>     >>>>> To my observation, session replication is not working. However,
>     >>>>> loadbalancer is able to fail-over successfully.
>     >>>>>
>     >>>>> When I shutdown the instance which is serving the
>     HttpRequests, it
>     >>>>> will throw an exception stating "not able to start cluster
>     listener"
>     >>>>> and also "no active members in the cluster"
>     >>>>>
>     >>>>> 11:09:10,572 DEBUG [WebappLoader] Stopping this Loader
>     >>>>>
>     >>>>> 11:09:10,573 ERROR [ReplicationListener] Unable to start cluster
>     >>>>> listener.
>     >>>>>
>     >>>>> java.lang.NullPointerException
>     >>>>>
>     >>>>> at
>     >>>>>
>     org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationListener.java(Compiled
>     >>>>>
>     >>>>> Code))
>     >>>>>
>     >>>>> at
>     >>>>>
>     org.apache.catalina.cluster.tcp.ReplicationListener.run(ReplicationListener.java:125)
>     >>>>>
>     >>>>>
>     >>>>>
>     >>>>> at java.lang.Thread.run(Thread.java:570)
>     >>>>>
>     >>>>> 11:09:10,573 DEBUG [StandardContext] resetContext Geronimo
>     >>>>>
>     :j2eeType=WebModule,name=//localhost/servlet-examples-cluster,J2EEApplication=none,J2EEServer=none
>
>     >>>>>
>     >>>>> null
>     >>>>>
>     >>>>> 11:09:10,575 DEBUG [StandardContext] Stopping complete
>     >>>>>
>     >>>>> or
>     >>>>>
>     >>>>> 11:03:07,998 INFO [DeltaManager] Manager
>     [/servlet-examples-cluster]:
>     >>>>> skipping state transfer. No members active in cluster group.
>     >>>>>
>     >>>>> I have tested with both mod_jk_1.2.14 & mod_jk_1.2.15, but
>     failed.
>     >>>>>
>     >>>>> Any ideas on why this error comes?..
>     >>>>>
>     >>>>> Thx
>     >>>>> phani
>     >>>>>
>     >>>>>
>     >>>
>     >>>
>     >
>     >
>
>


Re: Session replication in Geronimo clustering

Posted by Jeff Genender <jg...@apache.org>.
Do you have ipchains or firewalling on your Linux boxes turned on?

That is the usual culprit on Linux boxes.

Jeff

Phani Madgula wrote:
> Hi,
>  
> Sorry for deply in reply..I was out of the work...!
>  
> I did change the xx.yy.zz.aa to the  proper value. I am testing these
> scenarios on Linux machines. I got information from google search about
> this error.
> http://mail-archives.apache.org/mod_mbox/tomcat-users/200503.mbox/%3c9FACF2700DF15849849992AB521FF875024501@SWAN_MAIL1.ada.net.gov%3e
> <http://mail-archives.apache.org/mod_mbox/tomcat-users/200503.mbox/%3c9FACF2700DF15849849992AB521FF875024501@SWAN_MAIL1.ada.net.gov%3e>
>  
> It said that, if the network is not multihomed, then we do not have to
> specify the attribute "mcastBindAddress".
>  
> So, I just commented out
> mcastBindAddr="192.168.11.3 <http://192.168.11.3>" in the
> geronimo-web.xml files and redeployed the applications on each node.
> Now, all the session replication and fail-over is happening.
>  
> I do not know what is multihomed network. I will try to know and update
> you on this.
>  
> To my surprise, when I tested on only windows machines, this problem is
> not there. It is experienced only on Linux machines.
>  
> Thanks
> Phani
>  
>  
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> 
>  
> On 3/30/06, *Filip Hanik - Dev Lists* <devlists@hanik.com
> <ma...@hanik.com>> wrote:
> 
>     >tcpListenAddress=xx.yy.zz.aa
> 
>     yup, this would cause a null pointer later on if not changed. it would
>     have to be a valid value, or "auto", which will decide the IP on its
>     own.
> 
>     Filip
> 
>     Jeff Genender wrote:
>     > Yep...those should be set if the example was followed...
>     >
>     > <gbean name="TomcatReceiver"
>     > class="org.apache.geronimo.tomcat.cluster.ReceiverGBean">
>     >   <attribute
>     > name="className">org.apache.catalina.cluster.tcp.ReplicationListener
>     > </attribute>
>     >
>     >   <attribute name="initParams">
>     >             tcpListenAddress=xx.yy.zz.aa
>     >             tcpListenPort=4001
>     >             tcpSelectorTimeout=100
>     >             tcpThreadCount=6
>     >   </attribute>
>     > </gbean>
>     >
>     > Phani, did you change the tcpListenAddress initParams attribute to a
>     > real address?
>     >
>     > Jeff
>     >
>     >
>     > Filip Hanik - Dev Lists wrote:
>     >
>     >> it would be one of these, they should all be set to a value.
>     >>
>     >> tcpListenAddress="auto"
>     >> tcpListenPort="9015"
>     >> tcpSelectorTimeout="100"
>     >> tcpThreadCount="6"
>     >>
>     >> also, if tcpListenAddress says "auto" instead of an IP address,
>     the the
>     >> following code gets executed
>     >>
>     >> public java.net.InetAddress getBind() {
>     >>        if (bind == null) {
>     >>            try {
>     >>                if ("auto".equals(tcpListenAddress))
>     >>                    tcpListenAddress =
>     >> java.net.InetAddress.getLocalHost ().getHostAddress();
>     >>                bind =
>     java.net.InetAddress.getByName(tcpListenAddress);
>     >>            } catch (IOException ioe) {
>     >>                log.error("Failed bind replication listener on
>     address:"+
>     >> tcpListenAddress, ioe);
>     >>            }
>     >>        }
>     >>      return bind;
>     >> }
>     >>
>     >> so, if there is an error getting the correct address for the
>     localhost
>     >> machine, it will return null, and could cause your nullpointer
>     exception
>     >>
>     >> my guess is of course that the attribute is missing all together.
>     >>
>     >> Filip
>     >>
>     >>
>     >>
>     >>
>     >> Jeff Genender wrote:
>     >>
>     >>> Filip,
>     >>>
>     >>> Thanks for the input...any idea on the missing attribute?
>     >>>
>     >>> Jeff
>     >>>
>     >>> Filip Hanik - Dev Lists wrote:
>     >>>
>     >>>
>     >>>> gentlemen,
>     >>>> looks like there is an attribute missing from the
>     >>>> "<Cluster...>*<Receiver.../>*</Cluster>" element.
>     >>>> the ReplicationListener.listen() method just gets the listen
>     address (or
>     >>>> tries to resolve the name, then gets the port)
>     >>>> then it starts up a server socket using NIO.
>     >>>>
>     >>>> the other error, no active members in group, just means that
>     the tomcat
>     >>>> instances didn't discover each other using multicast heart beats.
>     >>>>
>     >>>> Lets get the ReplicationListener error first, then we can move
>     on to
>     >>>> membership, can you post your tomcat config file
>     >>>> PS. the error is not related to mod_jk, its in the tomcat java
>     code.
>     >>>> thanks
>     >>>> Filip
>     >>>>
>     >>>> Phani Madgula wrote:
>     >>>>
>     >>>>
>     >>>>> Hi,
>     >>>>>
>     >>>>> I have been trying to use tomcat clustering with Geronimo for a
>     >>>>> customer application. Sometimes, I face the following problem.
>     >>>>>
>     >>>>>
>     >>>>> I downloaded apache2.0.54 and mod_jk_1.2.15 and tested
>     clustering. I
>     >>>>> have three machines on a same subnet one windows and other are
>     linux
>     >>>>> boxes. I have also enabled IPMulticast and no firewalls between
>     >>>>> systems.
>     >>>>>
>     >>>>> To my observation, session replication is not working. However,
>     >>>>> loadbalancer is able to fail-over successfully.
>     >>>>>
>     >>>>> When I shutdown the instance which is serving the
>     HttpRequests, it
>     >>>>> will throw an exception stating "not able to start cluster
>     listener"
>     >>>>> and also "no active members in the cluster"
>     >>>>>
>     >>>>> 11:09:10,572 DEBUG [WebappLoader] Stopping this Loader
>     >>>>>
>     >>>>> 11:09:10,573 ERROR [ReplicationListener] Unable to start cluster
>     >>>>> listener.
>     >>>>>
>     >>>>> java.lang.NullPointerException
>     >>>>>
>     >>>>> at
>     >>>>>
>     org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationListener.java(Compiled
>     >>>>>
>     >>>>> Code))
>     >>>>>
>     >>>>> at
>     >>>>>
>     org.apache.catalina.cluster.tcp.ReplicationListener.run(ReplicationListener.java:125)
>     >>>>>
>     >>>>>
>     >>>>>
>     >>>>> at java.lang.Thread.run(Thread.java:570)
>     >>>>>
>     >>>>> 11:09:10,573 DEBUG [StandardContext] resetContext Geronimo
>     >>>>>
>     :j2eeType=WebModule,name=//localhost/servlet-examples-cluster,J2EEApplication=none,J2EEServer=none
> 
>     >>>>>
>     >>>>> null
>     >>>>>
>     >>>>> 11:09:10,575 DEBUG [StandardContext] Stopping complete
>     >>>>>
>     >>>>> or
>     >>>>>
>     >>>>> 11:03:07,998 INFO [DeltaManager] Manager
>     [/servlet-examples-cluster]:
>     >>>>> skipping state transfer. No members active in cluster group.
>     >>>>>
>     >>>>> I have tested with both mod_jk_1.2.14 & mod_jk_1.2.15, but
>     failed.
>     >>>>>
>     >>>>> Any ideas on why this error comes?..
>     >>>>>
>     >>>>> Thx
>     >>>>> phani
>     >>>>>
>     >>>>>
>     >>>
>     >>>
>     >
>     >
> 
> 

Re: Session replication in Geronimo clustering

Posted by Paul Grey <pi...@mindspring.com>.
I ran into the same problem Phani describes here, and his solution worked 
for me.

- http://cwiki.apache.org/GMOxDOC11/clustering-sample-application.html

- 2 geronimo 1.1.1 instances (JRE 1.5.0_08) on Windows XP SP2 (same 
machine), configure as described, session failover works
- 2 geronimo 1.1.1 instances (JRE 1.5.0_08) on Ubuntu 6.10 (same machine), 
configured as described, session failover does not work
- remove attribute "mcastBindAddress" in war deployment plan, session 
failover works


"Phani Madgula" 
<ph...@gmail.com> wrote in 
message news:83e2fc4d0604030231m17b989dga6aa8547dde87bd7@mail.gmail.com...
Hi,





Re: Session replication in Geronimo clustering

Posted by Phani Madgula <ph...@gmail.com>.
Hi,

Sorry for deply in reply..I was out of the work...!

I did change the xx.yy.zz.aa to the  proper value. I am testing these
scenarios on Linux machines. I got information from google search about this
error.
http://mail-archives.apache.org/mod_mbox/tomcat-users/200503.mbox/%3c9FACF2700DF15849849992AB521FF875024501@SWAN_MAIL1.ada.net.gov%3e

It said that, if the network is not multihomed, then we do not have to
specify the attribute "mcastBindAddress".

So, I just commented out
mcastBindAddr="192.168.11.3" in the geronimo-web.xml files and redeployed
the applications on each node. Now, all the session replication and
fail-over is happening.

I do not know what is multihomed network. I will try to know and update you
on this.

To my surprise, when I tested on only windows machines, this problem is not
there. It is experienced only on Linux machines.

Thanks
Phani













On 3/30/06, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
>
> >tcpListenAddress=xx.yy.zz.aa
>
> yup, this would cause a null pointer later on if not changed. it would
> have to be a valid value, or "auto", which will decide the IP on its own.
>
> Filip
>
> Jeff Genender wrote:
> > Yep...those should be set if the example was followed...
> >
> > <gbean name="TomcatReceiver"
> > class="org.apache.geronimo.tomcat.cluster.ReceiverGBean">
> >   <attribute
> > name="className">org.apache.catalina.cluster.tcp.ReplicationListener
> > </attribute>
> >
> >   <attribute name="initParams">
> >             tcpListenAddress=xx.yy.zz.aa
> >             tcpListenPort=4001
> >             tcpSelectorTimeout=100
> >             tcpThreadCount=6
> >   </attribute>
> > </gbean>
> >
> > Phani, did you change the tcpListenAddress initParams attribute to a
> > real address?
> >
> > Jeff
> >
> >
> > Filip Hanik - Dev Lists wrote:
> >
> >> it would be one of these, they should all be set to a value.
> >>
> >> tcpListenAddress="auto"
> >> tcpListenPort="9015"
> >> tcpSelectorTimeout="100"
> >> tcpThreadCount="6"
> >>
> >> also, if tcpListenAddress says "auto" instead of an IP address, the the
> >> following code gets executed
> >>
> >> public java.net.InetAddress getBind() {
> >>        if (bind == null) {
> >>            try {
> >>                if ("auto".equals(tcpListenAddress))
> >>                    tcpListenAddress =
> >> java.net.InetAddress.getLocalHost().getHostAddress();
> >>                bind = java.net.InetAddress.getByName(tcpListenAddress);
> >>            } catch (IOException ioe) {
> >>                log.error("Failed bind replication listener on
> address:"+
> >> tcpListenAddress, ioe);
> >>            }
> >>        }
> >>      return bind;
> >> }
> >>
> >> so, if there is an error getting the correct address for the localhost
> >> machine, it will return null, and could cause your nullpointer
> exception
> >>
> >> my guess is of course that the attribute is missing all together.
> >>
> >> Filip
> >>
> >>
> >>
> >>
> >> Jeff Genender wrote:
> >>
> >>> Filip,
> >>>
> >>> Thanks for the input...any idea on the missing attribute?
> >>>
> >>> Jeff
> >>>
> >>> Filip Hanik - Dev Lists wrote:
> >>>
> >>>
> >>>> gentlemen,
> >>>> looks like there is an attribute missing from the
> >>>> "<Cluster...>*<Receiver.../>*</Cluster>" element.
> >>>> the ReplicationListener.listen() method just gets the listen address
> (or
> >>>> tries to resolve the name, then gets the port)
> >>>> then it starts up a server socket using NIO.
> >>>>
> >>>> the other error, no active members in group, just means that the
> tomcat
> >>>> instances didn't discover each other using multicast heart beats.
> >>>>
> >>>> Lets get the ReplicationListener error first, then we can move on to
> >>>> membership, can you post your tomcat config file
> >>>> PS. the error is not related to mod_jk, its in the tomcat java code.
> >>>> thanks
> >>>> Filip
> >>>>
> >>>> Phani Madgula wrote:
> >>>>
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> I have been trying to use tomcat clustering with Geronimo for a
> >>>>> customer application. Sometimes, I face the following problem.
> >>>>>
> >>>>>
> >>>>> I downloaded apache2.0.54 and mod_jk_1.2.15 and tested clustering. I
> >>>>> have three machines on a same subnet one windows and other are linux
> >>>>> boxes. I have also enabled IPMulticast and no firewalls between
> >>>>> systems.
> >>>>>
> >>>>> To my observation, session replication is not working. However,
> >>>>> loadbalancer is able to fail-over successfully.
> >>>>>
> >>>>> When I shutdown the instance which is serving the HttpRequests, it
> >>>>> will throw an exception stating "not able to start cluster listener"
> >>>>> and also "no active members in the cluster"
> >>>>>
> >>>>> 11:09:10,572 DEBUG [WebappLoader] Stopping this Loader
> >>>>>
> >>>>> 11:09:10,573 ERROR [ReplicationListener] Unable to start cluster
> >>>>> listener.
> >>>>>
> >>>>> java.lang.NullPointerException
> >>>>>
> >>>>> at
> >>>>> org.apache.catalina.cluster.tcp.ReplicationListener.listen(
> ReplicationListener.java(Compiled
> >>>>>
> >>>>> Code))
> >>>>>
> >>>>> at
> >>>>> org.apache.catalina.cluster.tcp.ReplicationListener.run(
> ReplicationListener.java:125)
> >>>>>
> >>>>>
> >>>>>
> >>>>> at java.lang.Thread.run(Thread.java:570)
> >>>>>
> >>>>> 11:09:10,573 DEBUG [StandardContext] resetContext Geronimo
> >>>>>
> :j2eeType=WebModule,name=//localhost/servlet-examples-cluster,J2EEApplication=none,J2EEServer=none
> >>>>>
> >>>>> null
> >>>>>
> >>>>> 11:09:10,575 DEBUG [StandardContext] Stopping complete
> >>>>>
> >>>>> or
> >>>>>
> >>>>> 11:03:07,998 INFO [DeltaManager] Manager
> [/servlet-examples-cluster]:
> >>>>> skipping state transfer. No members active in cluster group.
> >>>>>
> >>>>> I have tested with both mod_jk_1.2.14 & mod_jk_1.2.15, but failed.
> >>>>>
> >>>>> Any ideas on why this error comes?..
> >>>>>
> >>>>> Thx
> >>>>> phani
> >>>>>
> >>>>>
> >>>
> >>>
> >
> >
>
>

Re: Session replication in Geronimo clustering

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
 >tcpListenAddress=xx.yy.zz.aa

yup, this would cause a null pointer later on if not changed. it would 
have to be a valid value, or "auto", which will decide the IP on its own.

Filip

Jeff Genender wrote:
> Yep...those should be set if the example was followed...
>
> <gbean name="TomcatReceiver"
> class="org.apache.geronimo.tomcat.cluster.ReceiverGBean">
>   <attribute
> name="className">org.apache.catalina.cluster.tcp.ReplicationListener
> </attribute>
>
>   <attribute name="initParams">
>             tcpListenAddress=xx.yy.zz.aa
>             tcpListenPort=4001
>             tcpSelectorTimeout=100
>             tcpThreadCount=6
>   </attribute>
> </gbean>
>
> Phani, did you change the tcpListenAddress initParams attribute to a
> real address?
>
> Jeff
>
>
> Filip Hanik - Dev Lists wrote:
>   
>> it would be one of these, they should all be set to a value.
>>
>> tcpListenAddress="auto"
>> tcpListenPort="9015"
>> tcpSelectorTimeout="100"
>> tcpThreadCount="6"
>>
>> also, if tcpListenAddress says "auto" instead of an IP address, the the
>> following code gets executed
>>
>> public java.net.InetAddress getBind() {
>>        if (bind == null) {
>>            try {
>>                if ("auto".equals(tcpListenAddress))
>>                    tcpListenAddress =
>> java.net.InetAddress.getLocalHost().getHostAddress();
>>                bind = java.net.InetAddress.getByName(tcpListenAddress);
>>            } catch (IOException ioe) {
>>                log.error("Failed bind replication listener on address:"+
>> tcpListenAddress, ioe);
>>            }
>>        }
>>      return bind;
>> }
>>
>> so, if there is an error getting the correct address for the localhost
>> machine, it will return null, and could cause your nullpointer exception
>>
>> my guess is of course that the attribute is missing all together.
>>
>> Filip
>>
>>
>>
>>
>> Jeff Genender wrote:
>>     
>>> Filip,
>>>
>>> Thanks for the input...any idea on the missing attribute?
>>>
>>> Jeff
>>>
>>> Filip Hanik - Dev Lists wrote:
>>>  
>>>       
>>>> gentlemen,
>>>> looks like there is an attribute missing from the
>>>> "<Cluster...>*<Receiver.../>*</Cluster>" element.
>>>> the ReplicationListener.listen() method just gets the listen address (or
>>>> tries to resolve the name, then gets the port)
>>>> then it starts up a server socket using NIO.
>>>>
>>>> the other error, no active members in group, just means that the tomcat
>>>> instances didn't discover each other using multicast heart beats.
>>>>
>>>> Lets get the ReplicationListener error first, then we can move on to
>>>> membership, can you post your tomcat config file
>>>> PS. the error is not related to mod_jk, its in the tomcat java code.
>>>> thanks
>>>> Filip
>>>>
>>>> Phani Madgula wrote:
>>>>    
>>>>         
>>>>> Hi,
>>>>>  
>>>>> I have been trying to use tomcat clustering with Geronimo for a
>>>>> customer application. Sometimes, I face the following problem.
>>>>>  
>>>>>
>>>>> I downloaded apache2.0.54 and mod_jk_1.2.15 and tested clustering. I
>>>>> have three machines on a same subnet one windows and other are linux
>>>>> boxes. I have also enabled IPMulticast and no firewalls between
>>>>> systems.
>>>>>
>>>>> To my observation, session replication is not working. However,
>>>>> loadbalancer is able to fail-over successfully.
>>>>>
>>>>> When I shutdown the instance which is serving the HttpRequests, it
>>>>> will throw an exception stating "not able to start cluster listener"
>>>>> and also "no active members in the cluster"
>>>>>
>>>>> 11:09:10,572 DEBUG [WebappLoader] Stopping this Loader
>>>>>
>>>>> 11:09:10,573 ERROR [ReplicationListener] Unable to start cluster
>>>>> listener.
>>>>>
>>>>> java.lang.NullPointerException
>>>>>
>>>>> at
>>>>> org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationListener.java(Compiled
>>>>>
>>>>> Code))
>>>>>
>>>>> at
>>>>> org.apache.catalina.cluster.tcp.ReplicationListener.run(ReplicationListener.java:125)
>>>>>
>>>>>
>>>>>
>>>>> at java.lang.Thread.run(Thread.java:570)
>>>>>
>>>>> 11:09:10,573 DEBUG [StandardContext] resetContext Geronimo
>>>>> :j2eeType=WebModule,name=//localhost/servlet-examples-cluster,J2EEApplication=none,J2EEServer=none
>>>>>
>>>>> null
>>>>>
>>>>> 11:09:10,575 DEBUG [StandardContext] Stopping complete
>>>>>
>>>>> or
>>>>>
>>>>> 11:03:07,998 INFO [DeltaManager] Manager [/servlet-examples-cluster]:
>>>>> skipping state transfer. No members active in cluster group.
>>>>>
>>>>> I have tested with both mod_jk_1.2.14 & mod_jk_1.2.15, but failed.
>>>>>
>>>>> Any ideas on why this error comes?..
>>>>>  
>>>>> Thx
>>>>> phani
>>>>>       
>>>>>           
>>>   
>>>       
>
>   


Re: Session replication in Geronimo clustering

Posted by Jeff Genender <jg...@apache.org>.
Yep...those should be set if the example was followed...

<gbean name="TomcatReceiver"
class="org.apache.geronimo.tomcat.cluster.ReceiverGBean">
  <attribute
name="className">org.apache.catalina.cluster.tcp.ReplicationListener
</attribute>

  <attribute name="initParams">
            tcpListenAddress=xx.yy.zz.aa
            tcpListenPort=4001
            tcpSelectorTimeout=100
            tcpThreadCount=6
  </attribute>
</gbean>

Phani, did you change the tcpListenAddress initParams attribute to a
real address?

Jeff


Filip Hanik - Dev Lists wrote:
> it would be one of these, they should all be set to a value.
> 
> tcpListenAddress="auto"
> tcpListenPort="9015"
> tcpSelectorTimeout="100"
> tcpThreadCount="6"
> 
> also, if tcpListenAddress says "auto" instead of an IP address, the the
> following code gets executed
> 
> public java.net.InetAddress getBind() {
>        if (bind == null) {
>            try {
>                if ("auto".equals(tcpListenAddress))
>                    tcpListenAddress =
> java.net.InetAddress.getLocalHost().getHostAddress();
>                bind = java.net.InetAddress.getByName(tcpListenAddress);
>            } catch (IOException ioe) {
>                log.error("Failed bind replication listener on address:"+
> tcpListenAddress, ioe);
>            }
>        }
>      return bind;
> }
> 
> so, if there is an error getting the correct address for the localhost
> machine, it will return null, and could cause your nullpointer exception
> 
> my guess is of course that the attribute is missing all together.
> 
> Filip
> 
> 
> 
> 
> Jeff Genender wrote:
>> Filip,
>>
>> Thanks for the input...any idea on the missing attribute?
>>
>> Jeff
>>
>> Filip Hanik - Dev Lists wrote:
>>  
>>> gentlemen,
>>> looks like there is an attribute missing from the
>>> "<Cluster...>*<Receiver.../>*</Cluster>" element.
>>> the ReplicationListener.listen() method just gets the listen address (or
>>> tries to resolve the name, then gets the port)
>>> then it starts up a server socket using NIO.
>>>
>>> the other error, no active members in group, just means that the tomcat
>>> instances didn't discover each other using multicast heart beats.
>>>
>>> Lets get the ReplicationListener error first, then we can move on to
>>> membership, can you post your tomcat config file
>>> PS. the error is not related to mod_jk, its in the tomcat java code.
>>> thanks
>>> Filip
>>>
>>> Phani Madgula wrote:
>>>    
>>>> Hi,
>>>>  
>>>> I have been trying to use tomcat clustering with Geronimo for a
>>>> customer application. Sometimes, I face the following problem.
>>>>  
>>>>
>>>> I downloaded apache2.0.54 and mod_jk_1.2.15 and tested clustering. I
>>>> have three machines on a same subnet one windows and other are linux
>>>> boxes. I have also enabled IPMulticast and no firewalls between
>>>> systems.
>>>>
>>>> To my observation, session replication is not working. However,
>>>> loadbalancer is able to fail-over successfully.
>>>>
>>>> When I shutdown the instance which is serving the HttpRequests, it
>>>> will throw an exception stating "not able to start cluster listener"
>>>> and also "no active members in the cluster"
>>>>
>>>> 11:09:10,572 DEBUG [WebappLoader] Stopping this Loader
>>>>
>>>> 11:09:10,573 ERROR [ReplicationListener] Unable to start cluster
>>>> listener.
>>>>
>>>> java.lang.NullPointerException
>>>>
>>>> at
>>>> org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationListener.java(Compiled
>>>>
>>>> Code))
>>>>
>>>> at
>>>> org.apache.catalina.cluster.tcp.ReplicationListener.run(ReplicationListener.java:125)
>>>>
>>>>
>>>>
>>>> at java.lang.Thread.run(Thread.java:570)
>>>>
>>>> 11:09:10,573 DEBUG [StandardContext] resetContext Geronimo
>>>> :j2eeType=WebModule,name=//localhost/servlet-examples-cluster,J2EEApplication=none,J2EEServer=none
>>>>
>>>> null
>>>>
>>>> 11:09:10,575 DEBUG [StandardContext] Stopping complete
>>>>
>>>> or
>>>>
>>>> 11:03:07,998 INFO [DeltaManager] Manager [/servlet-examples-cluster]:
>>>> skipping state transfer. No members active in cluster group.
>>>>
>>>> I have tested with both mod_jk_1.2.14 & mod_jk_1.2.15, but failed.
>>>>
>>>> Any ideas on why this error comes?..
>>>>  
>>>> Thx
>>>> phani
>>>>       
>>
>>   

Re: Session replication in Geronimo clustering

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
it would be one of these, they should all be set to a value.

tcpListenAddress="auto"
tcpListenPort="9015"
tcpSelectorTimeout="100"
tcpThreadCount="6"

also, if tcpListenAddress says "auto" instead of an IP address, the the 
following code gets executed

public java.net.InetAddress getBind() {
        if (bind == null) {
            try {
                if ("auto".equals(tcpListenAddress))
                    tcpListenAddress = 
java.net.InetAddress.getLocalHost().getHostAddress();
                bind = java.net.InetAddress.getByName(tcpListenAddress);
            } catch (IOException ioe) {
                log.error("Failed bind replication listener on 
address:"+ tcpListenAddress, ioe);
            }
        }
      return bind;
}

so, if there is an error getting the correct address for the localhost 
machine, it will return null, and could cause your nullpointer exception

my guess is of course that the attribute is missing all together.

Filip




Jeff Genender wrote:
> Filip,
>
> Thanks for the input...any idea on the missing attribute?
>
> Jeff
>
> Filip Hanik - Dev Lists wrote:
>   
>> gentlemen,
>> looks like there is an attribute missing from the
>> "<Cluster...>*<Receiver.../>*</Cluster>" element.
>> the ReplicationListener.listen() method just gets the listen address (or
>> tries to resolve the name, then gets the port)
>> then it starts up a server socket using NIO.
>>
>> the other error, no active members in group, just means that the tomcat
>> instances didn't discover each other using multicast heart beats.
>>
>> Lets get the ReplicationListener error first, then we can move on to
>> membership, can you post your tomcat config file
>> PS. the error is not related to mod_jk, its in the tomcat java code.
>> thanks
>> Filip
>>
>> Phani Madgula wrote:
>>     
>>> Hi,
>>>  
>>> I have been trying to use tomcat clustering with Geronimo for a
>>> customer application. Sometimes, I face the following problem.
>>>  
>>>
>>> I downloaded apache2.0.54 and mod_jk_1.2.15 and tested clustering. I
>>> have three machines on a same subnet one windows and other are linux
>>> boxes. I have also enabled IPMulticast and no firewalls between systems.
>>>
>>> To my observation, session replication is not working. However,
>>> loadbalancer is able to fail-over successfully.
>>>
>>> When I shutdown the instance which is serving the HttpRequests, it
>>> will throw an exception stating "not able to start cluster listener"
>>> and also "no active members in the cluster"
>>>
>>> 11:09:10,572 DEBUG [WebappLoader] Stopping this Loader
>>>
>>> 11:09:10,573 ERROR [ReplicationListener] Unable to start cluster
>>> listener.
>>>
>>> java.lang.NullPointerException
>>>
>>> at
>>> org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationListener.java(Compiled
>>> Code))
>>>
>>> at
>>> org.apache.catalina.cluster.tcp.ReplicationListener.run(ReplicationListener.java:125)
>>>
>>>
>>> at java.lang.Thread.run(Thread.java:570)
>>>
>>> 11:09:10,573 DEBUG [StandardContext] resetContext Geronimo
>>> :j2eeType=WebModule,name=//localhost/servlet-examples-cluster,J2EEApplication=none,J2EEServer=none
>>> null
>>>
>>> 11:09:10,575 DEBUG [StandardContext] Stopping complete
>>>
>>> or
>>>
>>> 11:03:07,998 INFO [DeltaManager] Manager [/servlet-examples-cluster]:
>>> skipping state transfer. No members active in cluster group.
>>>
>>> I have tested with both mod_jk_1.2.14 & mod_jk_1.2.15, but failed.
>>>
>>> Any ideas on why this error comes?..
>>>  
>>> Thx
>>> phani
>>>       
>
>   


Re: Session replication in Geronimo clustering

Posted by Jeff Genender <jg...@apache.org>.
Filip,

Thanks for the input...any idea on the missing attribute?

Jeff

Filip Hanik - Dev Lists wrote:
> gentlemen,
> looks like there is an attribute missing from the
> "<Cluster...>*<Receiver.../>*</Cluster>" element.
> the ReplicationListener.listen() method just gets the listen address (or
> tries to resolve the name, then gets the port)
> then it starts up a server socket using NIO.
> 
> the other error, no active members in group, just means that the tomcat
> instances didn't discover each other using multicast heart beats.
> 
> Lets get the ReplicationListener error first, then we can move on to
> membership, can you post your tomcat config file
> PS. the error is not related to mod_jk, its in the tomcat java code.
> thanks
> Filip
> 
> Phani Madgula wrote:
>> Hi,
>>  
>> I have been trying to use tomcat clustering with Geronimo for a
>> customer application. Sometimes, I face the following problem.
>>  
>>
>> I downloaded apache2.0.54 and mod_jk_1.2.15 and tested clustering. I
>> have three machines on a same subnet one windows and other are linux
>> boxes. I have also enabled IPMulticast and no firewalls between systems.
>>
>> To my observation, session replication is not working. However,
>> loadbalancer is able to fail-over successfully.
>>
>> When I shutdown the instance which is serving the HttpRequests, it
>> will throw an exception stating "not able to start cluster listener"
>> and also "no active members in the cluster"
>>
>> 11:09:10,572 DEBUG [WebappLoader] Stopping this Loader
>>
>> 11:09:10,573 ERROR [ReplicationListener] Unable to start cluster
>> listener.
>>
>> java.lang.NullPointerException
>>
>> at
>> org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationListener.java(Compiled
>> Code))
>>
>> at
>> org.apache.catalina.cluster.tcp.ReplicationListener.run(ReplicationListener.java:125)
>>
>>
>> at java.lang.Thread.run(Thread.java:570)
>>
>> 11:09:10,573 DEBUG [StandardContext] resetContext Geronimo
>> :j2eeType=WebModule,name=//localhost/servlet-examples-cluster,J2EEApplication=none,J2EEServer=none
>> null
>>
>> 11:09:10,575 DEBUG [StandardContext] Stopping complete
>>
>> or
>>
>> 11:03:07,998 INFO [DeltaManager] Manager [/servlet-examples-cluster]:
>> skipping state transfer. No members active in cluster group.
>>
>> I have tested with both mod_jk_1.2.14 & mod_jk_1.2.15, but failed.
>>
>> Any ideas on why this error comes?..
>>  
>> Thx
>> phani

Re: Session replication in Geronimo clustering

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
gentlemen,
looks like there is an attribute missing from the 
"<Cluster...>*<Receiver.../>*</Cluster>" element.
the ReplicationListener.listen() method just gets the listen address (or 
tries to resolve the name, then gets the port)
then it starts up a server socket using NIO.

the other error, no active members in group, just means that the tomcat 
instances didn't discover each other using multicast heart beats.

Lets get the ReplicationListener error first, then we can move on to 
membership, can you post your tomcat config file
PS. the error is not related to mod_jk, its in the tomcat java code.
thanks
Filip

Phani Madgula wrote:
> Hi,
>  
> I have been trying to use tomcat clustering with Geronimo for a 
> customer application. Sometimes, I face the following problem.
>  
>
> I downloaded apache2.0.54 and mod_jk_1.2.15 and tested clustering. I 
> have three machines on a same subnet one windows and other are linux 
> boxes. I have also enabled IPMulticast and no firewalls between systems.
>
> To my observation, session replication is not working. However, 
> loadbalancer is able to fail-over successfully.
>
> When I shutdown the instance which is serving the HttpRequests, it 
> will throw an exception stating "not able to start cluster listener" 
> and also "no active members in the cluster"
>
> 11:09:10,572 DEBUG [WebappLoader] Stopping this Loader
>
> 11:09:10,573 ERROR [ReplicationListener] Unable to start cluster listener.
>
> java.lang.NullPointerException
>
> at 
> org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationListener.java(Compiled 
> Code))
>
> at 
> org.apache.catalina.cluster.tcp.ReplicationListener.run(ReplicationListener.java:125)
>
> at java.lang.Thread.run(Thread.java:570)
>
> 11:09:10,573 DEBUG [StandardContext] resetContext Geronimo 
> :j2eeType=WebModule,name=//localhost/servlet-examples-cluster,J2EEApplication=none,J2EEServer=none 
> null
>
> 11:09:10,575 DEBUG [StandardContext] Stopping complete
>
> or
>
> 11:03:07,998 INFO [DeltaManager] Manager [/servlet-examples-cluster]: 
> skipping state transfer. No members active in cluster group.
>
> I have tested with both mod_jk_1.2.14 & mod_jk_1.2.15, but failed.
>
> Any ideas on why this error comes?..
>  
> Thx
> phani


Re: Session replication in Geronimo clustering

Posted by Phani Madgula <ph...@gmail.com>.
Hi Jeff,

Thanks for reply.

Yes, I have read the article and used the applications given there. I tried
this sample on Windows machines and it worked fine. But, with linux boxes
having Geronimo instances and a Windows machine hosting apache WebServer, I
am facing this new error.

As I said earlier, the fail-over is happening, when I shutdown the instance
hosting the HttpSession. But, the Session Replication is not happening. In
the log, I see related messages such as

- Not able to start cluster listener
- No members in the cluster
- not much information in mod_jk.log

And finally, when I shutdown the active cluster member, a new session is
getting created as the session replication is failed. So, contents added
earlier are lost.

I just wanted to know, what might be the cause for this problem?
What are the reasons, normally thought of, when this kind of a situation
occurs? that is, successful failover but no session replication...!

Thanks
Phani



On 3/29/06, Jeff Genender <jg...@apache.org> wrote:
>
> Reading more closely, it looks like you may have read that article based
> on your URLs in your debug output.
>
> Are you sure replication is not working? Did you have an open session,
> kill a server, and check to see if your session is still working?
>
> If that is the error message from the shut down machine, then this may
> be normal.
>
> You should check to be sure your session is still intact after shutting
> down that instance.
>
> Jeff
>
> Jeff Genender wrote:
> > Did you read this and follow along?
> >
> >
> http://opensource.atlassian.com/confluence/oss/display/GERONIMO/Geronimo+Clustering+Example
> >
> > Following the steps in the link should yield you replication.
> >
> > Jeff
> >
> > Phani Madgula wrote:
> >> Hi,
> >>
> >> I have been trying to use tomcat clustering with Geronimo for a
> customer
> >> application. Sometimes, I face the following problem.
> >>
> >>
> >> I downloaded apache2.0.54 and mod_jk_1.2.15 and tested clustering. I
> >> have three machines on a same subnet one windows and other are linux
> >> boxes. I have also enabled IPMulticast and no firewalls between
> systems.
> >>
> >> To my observation, session replication is not working. However,
> >> loadbalancer is able to fail-over successfully.
> >>
> >> When I shutdown the instance which is serving the HttpRequests, it will
> >> throw an exception stating "not able to start cluster listener" and
> also
> >> "no active members in the cluster"
> >>
> >> 11:09:10,572 DEBUG [WebappLoader] Stopping this Loader
> >>
> >> 11:09:10,573 ERROR [ReplicationListener] Unable to start cluster
> listener.
> >>
> >> java.lang.NullPointerException
> >>
> >> at
> >> org.apache.catalina.cluster.tcp.ReplicationListener.listen(
> ReplicationListener.java(Compiled
> >> Code))
> >>
> >> at
> >> org.apache.catalina.cluster.tcp.ReplicationListener.run(
> ReplicationListener.java:125)
> >>
> >> at java.lang.Thread.run(Thread.java:570)
> >>
> >> 11:09:10,573 DEBUG [StandardContext] resetContext Geronimo
> >>
> :j2eeType=WebModule,name=//localhost/servlet-examples-cluster,J2EEApplication=none,J2EEServer=none
> >> null
> >>
> >> 11:09:10,575 DEBUG [StandardContext] Stopping complete
> >>
> >> or
> >>
> >> 11:03:07,998 INFO [DeltaManager] Manager [/servlet-examples-cluster]:
> >> skipping state transfer. No members active in cluster group.
> >>
> >> I have tested with both mod_jk_1.2.14 & mod_jk_1.2.15, but failed.
> >>
> >> Any ideas on why this error comes?..
> >>
> >> Thx
> >> phani
>

Re: Session replication in Geronimo clustering

Posted by Jeff Genender <jg...@apache.org>.
Reading more closely, it looks like you may have read that article based
on your URLs in your debug output.

Are you sure replication is not working? Did you have an open session,
kill a server, and check to see if your session is still working?

If that is the error message from the shut down machine, then this may
be normal.

You should check to be sure your session is still intact after shutting
down that instance.

Jeff

Jeff Genender wrote:
> Did you read this and follow along?
> 
> http://opensource.atlassian.com/confluence/oss/display/GERONIMO/Geronimo+Clustering+Example
> 
> Following the steps in the link should yield you replication.
> 
> Jeff
> 
> Phani Madgula wrote:
>> Hi,
>>  
>> I have been trying to use tomcat clustering with Geronimo for a customer
>> application. Sometimes, I face the following problem.
>>  
>>
>> I downloaded apache2.0.54 and mod_jk_1.2.15 and tested clustering. I
>> have three machines on a same subnet one windows and other are linux
>> boxes. I have also enabled IPMulticast and no firewalls between systems.
>>
>> To my observation, session replication is not working. However,
>> loadbalancer is able to fail-over successfully.
>>
>> When I shutdown the instance which is serving the HttpRequests, it will
>> throw an exception stating "not able to start cluster listener" and also
>> "no active members in the cluster"
>>
>> 11:09:10,572 DEBUG [WebappLoader] Stopping this Loader
>>
>> 11:09:10,573 ERROR [ReplicationListener] Unable to start cluster listener.
>>
>> java.lang.NullPointerException
>>
>> at
>> org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationListener.java(Compiled
>> Code))
>>
>> at
>> org.apache.catalina.cluster.tcp.ReplicationListener.run(ReplicationListener.java:125)
>>
>> at java.lang.Thread.run(Thread.java:570)
>>
>> 11:09:10,573 DEBUG [StandardContext] resetContext Geronimo
>> :j2eeType=WebModule,name=//localhost/servlet-examples-cluster,J2EEApplication=none,J2EEServer=none
>> null
>>
>> 11:09:10,575 DEBUG [StandardContext] Stopping complete
>>
>> or
>>
>> 11:03:07,998 INFO [DeltaManager] Manager [/servlet-examples-cluster]:
>> skipping state transfer. No members active in cluster group.
>>
>> I have tested with both mod_jk_1.2.14 & mod_jk_1.2.15, but failed.
>>
>> Any ideas on why this error comes?..
>>  
>> Thx
>> phani

Re: Session replication in Geronimo clustering

Posted by Jeff Genender <jg...@apache.org>.
Did you read this and follow along?

http://opensource.atlassian.com/confluence/oss/display/GERONIMO/Geronimo+Clustering+Example

Following the steps in the link should yield you replication.

Jeff

Phani Madgula wrote:
> Hi,
>  
> I have been trying to use tomcat clustering with Geronimo for a customer
> application. Sometimes, I face the following problem.
>  
> 
> I downloaded apache2.0.54 and mod_jk_1.2.15 and tested clustering. I
> have three machines on a same subnet one windows and other are linux
> boxes. I have also enabled IPMulticast and no firewalls between systems.
> 
> To my observation, session replication is not working. However,
> loadbalancer is able to fail-over successfully.
> 
> When I shutdown the instance which is serving the HttpRequests, it will
> throw an exception stating "not able to start cluster listener" and also
> "no active members in the cluster"
> 
> 11:09:10,572 DEBUG [WebappLoader] Stopping this Loader
> 
> 11:09:10,573 ERROR [ReplicationListener] Unable to start cluster listener.
> 
> java.lang.NullPointerException
> 
> at
> org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationListener.java(Compiled
> Code))
> 
> at
> org.apache.catalina.cluster.tcp.ReplicationListener.run(ReplicationListener.java:125)
> 
> at java.lang.Thread.run(Thread.java:570)
> 
> 11:09:10,573 DEBUG [StandardContext] resetContext Geronimo
> :j2eeType=WebModule,name=//localhost/servlet-examples-cluster,J2EEApplication=none,J2EEServer=none
> null
> 
> 11:09:10,575 DEBUG [StandardContext] Stopping complete
> 
> or
> 
> 11:03:07,998 INFO [DeltaManager] Manager [/servlet-examples-cluster]:
> skipping state transfer. No members active in cluster group.
> 
> I have tested with both mod_jk_1.2.14 & mod_jk_1.2.15, but failed.
> 
> Any ideas on why this error comes?..
>  
> Thx
> phani