Re: BackupManager vs DeltaManager

2010-11-01 Thread Ossi
On Fri, Oct 29, 2010 at 1:51 PM, Pid p...@pidster.com wrote:

 On 29/10/2010 11:17, Ossi wrote:
  Hi!
 
  Should BackupManager work well with any number of nodes?

 Yes.

  And with large clusters it should work even better than DeltaManager?

 Yes.  *Should*.

  We have large production clusters (10+) nodes and we have evaluated if we
  can use BackupManager.
 
  In test cluster of 6 nodes it didn't work too well: much higher request
  latency, with logs full of following errors:
 
  2010-09-24 14:17:34,536 ERROR [tomcat-processor-53]
  (org.apache.catalina.tribes.tipis.AbstractReplicatedMap) Unable to
 replicate
  out data for a LazyReplicatedMap.get
  operationorg.apache.catalina.tribes.ChannelException: Operation has timed
  out(3000 ms.).; Faulty members:tcp://{10, 1, 8, 219}:4200;

 It's timing out for some reason.  You could try increasing the timeout.



Yes, I noticed that. However it is using same configs that with DeltaManager
and we didn't get
those same errors with that.

What could be reason for those timeouts? How to know what
operation could be causing the timeout? Like is that on
initialization/starting phase (so, it couldn't connect
at all) or I something in replication just taking a lot of time.

I'll test this with different timeouts.



 Does this occur on all cluster members, or just a few?



Sorry, I don't remember it has been awhile when we did those test and
apparently the logs are gone.
Gotta check this when I test this next time.




 p


  at
 
 org.apache.catalina.tribes.transport.nio.ParallelNioSender.sendMessage(ParallelNioSender.java:97)
 
  at
 
 org.apache.catalina.tribes.transport.nio.PooledParallelSender.sendMessage(PooledParallelSender.java:53)
 
  at
 
 org.apache.catalina.tribes.transport.ReplicationTransmitter.sendMessage(ReplicationTransmitter.java:80)
 
  at
 
 org.apache.catalina.tribes.group.ChannelCoordinator.sendMessage(ChannelCoordinator.java:78)
 
  at
 
 org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
 
  at
 
 org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor.sendMessage(MessageDispatchInterceptor.java:73)
 
  at
 
 org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
 
  at
 
 org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.sendMessage(TcpFailureDetector.java:87)
 
  at
 
 org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
 
  at
  org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:216)
  at
  org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:175)
  at
 org.apache.catalina.tribes.group.RpcChannel.send(RpcChannel.java:89)
  at
 
 org.apache.catalina.tribes.tipis.AbstractReplicatedMap.get(AbstractReplicatedMap.java:844)
 
  at
  org.apache.catalina.session.ManagerBase.findSession(ManagerBase.java:887)
  at
 org.apache.catalina.connector.Request.doGetSession(Request.java:2363)
 
  at
 org.apache.catalina.connector.Request.getSession(Request.java:2098)
  at
 
 org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
 
  at
 
 javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
 
  at
 
 com.sulake.habboweb.util.TomcatSessionFixationPreventerFilter$RequestWrapper.getSession(TomcatSessionFixationPreventerFilter.java:72)
 
  .
 
 
  Yes, I know that documentation says: Downside of the BackupManager: not
  quite as battle tested as the delta manager. Maybe this is it. :)
 
  Regards,
  Ossi
 




BackupManager vs DeltaManager

2010-10-29 Thread Ossi
Hi!

Should BackupManager work well with any number of nodes?
And with large clusters it should work even better than DeltaManager?

We have large production clusters (10+) nodes and we have evaluated if we
can use BackupManager.

In test cluster of 6 nodes it didn't work too well: much higher request
latency, with logs full of following errors:

2010-09-24 14:17:34,536 ERROR [tomcat-processor-53]
(org.apache.catalina.tribes.tipis.AbstractReplicatedMap) Unable to replicate
out data for a LazyReplicatedMap.get
operationorg.apache.catalina.tribes.ChannelException: Operation has timed
out(3000 ms.).; Faulty members:tcp://{10, 1, 8, 219}:4200;
at
org.apache.catalina.tribes.transport.nio.ParallelNioSender.sendMessage(ParallelNioSender.java:97)

