geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Genender <jgenen...@apache.org>
Subject Re: Session replication in Geronimo clustering
Date Wed, 29 Mar 2006 17:16:58 GMT
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
>>>>       
>>
>>   

Mime
View raw message