You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Milan Cvejic <m....@inbox-online.com> on 2008/06/23 17:11:49 UTC

Tomcat cluster problem - null pointer exeptions - bad members

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.

-- 
Milan Cvejić
Sistem Administrator
Inbox d.o.o.
Software for Internet
Bulevar AVNOJa 99, 11000 Beograd, Srbija
tel +381 11 313 07 21
fax +381 11 313 37 34
m.cvejic@inbox-online.com
www.inbox-online.com



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


Re: Tomcat cluster problem - null pointer exeptions - bad members

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org