you should add the TcpFailureDetector interceptor into the stack, as well as the async interceptor

           <Interceptor 
className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
           <Interceptor 
className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>

these should be defined before your static membership interceptor.
you might also want to add in TCP ping interceptor, before both of the above one

<Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor"/>

that will make sure, the channel doesn't pass up members that don't exist to the cluster above.

also, for your autobind, set it to 0(IIRC) so that you only bind to that port, and no other

Filip

Milan Cvejic wrote:
Hello,
i am having problem with tomcat cluster on the same machine...

This is a config from first node:

<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="4">

<Manager className="org.apache.catalina.ha.session.DeltaManager"
expireSessionsOnShutdown="false"
notifyListenersOnReplication="true"/>


<Channel className="org.apache.catalina.tribes.group.GroupChannel">

<Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter"
replicationMode="fastasyncqueue"
compress="true"
doTransmitterProcessingStats="true"
ackTimeout="15000"
waitForAck="true"
autoConnect="true">

<Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
</Sender>

<Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="127.0.0.1"
port="5000"
autoBind="100"
selectorTimeout="1000"
maxThreads="6" />
<Interceptor className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
<Member className="org.apache.catalina.tribes.membership.StaticMember"
port="4000"
host="127.0.0.1"
uniqueId="{127,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1}"/>
</Interceptor>

</Channel>

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

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

</Cluster>


this is a config from second node:
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="4">

<Manager className="org.apache.catalina.ha.session.DeltaManager"
expireSessionsOnShutdown="false"
notifyListenersOnReplication="true"/>


<Channel className="org.apache.catalina.tribes.group.GroupChannel">

<Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter"
replicationMode="fastasyncqueue"
compress="true"
doTransmitterProcessingStats="true"
ackTimeout="15000"
waitForAck="true"
autoConnect="true">

<Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
</Sender>

<Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="127.0.0.1"
port="4000"
autoBind="100"
selectorTimeout="1000"
maxThreads="6" />

<Interceptor className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
<Member className="org.apache.catalina.tribes.membership.StaticMember"
port="5000"
host="127.0.0.1"
uniqueId="{127,0,0,1,0,0,0,0,0,0,0,0,0,0,0,2}"/>
</Interceptor>

</Channel>

<Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""/>
<Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>

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

</Cluster>


I am having errors like this in logs of first node:

23-Jun-2008 17:04:39 org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request processing
java.lang.NullPointerException
at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:348) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:419) at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:394) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
at java.lang.Thread.run(Thread.java:619)


and error i got from second node is:
23-Jun-2008 16:21:48 org.apache.catalina.ha.tcp.SimpleTcpCluster send

SEVERE: Unable to send message through cluster sender.
org.apache.catalina.tribes.ChannelException: No destination given; No faulty members identified. at org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:194) at org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:175) at org.apache.catalina.ha.tcp.SimpleTcpCluster.send(SimpleTcpCluster.java:835) at org.apache.catalina.ha.tcp.SimpleTcpCluster.sendClusterDomain(SimpleTcpCluster.java:814) at org.apache.catalina.ha.session.JvmRouteBinderValve.sendSessionIDClusterBackup(JvmRouteBinderValve.java:391) at org.apache.catalina.ha.session.JvmRouteBinderValve.changeSessionID(JvmRouteBinderValve.java:362) at org.apache.catalina.ha.session.JvmRouteBinderValve.handleJvmRoute(JvmRouteBinderValve.java:319) at org.apache.catalina.ha.session.JvmRouteBinderValve.handlePossibleTurnover(JvmRouteBinderValve.java:229) at org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:206) at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:419) at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:394) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
at java.lang.Thread.run(Thread.java:619)


Does anyone know what may be the problem?

Thank you for your effort.



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to