tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <r...@apache.org>
Subject Re: 5.5.10 cluster exception
Date Thu, 28 Jul 2005 14:47:40 GMT
Dennis wrote:
> I'm working with the cvs tagged 5.5.10 version of tomcat to check out
> some clustering fixes.
> 
> When I bring a 2nd server into the pool, I get this exception repeated
> every time an mcast packet is received:
> 
> ==CUT==
> java.lang.ArrayIndexOutOfBoundsException
>         at
> java.lang.System.arraycopy(Ljava.lang.Object;ILjava.lang.Object;II)V(Unknown
> Source)
>         at
> org.apache.catalina.cluster.mcast.McastMember.getMember(McastMember.java:181)
>         at
> org.apache.catalina.cluster.mcast.McastServiceImpl.receive(McastServiceImpl.java:209)
>         at
> org.apache.catalina.cluster.mcast.McastServiceImpl$ReceiverThread.run(McastServiceImpl.java:253)
> ==END CUT==
> 
> Here are the relevant lines of code from McastMember.java:
> 
> ==CUT==
> byte[] domaind = new byte[dlen];
> System.arraycopy(data, nlen + 24, domaind, 0, domaind.length);
> ==END CUT==
> 
> I added some debugging to figure out the length of the data.  The
> exception occurs because data.length is 23.  Obviously 23+24 is going to
> throw an ArrayIndexOBE.
> 
> My question is.. is there a configuration thing that is causing data to
> be sent to be less than the desired length?  It appears the data is not
> coming in in the format expected.
> 
> Thoughts?

Your post is OT on this mailing list, but I thought I would play a 
little with the clustering.

This works for me, with this config:
         <Cluster 
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
 
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
                  expireSessionsOnShutdown="false"
                  useDirtyFlag="true"
                  notifyListenersOnReplication="true">

             <Membership
                 className="org.apache.catalina.cluster.mcast.McastService"
                 mcastAddr="228.0.0.4"
                 mcastPort="45564"
                 mcastFrequency="500"
                 mcastClusterDomain="dev"
                 mcastDropTime="3000"/>

             <Receiver
 
className="org.apache.catalina.cluster.tcp.ReplicationListener"
                 tcpListenAddress="auto"
                 tcpListenPort="4002"
                 tcpSelectorTimeout="100"
                 tcpThreadCount="6"/>

             <Sender
 
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
                 replicationMode="pooled"
                 ackTimeout="15000"/>

             <Valve 
className="org.apache.catalina.cluster.tcp.ReplicationValve"
 
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>

             <ClusterListener 
className="org.apache.catalina.cluster.session.ClusterSessionListener"/>

         </Cluster>

The domain feature for membership is new in this release (which caused 
the data packets sent to change).

I recommend trying tomcat-user, or filing a bug if you can give working 
instructions on how to reproduce the problem.

Rémy

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message