*
Yes we have <distributable/> in web.xml*
*
Below is the full server.xml for all the tomcats.*
<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
/>
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
<Resource name="xyz" auth="Container" type="javax.sql.DataSource"
driverClassName="xyz.Driver" url="jdbc url"
username="xyz" password="xyz"
maxActive="150" maxIdle="10" maxWait="30000"
removeAbandoned="true" removeAbandonedTimeout="120"
logAbandoned="true" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443"
backlog="100" maxThreads="40000" />
<Engine name="Catalina" defaultHost="localhost" jvmRoute="t5">
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="6">
<Manager className="org.apache.catalina.ha.session.BackupManager"
expireSessionsOnShutdown="false"
notifyListenersOnReplication="true" mapSendOptions="6"/>
<Channel
className="org.apache.catalina.tribes.group.GroupChannel">
<Membership
className="org.apache.catalina.tribes.membership.McastService"
address="228.0.0.4"
port="45564"
frequency="500"
dropTime="30000"/>
<Receiver
className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="auto"
port="4000"
selectorTimeout="5000"
timeout="60000"
maxThreads="6"/>
<Sender
className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
<Transport
className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"
timeout="60000" keepAliveCount="0"/>
</Sender>
<Interceptor
className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
<Interceptor
className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
</Channel>
<Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
filter=".*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*\.html|.*\.css|.*\.txt"/>
<Valve
className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
<ClusterListener
className="org.apache.catalina.ha.session.ClusterSessionListener"/>
<ClusterListener
className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
</Cluster>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</Host>
</Engine>
</Service>
</Server>
*
Below is the context.xml*
<?xml version='1.0' encoding='utf-8'?>
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<ResourceLink name="xyz" global="xyz" type="javax.sql.DataSource"/>
</Context>
still it is throwing error while deploying apps.
WARNING: Unable to send map start message.
Apr 5, 2012 1:37:12 PM org.apache.catalina.ha.session.BackupManager start
SEVERE: Unable to start BackupManager
java.lang.RuntimeException: Unable to start replicated map.
at
org.apache.catalina.tribes.tipis.AbstractReplicatedMap.init(AbstractReplicatedMap.java:230)
Failed to start BackupManager: java.lang.IllegalArgumentException:
Listener already
exists:{}[org.apache.catalina.tribes.tipis.LazyReplicatedMap]
On Fri, Apr 6, 2012 at 2:31 AM, Mark Eggers <[email protected]> wrote:
> Response at the bottom:
>
> /mde/
>
> >________________________________
> > From: Dhaval Jaiswal <[email protected]>
> >To: Tomcat Users List <[email protected]>
> >Sent: Thursday, April 5, 2012 10:28 AM
> >Subject: Re: SEVERE: Unable to start cluster.
> >
> >
> >pfa server.xml
> >
> >The same i am using for all the 10 tomcats.
> >
> >
> >
> >
> >On Thu, Apr 5, 2012 at 9:55 PM, Pid <[email protected]> wrote:
> >
> >On 05/04/2012 15:13, Dhaval Jaiswal wrote:
> >>> I have tested the below cluster manager; as per the instruction i have
> >>> changed. However, when we try to deploy the apps on tomcat it was
> >>> throwing error that
> >>>
> >>> WARNING: Unable to send map start message.
> >>> Apr 5, 2012 1:37:12 PM org.apache.catalina.ha.session.BackupManager
> start
> >>> SEVERE: Unable to start BackupManager
> >>> java.lang.RuntimeException: Unable to start replicated map.
> >>> at
> >>>
> org.apache.catalina.tribes.tipis.AbstractReplicatedMap.init(AbstractReplicatedMap.java:230)
> >>>
> >>> Failed to start BackupManager: java.lang.IllegalArgumentException:
> >>> Listener already
> >>> exists:{}[org.apache.catalina.tribes.tipis.LazyReplicatedMap]
> >>>
> >>>
> >>>
> >>> i am using below server.xml for all the 10 tomcats. Do i have to change
> >>> it for every tomcat. How would i fix it.
> >>>
> >>>
> >>>
> >>> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
> >>> channelSendOptions="6">
> >>> <Manager
> >>> className="org.apache.catalina.ha.session.BackupManager"
> >>> expireSessionsOnShutdown="false"
> >>> notifyListenersOnReplication="true"
> mapSendOptions="6"/>
> >>>
> >>> <Channel
> >>> className="org.apache.catalina.tribes.group.GroupChannel">
> >>> <Membership
> >>> className="org.apache.catalina.tribes.membership.McastService"
> >>> address="228.0.0.4"
> >>> port="45563"
> >>> frequency="500"
> >>> dropTime="30000"/>
> >>> <Receiver
> >>> className="org.apache.catalina.tribes.transport.nio.NioReceiver"
> >>> address="auto"
> >>> port="4000"
> >>> selectorTimeout="5000"
> >>> timeout="60000"
> >>> maxThreads="6"/>
> >>>
> >>> <Sender
> >>>
> className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
> >>> <Transport
> >>>
> className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"
> timeout="60000"
> >>> keepAliveCount="0"/>
> >>> </Sender>
> >>> <Interceptor
> >>>
> className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
> >>> <Interceptor
> >>>
> className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
> >>> <!-- <Interceptor
> >>>
> className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
> >>> -->
> >>> </Channel>
> >>> <Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
> >>>
> >>>
> filter=".*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*\.html|.*\.css|.*\.txt"/>
> >>> <Valve
> >>> className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
> >>> <ClusterListener
> >>> className="org.apache.catalina.ha.session.ClusterSessionListener"/>
> >>> <ClusterListener
> >>>
> className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
> >>> </Cluster>
> >>
> >>
> >>Wow. That's pretty neat, I've never seen Tomcat start up with just the
> >>cluster definition.
> >>
> >>How about you:
> >>
> >>1) remove all comments
> >>2) remove all passwords
> >>3) post the whole server.xml inline in your next reply
>
>
> Dhaval,
>
>
> Please try to avoid posting in HTML. The font is sometimes difficult to
> read.
>
> Please don't cc me. I get the same message on the list, and with about 200
> mail messages per day on this account I might overlook stuff if I get a lot
> of duplicate messages.
>
> Please post stuff inline and not as attachments. While I got the attached
> server.xml file, the list generally strips attachments.
>
> All that being said, here are my comments:
>
> <!-- From your server.xml -->
> <Listener
> className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"
> />
> <Listener
> className="org.apache.catalina.core.JasperListener" />
> <Listener
> className="org.apache.catalina.mbeans.ServerLifecycleListener" />
> <Listener
> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
> />
>
> So you've removed the memory leak prevention listener from your
> server.xml? Is there any reason why you've done that?
>
> <!-- from your server.xml -->
> <Connector port="8080" protocol="HTTP/1.1"
> connectionTimeout="20000"
> redirectPort="8443" />
>
> <Connector port="8009"
> protocol="AJP/1.3"
> redirectPort="8443"
> backlog="100"
> maxThreads="40000" />
>
> No URIEncoding="UTF-8" on your connectors? I checked your web site and
> there doesn't seem to be any characters that would be
> impacted. However, I was thinking that setting UTF-8 on all connectors
> is in general a good thing.
>
> 40000 threads for the AJP connector with only a backlog of 100? I hope that
>
> a) your Apache HTTPD server is configured appropriately
> b) you can have this many file descriptors open
>
> <!-- from your server.xml -->
> <Membership
> className="org.apache.catalina.tribes.membership.McastService"
> address="228.0.0.4"
> port="45564"
> frequency="500"
> dropTime="30000"/>
>
> You said that you use this same server.xml for all 10
> Tomcats. However, in a previous message you said you were trying to
> cluster 7 Tomcats (192.168.3.5 to 192.168.3.11). If you use the same
> multicast address and port for all 10 Tomcats, then all 10 Tomcats
> will be a part of the cluster.
>
> > I have tested the below cluster manager; as per the instruction i have
>
> > changed. However, when we try to deploy the apps on tomcat it was
> > throwing error that
>
> Does this mean that the cluster actually starts without your web
> application? If you've modified the logging.properties file, what does
> the cluster logging file say? Please post the information inline as the
> mailing list tends to strip attachments.
>
> The default dropTime is 3000 ms (3 seconds). Is your network busy
>
> enough so that a 30 second drop time is reasonable? If it is, then
> maybe a better networking infrastructure is in order.
>
> <!-- from your server.xml -->
> <Sender
> className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
> <Transport
> className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"
> timeout="60000"
> keepAliveCount="0"/>
> </Sender>
>
> keepAliveCount="0" ?
>
> From the documentation:
>
> The number of requests that can go through the socket before the
> socket is closed, and reopened for the next request. The default value
> is -1, which is unlimited.
>
> So you're saying here that NO requests can go through the socket
> before the socket is closed? At the best interpretation, you'll get
> one message through the socket, then the socket closes and
> reopens. This doesn't sound very performant.
>
> Other than that, your clustering setup does not look a lot different
> than mine. I place my cluster in the <Host> element since I am
> experimenting with farm deployment. Mine works even when changing from
> the DeltaManager (only three node cluster) to the BackupManager.
>
> What is in your application's context.xml and web.xml files? Please
> post both (inline - the list tends to strip attachments), with
> comments and sensitive information removed.
>
> I suspect that you have a listener defined in either context.xml or
> web.xml.
>
> All you really need to do to get session clustering to work is:
>
> 1. <distributable/> in web.xml
> 2. Make sure that all session objects are serializalble.
>
> Actually there is a bit more, but the above are the basics.
>
> . . . . just my two cents.
> /mde/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
[image: Inline image 2] <http://www.via.com/>
*Dhaval* | Database & System
*E:* [email protected] <[email protected]>| *T:* 080 4043 3000 | *M:* +91
- 8095 397 843
[image: all-icon.jpg] <http://www.via.com/>