tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Mikusa <dmik...@vmware.com>
Subject Re: Tomcat 7 Cluster Issue
Date Fri, 09 Mar 2012 18:02:04 GMT
On Fri, 2012-03-09 at 08:38 -0800, Bruce Pease wrote:
> Good Morning:
>
>
>
> I recently upgraded my tomcat containers from tomcat 6 to tomcat 7.0.26, and
> the jdk from 1.6 to 1.7.

This is a major jump for both Tomcat & the JVM.  Have you considered
rolling back one of them to the previous version?

For example, roll back the JDK to 1.6 and try just the upgrade to Tomcat
7.0.26.

Also, from a Tomcat standpoint, how did you perform the migration?  In
particular with your configuration files?

Dan


> I am now seeing a clustering issue when I start a
> second instance on the same server.  I have tried a few variations of the
> config (address="auto", address="the ip", no address entry, different ports,
> etc.) with no success.  I have included the configurations and error messages
> below.  Thank you in advance for your assistance.
>
>
>
> Error:
>
> Mar 09, 2012 11:16:16 AM org.apache.catalina.tribes.transport.nio.NioReceiver
> listen
>
> SEVERE: Unable to process request in NioReceiver
>
> java.net.SocketException: Invalid argument: no further information
>
>                 at sun.nio.ch.Net.setIntOption0(Native Method)
>
>                 at sun.nio.ch.Net.setSocketOption(Net.java:279)
>
>                 at
> sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:175)
>
>                 at
> sun.nio.ch.SocketAdaptor.setIntOption(SocketAdaptor.java:296)
>
>                 at
> sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:396)
>
>                 at
> org.apache.catalina.tribes.transport.nio.NioReceiver.listen(NioReceiver.java:
> 308)
>
>                 at
> org.apache.catalina.tribes.transport.nio.NioReceiver.run(NioReceiver.java:418
> )
>
>                 at java.lang.Thread.run(Thread.java:722)
>
>
>
> SEVERE: Unable to send message through cluster sender.
>
> org.apache.catalina.tribes.ChannelException: Send failed, attempt:2 max:1;
> Faulty members:tcp://{10, 103, 4, 70}:4021;
>
>                 at
> org.apache.catalina.tribes.transport.nio.ParallelNioSender.doLoop(ParallelNio
> Sender.java:187)
>
>                 at
> org.apache.catalina.tribes.transport.nio.ParallelNioSender.sendMessage(Parall
> elNioSender.java:89)
>
>                 at
> org.apache.catalina.tribes.transport.nio.PooledParallelSender.sendMessage(Poo
> ledParallelSender.java:54)
>
>                 at
> org.apache.catalina.tribes.transport.ReplicationTransmitter.sendMessage(Repli
> cationTransmitter.java:79)
>
>                 at
> org.apache.catalina.tribes.group.ChannelCoordinator.sendMessage(ChannelCoordi
> nator.java:78)
>
>                 at
> org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelIn
> terceptorBase.java:79)
>
>                 at
> org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor.send
> Message(MessageDispatchInterceptor.java:77)
>
>                 at
> org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelIn
> terceptorBase.java:79)
>
>                 at
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.sendMessage(
> TcpFailureDetector.java:89)
>
>                 at
> org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelIn
> terceptorBase.java:79)
>
>                 at
> org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:224)
>
>                 at
> org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:182)
>
>                 at
> org.apache.catalina.ha.tcp.SimpleTcpCluster.send(SimpleTcpCluster.java:804)
>
>                 at
> org.apache.catalina.ha.session.DeltaManager.getAllClusterSessions(DeltaManage
> r.java:830)
>
>                 at
> org.apache.catalina.ha.session.DeltaManager.startInternal(DeltaManager.java:7
> 98)
>
>                 at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>
>                 at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5
> 282)
>
>                 at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>
>                 at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:89
> 5)
>
>                 at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
>
>                 at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
>
>                 at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)
>
>                 at
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599)
>
>                 at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>
>                 at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>
>                 at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>
>                 at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:111
> 0)
>
>                 at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:60
> 3)
>
>                 at java.lang.Thread.run(Thread.java:722)
>
> Caused by: java.net.SocketException: Invalid argument: no further information
>
>                 at sun.nio.ch.Net.setIntOption0(Native Method)
>
>                 at sun.nio.ch.Net.setSocketOption(Net.java:279)
>
>                 at
> sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:175)
>
>                 at
> sun.nio.ch.SocketAdaptor.setIntOption(SocketAdaptor.java:296)
>
>                 at
> sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:396)
>
>                 at
> org.apache.catalina.tribes.transport.nio.NioSender.completeConnect(NioSender.
> java:151)
>
>                 at
> org.apache.catalina.tribes.transport.nio.NioSender.process(NioSender.java:92)
>
>                 at
> org.apache.catalina.tribes.transport.nio.ParallelNioSender.doLoop(ParallelNio
> Sender.java:142)
>
>                 ... 28 more
>
>
>
> Isapi worker.properties:
>
> worker.list=cluster
>
>
>
> # base settings
>
> worker.foundation.type=ajp13
>
> worker.foundation.connect_timeout=60000
>
> worker.foundation.connection_pool_size=100
>
> worker.foundation.connection_pool_timeout=30
>
> worker.foundation.socket_keepalive=false
>
> worker.foundation.socket_timeout=300
>
> worker.foundation.lbfactor=5
>
>
>
> # worker 1 of cluster
>
> worker.tomcat1.reference=worker.foundation
>
> worker.tomcat1.host=10.103.4.70
>
> worker.tomcat1.port=10109
>
> worker.tomcat1.activation=A
>
>
>
> # worker 2 of cluster
>
> worker.tomcat2.reference=worker.foundation
>
> worker.tomcat2.host=10.103.4.70
>
> worker.tomcat2.port=10209
>
> worker.tomcat2.activation=A
>
>
>
> # define the load balancer
>
> worker.cluster.type=lb
>
> worker.cluster.method=B
>
> worker.cluster.balance_workers=tomcat1,tomcat2
>
>
>
>
>
> server.xml instance 1:
>
> <?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.core.JreMemoryLeakPreventionListener"/>
>
>       <Listener
> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
>
>       <Listener
> className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
>
>       <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"/>
>
>       </GlobalNamingResources>
>
>       <Service name="Catalina">
>
>             <Connector port="10180" protocol="HTTP/1.1"
> connectionTimeout="20000" redirectPort="8443"/>
>
>             <Connector port="10109" protocol="AJP/1.3" redirectPort="8443"/>
>
>             <Engine name="Catalina" defaultHost="localhost"
> jvmRoute="tomcat1">
>
>                   <Cluster
> className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
> channelSendOptions="6">
>
>                         <Manager
> className="org.apache.catalina.ha.session.DeltaManager"
> expireSessionsOnShutdown="false" notifyListenersOnReplication="true"/>
>
>                         <Channel
> className="org.apache.catalina.tribes.group.GroupChannel">
>
>                               <Membership
> className="org.apache.catalina.tribes.membership.McastService"
> address="228.0.0.45" port="45564" frequency="500" dropTime="3000"/>
>
>                               <Receiver
> className="org.apache.catalina.tribes.transport.nio.NioReceiver"
> address="auto" port="4021" autoBind="100" selectorTimeout="5000"
> maxThreads="6"/>
>
>                               <Sender
> className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>
>                                     <Transport
> className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
>
>                               </Sender>
>
>                               <Interceptor
> className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/
> >
>
>                               <Interceptor
> className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Int
> erceptor"/>
>
>                         </Channel>
>
>                         <Valve
> className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""/>
>
>                         <Valve
> className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
>
>                         <Deployer
> className="org.apache.catalina.ha.deploy.FarmWarDeployer"
> tempDir="/tmp/war-temp/" deployDir="/tmp/war-deploy/"
> watchDir="/tmp/war-listen/" watchEnabled="false"/>
>
>                         <ClusterListener
> className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
>
>                         <ClusterListener
> className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>
>                   </Cluster>
>
>                   <Realm className="org.apache.catalina.realm.LockOutRealm">
>
>                         <Realm
> className="org.apache.catalina.realm.UserDatabaseRealm"
> resourceName="UserDatabase"/>
>
>                   </Realm>
>
>                   <Host name="localhost" appBase="webapps" unpackWARs="true"
> autoDeploy="true">
>
>                         <Valve
> className="org.apache.catalina.valves.AccessLogValve" directory="logs"
> prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t
> &quot;%r&quot; %s %b"/>
>
>                   </Host>
>
>             </Engine>
>
>       </Service>
>
> </Server>
>
>
>
> Server xml instance 2:
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <Server port="8006" shutdown="SHUTDOWN">
>
>       <Listener className="org.apache.catalina.core.AprLifecycleListener"
> SSLEngine="on"/>
>
>       <Listener className="org.apache.catalina.core.JasperListener"/>
>
>       <Listener
> className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
>
>       <Listener
> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
>
>       <Listener
> className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
>
>       <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"/>
>
>       </GlobalNamingResources>
>
>       <Service name="Catalina">
>
>             <Connector port="10280" protocol="HTTP/1.1"
> connectionTimeout="20000" redirectPort="8443"/>
>
>             <Connector port="10209" protocol="AJP/1.3" redirectPort="8443"/>
>
>             <Engine name="Catalina" defaultHost="localhost"
> jvmRoute="tomcat2">
>
>                   <Cluster
> className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
> channelSendOptions="6">
>
>                         <Manager
> className="org.apache.catalina.ha.session.DeltaManager"
> expireSessionsOnShutdown="false" notifyListenersOnReplication="true"/>
>
>                         <Channel
> className="org.apache.catalina.tribes.group.GroupChannel">
>
>                               <Membership
> className="org.apache.catalina.tribes.membership.McastService"
> address="228.0.0.45" port="45564" frequency="500" dropTime="3000"/>
>
>                               <Receiver
> className="org.apache.catalina.tribes.transport.nio.NioReceiver"
> address="auto" port="4022" autoBind="100" selectorTimeout="5000"
> maxThreads="6"/>
>
>                               <Sender
> className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>
>                                     <Transport
> className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
>
>                               </Sender>
>
>                               <Interceptor
> className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/
> >
>
>                               <Interceptor
> className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Int
> erceptor"/>
>
>                         </Channel>
>
>                         <Valve
> className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""/>
>
>                         <Valve
> className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
>
>                         <Deployer
> className="org.apache.catalina.ha.deploy.FarmWarDeployer"
> tempDir="/tmp/war-temp/" deployDir="/tmp/war-deploy/"
> watchDir="/tmp/war-listen/" watchEnabled="false"/>
>
>                         <ClusterListener
> className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
>
>                         <ClusterListener
> className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>
>                   </Cluster>
>
>                   <Realm className="org.apache.catalina.realm.LockOutRealm">
>
>                         <Realm
> className="org.apache.catalina.realm.UserDatabaseRealm"
> resourceName="UserDatabase"/>
>
>                   </Realm>
>
>                   <Host name="localhost" appBase="webapps" unpackWARs="true"
> autoDeploy="true">
>
>                         <Valve
> className="org.apache.catalina.valves.AccessLogValve" directory="logs"
> prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t
> &quot;%r&quot; %s %b"/>
>
>                   </Host>
>
>             </Engine>
>
>       </Service>
>
> </Server>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Bruce D. Pease
> Technical Team Lead - Web Applications
> CruiseOne(r) <http://www.cruiseone.com/>  & Cruises Inc(tm)
> <http://www.cruisesinc.com/>
> 1201 W. Cypress Creek Road, Suite 100
> Fort Lauderdale, FL 33309-1955
> 954-958-3654 (direct) | 954-958-3665 (fax)
> bpease@wth.com <mailto:sszalay@wth.com>
>
>
>
Mime
View raw message