at
org.apache.catalina.tribes.transport.nio.PooledParallelSender.sendMessage(PooledParallelSender.java:53)

at
org.apache.catalina.tribes.transport.ReplicationTransmitter.sendMessage(ReplicationTransmitter.java:80)

at
org.apache.catalina.tribes.group.ChannelCoordinator.sendMessage(ChannelCoordinator.java:78)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)

at
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor.sendMessage(MessageDispatchInterceptor.java:73)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)

at
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.sendMessage(TcpFailureDetector.java:87)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)

at
org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:216)
at
org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:175)
at org.apache.catalina.tribes.group.RpcChannel.send(RpcChannel.java:89)
at
org.apache.catalina.tribes.tipis.AbstractReplicatedMap.get(AbstractReplicatedMap.java:844)

at
org.apache.catalina.session.ManagerBase.findSession(ManagerBase.java:887)
at org.apache.catalina.connector.Request.doGetSession(Request.java:2363)

at org.apache.catalina.connector.Request.getSession(Request.java:2098)
at
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)

at
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)

at
com.sulake.habboweb.util.TomcatSessionFixationPreventerFilter$RequestWrapper.getSession(TomcatSessionFixationPreventerFilter.java:72)

.


Yes, I know that documentation says: Downside of the BackupManager: not
quite as battle tested as the delta manager. Maybe this is it. :)

Regards,
Ossi


Deploy and initialize webapps before listening sockets are created?

2010-09-02 Thread Ossi
Hi!

Is it possible to configure Tomcat first to deploy all the webapps and
create listening socket after that?
The problem is following: after Tomcat prints this line:

2010-09-01 09:07:46,454 INFO  [main] (org.apache.coyote.ajp.AjpAprProtocol)
Initializing Coyote AJP/1.3 on ajp-foo-1%2F192.168.0.1-8009

it also opens that socket/port and this proxy_ajp tries to send requests
that address. Problem is that application takes a few minutes to start and
thus
isn't available during that time.

So, it would be great to be able to open the socket only in this phase,
after webapps has been started:
2010-09-01 09:08:50,008 INFO  [main] (org.apache.coyote.ajp.AjpAprProtocol)
Starting Coyote AJP/1.3 on ajp-foo-1%2F192.168.0.1-8009

With one Tomcat this isn't a big problem, but in clustered environment the
other Tomcats might be available, but proxy_ajp may send request for
starting node.

And yes, I know that it is possible to disable certain member of cluster in
Apache's cluster configs, but that is a bit clumsy approach.


Regards,
Ossi


Re: Tomcat 6 clustering and engine's defaulthost

2009-08-17 Thread Ossi
Oh, I think you got me wrong. As I said, by non-existing name I meant a
DNS name or definition in /etc/hosts file, something that is known to ie.
OS.
In all examples there were either localhost or www.somesite.tld, so I
thought that it needs to be either DNS or /etc/hosts.

But it seem that as long as Engine's defaulthost has same name/character
string than Host element host has and that same name is used in all
instances of cluster
everything is fine as long there is ie. Apache httpd taking care of virtual
hosts, if there is any.

Anyway, below is the config of tomcat1. Tomcat2 has same config, but string
tomcat2 instead of tomcat1.

?xml version='1.0' encoding='utf-8'?

Server port=8005 shutdown=SHUTDOWN

  Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=off /
  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 /
  /GlobalNamingResources

  Service name=Catalina
Connector address=tomcat1-private-address port=8080
protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /

Connector address=tomcat1-private-address port=8009
protocol=AJP/1.3 redirectPort=8443 emptySessionPath=true /

Engine name=Catalina defaultHost=somestring
jvmRoute=tomcat1

Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
channelSendOptions=8

  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.5
port=45564
frequency=500
dropTime=3000/
Receiver
className=org.apache.catalina.tribes.transport.nio.NioReceiver
  address=tomcat-private-address1
  port=4200
  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.MessageDispatch15Interceptor/
  /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

  Realm className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase/

  Host name=somestring appBase=webapps

unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

Valve className=org.apache.catalina.valves.AccessLogValve
directory=/home/tomcat/logs/
   prefix=tomcat-private-address1_access_log. suffix=.txt
pattern=common resolveHosts=false/

  Context path=/manager debug=0 privileged=true
   docBase=/home/tomcat/webapps/manager
   Valve className=org.apache.catalina.valves.RemoteAddrValve
allow=192.168.25.188/
  /Context

  /Host

/Engine
  /Service
/Server


Regards,
Ossi

PS: I tried to send this on last week, but noticed only now that this hit
some spam filter, let's see if it is accepted now, after slight changes.


Re: Tomcat 6 clustering and engine's defaulthost

2009-08-13 Thread Ossi
On Wed, Aug 12, 2009 at 5:26 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Ossi [mailto:los...@gmail.com]
  Subject: Tomcat 6 clustering and engine's defaulthost
 
  Looks like if configuring  a Tomcat 6 cluster Engine's and host's
  default host must be localhost, ie.
 
  If having something else than localhost, an error is logged:
  2009-04-03 12:48:15,492 WARN [pool-2-thread-1]
  (org.apache.catalina.ha.ClusterListener) Context manager doesn't
  exist:private-tomcat1#

 It would be more informative if you posted the configuration that produces
 the error rather than one that doesn't.

  Since we are planning to run different Tomcat servers on the same box,
  each with their own ip, so it would seem to be more convenient if Engine
  could use the same address.

 The name of the Host has nothing to do with the IP address it's listening
 on.  Again, post the server.xml you're having trouble with.


Yep, I noticed that.

Problem occurred when we had in server 1:
Engine name=Catalina defaultHost=private-tomcat1
jvmRoute=route1
and in server 2:
Engine name=Catalina defaultHost=private-tomcat2
jvmRoute=route2

I tested and noticed If both servers have same defaultHost like localhost
or foobar it seems to work without logged warning or errors (as long as
the same
name is used in the Host element, ie:
  Host name=foobar appBase=webapps
  ..
  /Host

So, maybe my question is that is there any harm if I use random,
non-existing names as defaultHost for Engine?
For what it is used for? Other than mapping engine to some host element
and apparently it used somehow to identify cluster members?

And thanks for you're reply.

Regards,
Ossi


Re: Tomcat 6 clustering and engine's defaulthost

2009-08-13 Thread Ossi
 Yes, it will be harmful.



How it is harmful?
In my example the non-existing name (not in DNS nor hosts file) is matches
the name attribute of the only Host element, so that is as manual instructs.
And btw, we're using Apache httpd in front of Tomcat cluster, if that
happens to matter in this case.

Regards,
Ossi




 The manual documents say:

  http://tomcat.apache.org/tomcat-6.0-doc/config/engine.html

 The default host name, which identifies the Host that will process
 requests directed to host names on this server, but which are not configured
 in this configuration file. This name MUST match the name attributes of one
 of the Host elements nested immediately inside.

 p


 And thanks for you're reply.

 Regards,
 Ossi



 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Tomcat 6 clustering and engine's defaulthost

2009-08-12 Thread Ossi
hi!

Looks like if configuring  a Tomcat 6 cluster Engine's and host's default
host must be localhost, ie.

Engine name=Catalina defaultHost=localhost
jvmRoute=private-tomcat1

 Host name=localhost appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

If having something else than localhost, an error is logged:

2009-04-03 12:48:15,492 WARN [pool-2-thread-1]
(org.apache.catalina.ha.ClusterListener) Context manager doesn't
exist:private-tomcat1#

Since we are planning to run different Tomcat servers on the same box, each
with their own ip, so it would seem to be more convenient if Engine could
use the same address.

 Regards,
Ossi