Re: Tomcat 5.5.15 Clustering ?

2006-02-24 Thread Filip Hanik - Dev Lists
APR is not yet planned for the clustering component. but is on the to do 
list
waitForAck is not related to APR, its a NIO problem between Java and 
your OS platform.



Filip

David Avenante wrote:

Ok so question .. if I configure my tomcat with apr (Apache Portable
Runtime)
it's isue be solved ?

I've listen that futur version of Tomcat will embed APR as natif and i can
run Tomcat
without apache in fronted with same performance and with support of other
scripring language like PHP 

Is it true ? ;)

On 2/17/06, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:
  

you're welcome, glad I could help.

there is one problem that you have on your linux box, NIO is not working
properly,
so disabling acknowledgements solved that problem (waitForAck=false)

Filip


David Avenante wrote:


OK i continu to explore this multicast problem on my boxes

So what i've learn 

I learn that it's right to develop J2EE application on Linux.
I can see very quickly problem that i can find in production
  

infrastructure.


i'm sure on windows all my problemes was be masked.

It's improve my knlowledge of Linux system and network.

It's fun for a developper like me too learn about system.
Now i need to modifiy my real application to support clustering.

Thank you again ;)



On 2/17/06, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:

  

Perfect David, and as far as I can tell, the latter sequence that you
present, clustering and session replication is working just fine.
now, obviously your system is not setup correctly to bind an interface
to the multicasting, so don't do it if it works without it.
so what have you learned? :)

Filip



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5.15 Clustering ?

2006-02-17 Thread David Avenante
-- Ok so let's go ;)

My two tomcat are stopped and i run the MCaster on both box

From agnes
java -cp tomcat-replication.jar MCaster 224.0.0.1 45564 ovea-inspiron
Usage MCaster [address port message]
BEGIN TO RECEIVE
SENT:ovea-inspiron1
RECEIVED:ovea-inspiron1 FROM /192.168.2.102:45564
BEGIN TO RECEIVE
RECEIVED:agnes3 FROM /192.168.2.103:45564
SENT:ovea-inspiron2
BEGIN TO RECEIVE
RECEIVED:ovea-inspiron2 FROM /192.168.2.102:45564
SENT:ovea-inspiron3
BEGIN TO RECEIVE
RECEIVED:agnes4 FROM /192.168.2.103:45564
SENT:ovea-inspiron4
BEGIN TO RECEIVE
RECEIVED:ovea-inspiron3 FROM /192.168.2.102:45564
SENT:ovea-inspiron5

From ovea-inspiron
java -cp tomcat-replication.jar MCaster 224.0.0.1 45564 agnes
Usage MCaster [address port message]
BEGIN TO RECEIVE
RECEIVED:agnes1 FROM /192.168.2.103:45564
SENT:agnes1
BEGIN TO RECEIVE
SENT:agnes2
RECEIVED:agnes2 FROM /192.168.2.103:45564
SENT:agnes3
BEGIN TO RECEIVE
RECEIVED:ovea-inspiron1 FROM /192.168.2.102:45564
SENT:agnes4
BEGIN TO RECEIVE
RECEIVED:agnes3 FROM /192.168.2.103:45564
SENT:agnes5
BEGIN TO RECEIVE
RECEIVED:ovea-inspiron2 FROM /192.168.2.102:45564

Come on ...

I - WITH mcastBindAddress

Shutdown the MCaster program = Ok
hutdown both Tomcats - delete or archive your logs = Ok
set waitForAck=false on your Sender element = Ok
Start tomcat 1 = OK ... logs are :

Feb 17, 2006 12:09:08 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/opt/sun-jdk-1.5.0.06/jre/lib/i386/client:/opt/sun-jdk-1.5.0.06/jre/lib/i386:/opt/sun-jdk-1.5.0.06/jre/../lib/i386
Feb 17, 2006 12:09:08 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Feb 17, 2006 12:09:08 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 995 ms
Feb 17, 2006 12:09:08 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 17, 2006 12:09:08 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.15
Feb 17, 2006 12:09:08 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Feb 17, 2006 12:09:08 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start
INFO: Cluster is about to start
Feb 17, 2006 12:09:08 PM
org.apache.catalina.cluster.tcp.ReplicationTransmitter start
INFO: Start ClusterSender at cluster
Catalina:type=Cluster,host=localhost with name
Catalina:type=ClusterSender,host=localhost
Feb 17, 2006 12:09:08 PM
org.apache.catalina.cluster.mcast.McastServiceImpl setupSocket
INFO: Setting multihome multicast interface to:/192.168.2.102
Feb 17, 2006 12:09:08 PM org.apache.catalina.cluster.mcast.McastService start
INFO: Sleeping for 4000 secs to establish cluster membership
Feb 17, 2006 12:09:12 PM
org.apache.catalina.cluster.mcast.McastService registerMBean
INFO: membership mbean registered
(Catalina:type=ClusterMembership,host=localhost)
Feb 17, 2006 12:09:12 PM
org.apache.catalina.cluster.session.JvmRouteBinderValve start
INFO: JvmRouteBinderValve started
Feb 17, 2006 12:09:13 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive cluster-1.0-SNAPSHOT.war
Feb 17, 2006 12:09:13 PM org.apache.catalina.cluster.session.DeltaManager start
INFO: Register manager /cluster-1.0-SNAPSHOT to cluster element Host
with name localhost
Feb 17, 2006 12:09:13 PM org.apache.catalina.cluster.session.DeltaManager start
INFO: Starting clustering manager at /cluster-1.0-SNAPSHOT
Feb 17, 2006 12:09:13 PM
org.apache.catalina.cluster.session.DeltaManager getAllClusterSessions
INFO: Manager [/cluster-1.0-SNAPSHOT]: skipping state transfer. No
members active in cluster group.
Feb 17, 2006 12:09:13 PM org.apache.jasper.EmbeddedServletOptions init
SEVERE: The scratchDir you specified:
/opt/java/appserver/tomcat-5.5.15/work/Catalina/localhost/cluster-1.0-SNAPSHOT
is unusable.
Feb 17, 2006 12:09:15 PM org.apache.tapestry.ApplicationServlet init
INFO: Initialized application servlet 'cluster': 911 millis to create
HiveMind Registry, 1,986 millis overall.
Feb 17, 2006 12:09:16 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Feb 17, 2006 12:09:16 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Feb 17, 2006 12:09:16 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/27  config=null
Feb 17, 2006 12:09:16 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Feb 17, 2006 12:09:16 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7732 ms

Start tomcat 2 = OK ... logs are

Feb 17, 2006 12:15:48 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:

Re: Tomcat 5.5.15 Clustering ?

2006-02-17 Thread Filip Hanik - Dev Lists
Perfect David, and as far as I can tell, the latter sequence that you 
present, clustering and session replication is working just fine.
now, obviously your system is not setup correctly to bind an interface 
to the multicasting, so don't do it if it works without it.

so what have you learned? :)

Filip



David Avenante wrote:

-- Ok so let's go ;)

My two tomcat are stopped and i run the MCaster on both box

From agnes
java -cp tomcat-replication.jar MCaster 224.0.0.1 45564 ovea-inspiron
Usage MCaster [address port message]
BEGIN TO RECEIVE
SENT:ovea-inspiron1
RECEIVED:ovea-inspiron1 FROM /192.168.2.102:45564
BEGIN TO RECEIVE
RECEIVED:agnes3 FROM /192.168.2.103:45564
SENT:ovea-inspiron2
BEGIN TO RECEIVE
RECEIVED:ovea-inspiron2 FROM /192.168.2.102:45564
SENT:ovea-inspiron3
BEGIN TO RECEIVE
RECEIVED:agnes4 FROM /192.168.2.103:45564
SENT:ovea-inspiron4
BEGIN TO RECEIVE
RECEIVED:ovea-inspiron3 FROM /192.168.2.102:45564
SENT:ovea-inspiron5

From ovea-inspiron
java -cp tomcat-replication.jar MCaster 224.0.0.1 45564 agnes
Usage MCaster [address port message]
BEGIN TO RECEIVE
RECEIVED:agnes1 FROM /192.168.2.103:45564
SENT:agnes1
BEGIN TO RECEIVE
SENT:agnes2
RECEIVED:agnes2 FROM /192.168.2.103:45564
SENT:agnes3
BEGIN TO RECEIVE
RECEIVED:ovea-inspiron1 FROM /192.168.2.102:45564
SENT:agnes4
BEGIN TO RECEIVE
RECEIVED:agnes3 FROM /192.168.2.103:45564
SENT:agnes5
BEGIN TO RECEIVE
RECEIVED:ovea-inspiron2 FROM /192.168.2.102:45564

Come on ...

I - WITH mcastBindAddress

Shutdown the MCaster program = Ok
hutdown both Tomcats - delete or archive your logs = Ok
set waitForAck=false on your Sender element = Ok
Start tomcat 1 = OK ... logs are :

Feb 17, 2006 12:09:08 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/opt/sun-jdk-1.5.0.06/jre/lib/i386/client:/opt/sun-jdk-1.5.0.06/jre/lib/i386:/opt/sun-jdk-1.5.0.06/jre/../lib/i386
Feb 17, 2006 12:09:08 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Feb 17, 2006 12:09:08 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 995 ms
Feb 17, 2006 12:09:08 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 17, 2006 12:09:08 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.15
Feb 17, 2006 12:09:08 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Feb 17, 2006 12:09:08 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start
INFO: Cluster is about to start
Feb 17, 2006 12:09:08 PM
org.apache.catalina.cluster.tcp.ReplicationTransmitter start
INFO: Start ClusterSender at cluster
Catalina:type=Cluster,host=localhost with name
Catalina:type=ClusterSender,host=localhost
Feb 17, 2006 12:09:08 PM
org.apache.catalina.cluster.mcast.McastServiceImpl setupSocket
INFO: Setting multihome multicast interface to:/192.168.2.102
Feb 17, 2006 12:09:08 PM org.apache.catalina.cluster.mcast.McastService start
INFO: Sleeping for 4000 secs to establish cluster membership
Feb 17, 2006 12:09:12 PM
org.apache.catalina.cluster.mcast.McastService registerMBean
INFO: membership mbean registered
(Catalina:type=ClusterMembership,host=localhost)
Feb 17, 2006 12:09:12 PM
org.apache.catalina.cluster.session.JvmRouteBinderValve start
INFO: JvmRouteBinderValve started
Feb 17, 2006 12:09:13 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive cluster-1.0-SNAPSHOT.war
Feb 17, 2006 12:09:13 PM org.apache.catalina.cluster.session.DeltaManager start
INFO: Register manager /cluster-1.0-SNAPSHOT to cluster element Host
with name localhost
Feb 17, 2006 12:09:13 PM org.apache.catalina.cluster.session.DeltaManager start
INFO: Starting clustering manager at /cluster-1.0-SNAPSHOT
Feb 17, 2006 12:09:13 PM
org.apache.catalina.cluster.session.DeltaManager getAllClusterSessions
INFO: Manager [/cluster-1.0-SNAPSHOT]: skipping state transfer. No
members active in cluster group.
Feb 17, 2006 12:09:13 PM org.apache.jasper.EmbeddedServletOptions init
SEVERE: The scratchDir you specified:
/opt/java/appserver/tomcat-5.5.15/work/Catalina/localhost/cluster-1.0-SNAPSHOT
is unusable.
Feb 17, 2006 12:09:15 PM org.apache.tapestry.ApplicationServlet init
INFO: Initialized application servlet 'cluster': 911 millis to create
HiveMind Registry, 1,986 millis overall.
Feb 17, 2006 12:09:16 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Feb 17, 2006 12:09:16 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Feb 17, 2006 12:09:16 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/27  config=null
Feb 17, 2006 12:09:16 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Feb 17, 2006 12:09:16 PM 

Re: Tomcat 5.5.15 Clustering ?

2006-02-17 Thread David Avenante
OK i continu to explore this multicast problem on my boxes

So what i've learn 

I learn that it's right to develop J2EE application on Linux.
I can see very quickly problem that i can find in production infrastructure.
i'm sure on windows all my problemes was be masked.

It's improve my knlowledge of Linux system and network.

It's fun for a developper like me too learn about system.
Now i need to modifiy my real application to support clustering.

Thank you again ;)



On 2/17/06, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:

 Perfect David, and as far as I can tell, the latter sequence that you
 present, clustering and session replication is working just fine.
 now, obviously your system is not setup correctly to bind an interface
 to the multicasting, so don't do it if it works without it.
 so what have you learned? :)

 Filip



 David Avenante wrote:
  -- Ok so let's go ;)
 
  My two tomcat are stopped and i run the MCaster on both box
 
  From agnes
  java -cp tomcat-replication.jar MCaster 224.0.0.1 45564 ovea-inspiron
  Usage MCaster [address port message]
  BEGIN TO RECEIVE
  SENT:ovea-inspiron1
  RECEIVED:ovea-inspiron1 FROM /192.168.2.102:45564
  BEGIN TO RECEIVE
  RECEIVED:agnes3 FROM /192.168.2.103:45564
  SENT:ovea-inspiron2
  BEGIN TO RECEIVE
  RECEIVED:ovea-inspiron2 FROM /192.168.2.102:45564
  SENT:ovea-inspiron3
  BEGIN TO RECEIVE
  RECEIVED:agnes4 FROM /192.168.2.103:45564
  SENT:ovea-inspiron4
  BEGIN TO RECEIVE
  RECEIVED:ovea-inspiron3 FROM /192.168.2.102:45564
  SENT:ovea-inspiron5
 
  From ovea-inspiron
  java -cp tomcat-replication.jar MCaster 224.0.0.1 45564 agnes
  Usage MCaster [address port message]
  BEGIN TO RECEIVE
  RECEIVED:agnes1 FROM /192.168.2.103:45564
  SENT:agnes1
  BEGIN TO RECEIVE
  SENT:agnes2
  RECEIVED:agnes2 FROM /192.168.2.103:45564
  SENT:agnes3
  BEGIN TO RECEIVE
  RECEIVED:ovea-inspiron1 FROM /192.168.2.102:45564
  SENT:agnes4
  BEGIN TO RECEIVE
  RECEIVED:agnes3 FROM /192.168.2.103:45564
  SENT:agnes5
  BEGIN TO RECEIVE
  RECEIVED:ovea-inspiron2 FROM /192.168.2.102:45564
 
  Come on ...
 
  I - WITH mcastBindAddress
 
  Shutdown the MCaster program = Ok
  hutdown both Tomcats - delete or archive your logs = Ok
  set waitForAck=false on your Sender element = Ok
  Start tomcat 1 = OK ... logs are :
 
  Feb 17, 2006 12:09:08 PM org.apache.catalina.core.AprLifecycleListener
  lifecycleEvent
  INFO: The Apache Tomcat Native library which allows optimal
  performance in production environments was not found on the
  java.library.path:
  /opt/sun-jdk-1.5.0.06/jre/lib/i386/client:/opt/sun-jdk-1.5.0.06
 /jre/lib/i386:/opt/sun-jdk-1.5.0.06/jre/../lib/i386
  Feb 17, 2006 12:09:08 PM org.apache.coyote.http11.Http11BaseProtocolinit
  INFO: Initializing Coyote HTTP/1.1 on http-8080
  Feb 17, 2006 12:09:08 PM org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 995 ms
  Feb 17, 2006 12:09:08 PM org.apache.catalina.core.StandardService start
  INFO: Starting service Catalina
  Feb 17, 2006 12:09:08 PM org.apache.catalina.core.StandardEngine start
  INFO: Starting Servlet Engine: Apache Tomcat/5.5.15
  Feb 17, 2006 12:09:08 PM org.apache.catalina.core.StandardHost start
  INFO: XML validation disabled
  Feb 17, 2006 12:09:08 PM
 org.apache.catalina.cluster.tcp.SimpleTcpCluster start
  INFO: Cluster is about to start
  Feb 17, 2006 12:09:08 PM
  org.apache.catalina.cluster.tcp.ReplicationTransmitter start
  INFO: Start ClusterSender at cluster
  Catalina:type=Cluster,host=localhost with name
  Catalina:type=ClusterSender,host=localhost
  Feb 17, 2006 12:09:08 PM
  org.apache.catalina.cluster.mcast.McastServiceImpl setupSocket
  INFO: Setting multihome multicast interface to:/192.168.2.102
  Feb 17, 2006 12:09:08 PM org.apache.catalina.cluster.mcast.McastServicestart
  INFO: Sleeping for 4000 secs to establish cluster membership
  Feb 17, 2006 12:09:12 PM
  org.apache.catalina.cluster.mcast.McastService registerMBean
  INFO: membership mbean registered
  (Catalina:type=ClusterMembership,host=localhost)
  Feb 17, 2006 12:09:12 PM
  org.apache.catalina.cluster.session.JvmRouteBinderValve start
  INFO: JvmRouteBinderValve started
  Feb 17, 2006 12:09:13 PM org.apache.catalina.startup.HostConfigdeployWAR
  INFO: Deploying web application archive cluster-1.0-SNAPSHOT.war
  Feb 17, 2006 12:09:13 PM
 org.apache.catalina.cluster.session.DeltaManager start
  INFO: Register manager /cluster-1.0-SNAPSHOT to cluster element Host
  with name localhost
  Feb 17, 2006 12:09:13 PM
 org.apache.catalina.cluster.session.DeltaManager start
  INFO: Starting clustering manager at /cluster-1.0-SNAPSHOT
  Feb 17, 2006 12:09:13 PM
  org.apache.catalina.cluster.session.DeltaManager getAllClusterSessions
  INFO: Manager [/cluster-1.0-SNAPSHOT]: skipping state transfer. No
  members active in cluster group.
  Feb 17, 2006 12:09:13 PM org.apache.jasper.EmbeddedServletOptions init
  SEVERE: The scratchDir you specified:
  

Re: Tomcat 5.5.15 Clustering ?

2006-02-17 Thread Filip Hanik - Dev Lists

you're welcome, glad I could help.

there is one problem that you have on your linux box, NIO is not working 
properly,

so disabling acknowledgements solved that problem (waitForAck=false)

Filip


David Avenante wrote:

OK i continu to explore this multicast problem on my boxes

So what i've learn 

I learn that it's right to develop J2EE application on Linux.
I can see very quickly problem that i can find in production infrastructure.
i'm sure on windows all my problemes was be masked.

It's improve my knlowledge of Linux system and network.

It's fun for a developper like me too learn about system.
Now i need to modifiy my real application to support clustering.

Thank you again ;)



On 2/17/06, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:
  

Perfect David, and as far as I can tell, the latter sequence that you
present, clustering and session replication is working just fine.
now, obviously your system is not setup correctly to bind an interface
to the multicasting, so don't do it if it works without it.
so what have you learned? :)

Filip




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5.15 Clustering ?

2006-02-16 Thread David Avenante
Now tell us
1. OS Version
 - gentoo with 2.6.15 kernel

2. Java version
 - Sun JDK 1.5.0.06


OK in response of your previous message.
I start the two servers and run MCast
output is :
On agnes : java -cp tomcat-replication.jar MCaster 224.0.0.1 45564 ovea-inspiron
Usage MCaster [address port message]
BEGIN TO RECEIVE
SENT:ovea-inspiron1
RECEIVED:ovea-inspiron1 FROM /192.168.2.102:45564
BEGIN TO RECEIVE
SENT:ovea-inspiron2
RECEIVED:▒��(f▒tcp://192.168.2.102:400cluster1 FROM /192.168.2.102:45564
SENT:ovea-inspiron3
BEGIN TO RECEIVE
RECEIVED:�t�(g▒tcp://192.168.2.103:400cluster1 FROM /192.168.2.103:45564
SENT:ovea-inspiron4
BEGIN TO RECEIVE
RECEIVED:��(f▒tcp://192.168.2.102:400cluster1 FROM /192.168.2.102:45564

On ovea-inspiron : java -cp tomcat-replication.jar MCaster 224.0.0.1 45564 agnes
Usage MCaster [address port message]
BEGIN TO RECEIVE
SENT:agnes1
RECEIVED:agnes1 FROM /192.168.2.103:45564
BEGIN TO RECEIVE
RECEIVED:gm???f▒tcp://192.168.2.102:400cluster1 FROM /192.168.2.102:45564
SENT:agnes2
BEGIN TO RECEIVE
RECEIVED:▒g▒tcp://192.168.2.103:400cluster1 FROM /192.168.2.103:45564
SENT:agnes3
BEGIN TO RECEIVE
RECEIVED:k_???f▒tcp://192.168.2.102:400cluster1 FROM /192.168.2.102:45564
SENT:agnes4

For the next steps wich configuration do you want ?
with or without mcastBindAddress in server.xml configuration

Then follow these steps
1. Shutdown the MCaster program
2. Shutdown both Tomcats - delete or archive your logs
3. Set waitForAck=false on your Sender element
4. Start tomcat 1
5. Wait 10 seconds
6. Start tomcat 2
7. Send us your new output from tomcat





On 2/16/06, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:

 ok, you didn't read my message again, that's ok.

 Now tell us
 1. OS Version
 2. Java version

 Then follow these steps
 1. Shutdown the MCaster program
 2. Shutdown both Tomcats - delete or archive your logs
 3. Set waitForAck=false on your Sender element
 4. Start tomcat 1
 5. Wait 10 seconds
 6. Start tomcat 2
 7. Send us your new output from tomcat

 Filip


 David Avenante wrote:
  See my previous post
  it's
 
   on agnes the command java -cp tomcat-replication.jar MCaster
  224.0.0.1 45564 ovea-inspiron
   and on ovea-inspiron start comand : java -cp
  tomcat-replication.jar MCaster 224.0.0.1 45564 agnes
 
   the ouput as the same a the other tests but tcpdump info are now :
   on agnes
   12:43: 02.336748 IP ovea-inspiron.45566 
  all-systems.mcast.net.45566: UDP, length 7
   12:43:02.395214 IP agnes.45564  all-systems.mcast.net.45564:
  UDP, length 15
   12:43:05.400696 IP agnes.45564  all-systems.mcast.net.45564:
  UDP, length 15
   12:43:05.506764 IP ovea-inspiron.45566 
  all-systems.mcast.net.45566: UDP, length 7
   12:43:08.405287 IP agnes.45564  all-systems.mcast.net.45564:
  UDP, length 15
   12:43:08.604056 IP ovea-inspiron.45566 
  all-systems.mcast.net.45566: UDP, length 7
   12:43:11.410371 IP agnes.45564  all-systems.mcast.net.45564 :
  UDP, length 15
   12:43:11.608944 IP ovea-inspiron.45566 
  all-systems.mcast.net.45566: UDP, length 7
 
   on ovea-inspiron
   12:45:55.861466 IP ovea-inspiron.45566 
  all-systems.mcast.net.45566:UDP, length 7
   12:45:57.983294 IP AGNES.45564  all-systems.mcast.net.45564:
  UDP, length 14
   12:45:58.914085 IP ovea-inspiron.45566 
  all-systems.mcast.net.45566:UDP, length 7
   12:46:00.988429 IP AGNES.45564  all-systems.mcast.net.45564:
  UDP, length 15
   12:46:01.918123 IP ovea-inspiron.45566 
  all-systems.mcast.net.45566:UDP , length 7
 
 
 
  On 2/15/06, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:
 
  ok, we will work through it one item at the time.
 
  show me the output from both servers MCaster program (not the tcpdump)
  when they run simultanously.
 
  Filip
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Tomcat 5.5.15 Clustering ?

2006-02-15 Thread David Avenante
Yes MULTICAST is enabled i see that by too fact :

first,
ifconfig eth0 :

eth0  Link encap:Ethernet  HWaddr 00:13:D4:45:A6:3F
  inet addr:192.168.2.102  Bcast:192.168.2.255  Mask:255.255.255.0
  UP BROADCAST NOTRAILERS RUNNING ALLMULTI MULTICAST  MTU:1500
Metric:1
  RX packets:264493 errors:0 dropped:0 overruns:0 frame:0
  TX packets:292063 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:98079150 (93.5 Mb)  TX bytes:41007393 (39.1 Mb)

ALLMULTI and MULTICAST is enabled on two serveur interface.

second,

as you see in my first post tcpdump track the UDP messages send between
server.


For sticky_session=true i' m not agree with you.
In the connector documentation (see
http://tomcat.apache.org/connectors-doc/config/workers.html)
= Set sticky_session to *False* when Tomcat is using a Session Manager
which can persist session data across multiple instances of Tomcat
It' s my situation.

So i' m alway in the trouble by thanks a lot for the verification ;)


On 2/15/06, Peter Rossbach [EMAIL PROTECTED] wrote:

 Hey,

 1)  Clustering need sticky_session=true and is only design for
 failover (see servlet spec).
 2)  Are your sure that MULTICAST is enabled at eth0?

 regards
 Peter
 [EMAIL PROTECTED]



 Am 15.02.2006 um 02:26 schrieb David Avenante:

  Hi,
 
  I' ve try to use Tomcat 5.5.15 in cluster mod. And after some work on
  configuration and test
  i seems to be on limit of my all possibilities ;)
 
  I try to use two tomcat in cluster with apache web server and
  mod_jk as
  connector.
 
  my Apache configuration look like :
 
 
  # workers.properties
 
  ps=/
 
  # List the workers name
  worker.list=loadbalancer
 
  # 
  # First worker
  # 
  worker.node01.port=8009
  worker.node01.host=agnes
  worker.node01.type=ajp13
  worker.node01.lbfactor=1
  #worker.node01.domain=cluster1
  # 
  # Second worker
  # 
  worker.node02.port=9009
  worker.node02.host=ovea-inspiron
  worker.node02.type=ajp13
  worker.node02.lbfactor=1
  #worker.node02.domain=cluster1
  # --
  # Load Balancer worker
  # --
  worker.loadbalancer.type=lb
  worker.loadbalancer.sticky_session=false
  worker.loadbalancer.balanced_workers=node01,node02
 
  As you can see i use two server ('agnes' IP : 192.168.2.102 and
  'ovea-inspiron' IP : 192.168.2.103)
  I' ve coded a little aplication who read un file and create a
  sessions if
  session not exist.
 
  If i use the system in mod load balancing (with no cluster mod
  activate)
  all is great (my config is of course
  worker.loadbalancer.sticky_session=true
  )
 
  So system run with session affinitu but the two server are
  accessible ;)
 
  Now i try to configure as cluster mode with session replication
  (my config is now worker.loadbalancer.sticky_session=3Dfalse)
 
  I configure my to server.xml like that :
  agnes (IP : 192.168.2.102)
 
  Server port=8005 shutdown=SHUTDOWN
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=8080 maxHttpHeaderSize=8192
maxThreads=150 minSpareThreads=25
maxSpareThreads=75
enableLookups=false redirectPort=8443
  acceptCount=100
connectionTimeout=2
  disableUploadTimeout=true
  /
 
  Connector port=8009 enableLookups=false
redirectPort=8443 protocol=AJP/1.3 /
 
  Engine name=Catalina defaultHost=localhost
  jvmRoute=node01 
 
Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase /
 
Host name=localhost appBase=webapps
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false
   Cluster
  className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
doClusterLog=true
clusterLogName=clusterlog
manager.className=
  org.apache.catalina.cluster.session.DeltaManager
manager.expireSessionsOnShutdown=false
manager.notifyListenersOnReplication=true
manager.notifySessionListenersOnReplication=true
manager.sendAllSessions=true
manager.sendAllSessionsSize=500
manager.sendAllSessionsWaitTime=20
 
  Membership className=
  org.apache.catalina.cluster.mcast.McastService
   mcastBindAddress=192.168.2.102
   

Re: Tomcat 5.5.15 Clustering ?

2006-02-15 Thread Peter Rossbach


Am 15.02.2006 um 15:11 schrieb Filip Hanik - Dev Lists:

1)Clustering need sticky_session=true and is only design for  
failover (see servlet spec).


Not true for Tomcat, using replicationMode=pooled and  
waitForAck=true, you can do round robin non sticky load balancing  
as long as you don't have more than one thread accessing the  
session at any point in time.


OK, yes, for special application we support it, but normaly  
sticky_session is true. See Servlet Spec (SRV 7.7).


Peter

INFO: Manager [/cluster-1.0-SNAPSHOT]: skipping state transfer. No  
members active in cluster group.


yes, your multicast isn't working, or it should have said that you  
had a member.
Take a look at the bottom of the page and run the MCaster test  
included in a super old version of Tomcat 4 clustering.

http://people.apache.org/~fhanik/

On multihomed hosts, it can get a little tricky to get multicasting  
working and you might have to setup some routes to help. Check with  
your sysadmin.



Filip



Peter Rossbach wrote:

Hey,

1)Clustering need sticky_session=true and is only design for  
failover (see servlet spec).

2)Are your sure that MULTICAST is enabled at eth0?

regards
Peter
[EMAIL PROTECTED]



Am 15.02.2006 um 02:26 schrieb David Avenante:


Hi,

I' ve try to use Tomcat 5.5.15 in cluster mod. And after some  
work on

configuration and test
i seems to be on limit of my all possibilities ;)

I try to use two tomcat in cluster with apache web server and  
mod_jk as

connector.

my Apache configuration look like :


# workers.properties

ps=/

# List the workers name
worker.list=loadbalancer

# 
# First worker
# 
worker.node01.port=8009
worker.node01.host=agnes
worker.node01.type=ajp13
worker.node01.lbfactor=1
#worker.node01.domain=cluster1
# 
# Second worker
# 
worker.node02.port=9009
worker.node02.host=ovea-inspiron
worker.node02.type=ajp13
worker.node02.lbfactor=1
#worker.node02.domain=cluster1
# --
# Load Balancer worker
# --
worker.loadbalancer.type=lb
worker.loadbalancer.sticky_session=false
worker.loadbalancer.balanced_workers=node01,node02

As you can see i use two server ('agnes' IP : 192.168.2.102 and
'ovea-inspiron' IP : 192.168.2.103)
I' ve coded a little aplication who read un file and create a  
sessions if

session not exist.

If i use the system in mod load balancing (with no cluster mod  
activate)
all is great (my config is of course  
worker.loadbalancer.sticky_session=true

)

So system run with session affinitu but the two server are  
accessible ;)


Now i try to configure as cluster mode with session replication
(my config is now worker.loadbalancer.sticky_session=3Dfalse)

I configure my to server.xml like that :
agnes (IP : 192.168.2.102)

Server port=8005 shutdown=SHUTDOWN
  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=8080 maxHttpHeaderSize=8192
  maxThreads=150 minSpareThreads=25
  maxSpareThreads=75
  enableLookups=false redirectPort=8443
acceptCount=100
  connectionTimeout=2  
disableUploadTimeout=true

/

Connector port=8009 enableLookups=false
  redirectPort=8443 protocol=AJP/1.3 /

Engine name=Catalina defaultHost=localhost  
jvmRoute=node01 


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

  Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
 Cluster  
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

  doClusterLog=true
  clusterLogName=clusterlog
  manager.className=
org.apache.catalina.cluster.session.DeltaManager
  manager.expireSessionsOnShutdown=false
  manager.notifyListenersOnReplication=true
  manager.notifySessionListenersOnReplication=true
  manager.sendAllSessions=true
  manager.sendAllSessionsSize=500
  manager.sendAllSessionsWaitTime=20

Membership className=
org.apache.catalina.cluster.mcast.McastService
 mcastBindAddress=192.168.2.102
 mcastAddr=224.0.0.1
 mcastPort=45564
 mcastFrequency=1000
 mcastDropTime=3/

Receiver className=
org.apache.catalina.cluster.tcp.ReplicationListener
 

Re: Tomcat 5.5.15 Clustering ?

2006-02-15 Thread Peter Rossbach

Can you test your config without the parameter mcastBindAddress=xx?


Peter



Am 15.02.2006 um 14:35 schrieb David Avenante:


Yes MULTICAST is enabled i see that by too fact :

first,
ifconfig eth0 :

eth0  Link encap:Ethernet  HWaddr 00:13:D4:45:A6:3F
  inet addr:192.168.2.102  Bcast:192.168.2.255  Mask: 
255.255.255.0

  UP BROADCAST NOTRAILERS RUNNING ALLMULTI MULTICAST  MTU:1500
Metric:1
  RX packets:264493 errors:0 dropped:0 overruns:0 frame:0
  TX packets:292063 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:98079150 (93.5 Mb)  TX bytes:41007393 (39.1 Mb)

ALLMULTI and MULTICAST is enabled on two serveur interface.

second,

as you see in my first post tcpdump track the UDP messages send  
between

server.


For sticky_session=true i' m not agree with you.
In the connector documentation (see
http://tomcat.apache.org/connectors-doc/config/workers.html)
= Set sticky_session to *False* when Tomcat is using a Session  
Manager

which can persist session data across multiple instances of Tomcat
It' s my situation.

So i' m alway in the trouble by thanks a lot for the verification ;)


On 2/15/06, Peter Rossbach [EMAIL PROTECTED] wrote:


Hey,

1)  Clustering need sticky_session=true and is only design for
failover (see servlet spec).
2)  Are your sure that MULTICAST is enabled at eth0?

regards
Peter
[EMAIL PROTECTED]



Am 15.02.2006 um 02:26 schrieb David Avenante:


Hi,

I' ve try to use Tomcat 5.5.15 in cluster mod. And after some  
work on

configuration and test
i seems to be on limit of my all possibilities ;)

I try to use two tomcat in cluster with apache web server and
mod_jk as
connector.

my Apache configuration look like :


# workers.properties

ps=/

# List the workers name
worker.list=loadbalancer

# 
# First worker
# 
worker.node01.port=8009
worker.node01.host=agnes
worker.node01.type=ajp13
worker.node01.lbfactor=1
#worker.node01.domain=cluster1
# 
# Second worker
# 
worker.node02.port=9009
worker.node02.host=ovea-inspiron
worker.node02.type=ajp13
worker.node02.lbfactor=1
#worker.node02.domain=cluster1
# --
# Load Balancer worker
# --
worker.loadbalancer.type=lb
worker.loadbalancer.sticky_session=false
worker.loadbalancer.balanced_workers=node01,node02

As you can see i use two server ('agnes' IP : 192.168.2.102 and
'ovea-inspiron' IP : 192.168.2.103)
I' ve coded a little aplication who read un file and create a
sessions if
session not exist.

If i use the system in mod load balancing (with no cluster mod
activate)
all is great (my config is of course
worker.loadbalancer.sticky_session=true
)

So system run with session affinitu but the two server are
accessible ;)

Now i try to configure as cluster mode with session replication
(my config is now worker.loadbalancer.sticky_session=3Dfalse)

I configure my to server.xml like that :
agnes (IP : 192.168.2.102)

Server port=8005 shutdown=SHUTDOWN
  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=8080 maxHttpHeaderSize=8192
  maxThreads=150 minSpareThreads=25
  maxSpareThreads=75
  enableLookups=false redirectPort=8443
acceptCount=100
  connectionTimeout=2
disableUploadTimeout=true
/

Connector port=8009 enableLookups=false
  redirectPort=8443 protocol=AJP/1.3 /

Engine name=Catalina defaultHost=localhost
jvmRoute=node01 

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

  Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
 Cluster
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
  doClusterLog=true
  clusterLogName=clusterlog
  manager.className=
org.apache.catalina.cluster.session.DeltaManager
  manager.expireSessionsOnShutdown=false
  manager.notifyListenersOnReplication=true
  manager.notifySessionListenersOnReplication=true
  manager.sendAllSessions=true
  manager.sendAllSessionsSize=500
  manager.sendAllSessionsWaitTime=20

Membership className=
org.apache.catalina.cluster.mcast.McastService
 mcastBindAddress=192.168.2.102
 mcastAddr=224.0.0.1
 mcastPort=45564

Re: Tomcat 5.5.15 Clustering ?

2006-02-15 Thread David Avenante
Thank you very much for the toolkit ;)
My feeling was also on my multicast support.
But i' ve read more documentation for my Linux
and i think that my servers support MULTICAST like
explaned on my first message (compile kernel support
and add route + test with tcpdump)

So this toolkit seems confirme the fact that my servers support multicast.
When i test on agnes with target ovea-inspiron i've:

java -cp tomcat-replication.jar MCaster 224.0.0.1 45564 ovea-inspiron
Usage MCaster [address port message]
BEGIN TO RECEIVE
SENT:ovea-inspiron1
RECEIVED:ovea-inspiron1 FROM /192.168.2.102:45564
SENT:ovea-inspiron2
BEGIN TO RECEIVE
RECEIVED:(gtcp://192.168.2.103:400cluster1 FROM /192.168.2.103:45564
SENT:ovea-inspiron3
BEGIN TO RECEIVE
RECEIVED:(ftcp://192.168.2.102:400catalina FROM /192.168.2.102:45564
SENT:ovea-inspiron4
BEGIN TO RECEIVE
RECEIVED:(gtcp://192.168.2.103:400cluster1 FROM /192.168.2.103:45564

And when i test on ovea-inspiron with target agnes i've:
java -cp tomcat-replication.jar MCaster 224.0.0.1 http://228.1.2.3/ 45566
agnes
 Usage MCaster [address port message]
BEGIN TO RECEIVE
SENT:agnes1
RECEIVED:agnes1 FROM /192.168.2.103:45566
SENT:agnes2
BEGIN TO RECEIVE
RECEIVED:agnes2 FROM /192.168.2.103:45566
SENT:agnes3
BEGIN TO RECEIVE
RECEIVED:agnes3 FROM /192.168.2.103:45566
SENT:agnes4
BEGIN TO RECEIVE
RECEIVED:agnes4 FROM /192.168.2.103:45566
SENT:agnes5
BEGIN TO RECEIVE
RECEIVED:agnes5 FROM /192.168.2.103:45566
SENT:agnes6
BEGIN TO RECEIVE
RECEIVED:agnes6 FROM /192.168.2.103:45566
SENT:agnes7
BEGIN TO RECEIVE
RECEIVED:agnes7 FROM /192.168.2.103:45566

So it's not a multicast probleme but most a configuration probleme.
ovea-inspiron sent is ok but the received is empty ?
Some suggestion(s) ?

Thank's for the progress

On 2/15/06, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:

 1)Clustering need sticky_session=true and is only design for
 failover (see servlet spec).

 Not true for Tomcat, using replicationMode=pooled and
 waitForAck=true, you can do round robin non sticky load balancing as
 long as you don't have more than one thread accessing the session at any
 point in time.

 INFO: Manager [/cluster-1.0-SNAPSHOT]: skipping state transfer. No
 members active in cluster group.

 yes, your multicast isn't working, or it should have said that you had a
 member.
 Take a look at the bottom of the page and run the MCaster test included
 in a super old version of Tomcat 4 clustering.
 http://people.apache.org/~fhanik/

 On multihomed hosts, it can get a little tricky to get multicasting
 working and you might have to setup some routes to help. Check with your
 sysadmin.

 Filip



 Peter Rossbach wrote:
  Hey,
 
  1)Clustering need sticky_session=true and is only design for
  failover (see servlet spec).
  2)Are your sure that MULTICAST is enabled at eth0?
 
  regards
  Peter
  [EMAIL PROTECTED]
 
 
 
  Am 15.02.2006 um 02:26 schrieb David Avenante:
 
  Hi,
 
  I' ve try to use Tomcat 5.5.15 in cluster mod. And after some work on
  configuration and test
  i seems to be on limit of my all possibilities ;)
 
  I try to use two tomcat in cluster with apache web server and mod_jk as
  connector.
 
  my Apache configuration look like :
 
 
  # workers.properties
 
  ps=/
 
  # List the workers name
  worker.list=loadbalancer
 
  # 
  # First worker
  # 
  worker.node01.port=8009
  worker.node01.host=agnes
  worker.node01.type=ajp13
  worker.node01.lbfactor=1
  #worker.node01.domain=cluster1
  # 
  # Second worker
  # 
  worker.node02.port=9009
  worker.node02.host=ovea-inspiron
  worker.node02.type=ajp13
  worker.node02.lbfactor=1
  #worker.node02.domain=cluster1
  # --
  # Load Balancer worker
  # --
  worker.loadbalancer.type=lb
  worker.loadbalancer.sticky_session=false
  worker.loadbalancer.balanced_workers=node01,node02
 
  As you can see i use two server ('agnes' IP : 192.168.2.102 and
  'ovea-inspiron' IP : 192.168.2.103)
  I' ve coded a little aplication who read un file and create a
  sessions if
  session not exist.
 
  If i use the system in mod load balancing (with no cluster mod
 activate)
  all is great (my config is of course
  worker.loadbalancer.sticky_session=true
  )
 
  So system run with session affinitu but the two server are accessible
 ;)
 
  Now i try to configure as cluster mode with session replication
  (my config is now worker.loadbalancer.sticky_session=3Dfalse)
 
  I configure my to server.xml like that :
  agnes (IP : 192.168.2.102)
 
  Server port=8005 shutdown=SHUTDOWN
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 

Re: Tomcat 5.5.15 Clustering ?

2006-02-15 Thread Filip Hanik - Dev Lists
It is a multicast problem, your second box is not receiving any 
multicast messages, only from itself.


To run this test properly, you will need to shutdown your tomcats, then 
run MCaster on both machines at the same time,
if both machines are not receiving messages from each other (like your 
example below) then you have a multicast problem


Filip


David Avenante wrote:

Thank you very much for the toolkit ;)
My feeling was also on my multicast support.
But i' ve read more documentation for my Linux
and i think that my servers support MULTICAST like
explaned on my first message (compile kernel support
and add route + test with tcpdump)

So this toolkit seems confirme the fact that my servers support multicast.
When i test on agnes with target ovea-inspiron i've:

java -cp tomcat-replication.jar MCaster 224.0.0.1 45564 ovea-inspiron
Usage MCaster [address port message]
BEGIN TO RECEIVE
SENT:ovea-inspiron1
RECEIVED:ovea-inspiron1 FROM /192.168.2.102:45564
SENT:ovea-inspiron2
BEGIN TO RECEIVE
RECEIVED:(gtcp://192.168.2.103:400cluster1 FROM /192.168.2.103:45564
SENT:ovea-inspiron3
BEGIN TO RECEIVE
RECEIVED:(ftcp://192.168.2.102:400catalina FROM /192.168.2.102:45564
SENT:ovea-inspiron4
BEGIN TO RECEIVE
RECEIVED:(gtcp://192.168.2.103:400cluster1 FROM /192.168.2.103:45564

And when i test on ovea-inspiron with target agnes i've:
java -cp tomcat-replication.jar MCaster 224.0.0.1 http://228.1.2.3/ 45566
agnes
 Usage MCaster [address port message]
BEGIN TO RECEIVE
SENT:agnes1
RECEIVED:agnes1 FROM /192.168.2.103:45566
SENT:agnes2
BEGIN TO RECEIVE
RECEIVED:agnes2 FROM /192.168.2.103:45566
SENT:agnes3
BEGIN TO RECEIVE
RECEIVED:agnes3 FROM /192.168.2.103:45566
SENT:agnes4
BEGIN TO RECEIVE
RECEIVED:agnes4 FROM /192.168.2.103:45566
SENT:agnes5
BEGIN TO RECEIVE
RECEIVED:agnes5 FROM /192.168.2.103:45566
SENT:agnes6
BEGIN TO RECEIVE
RECEIVED:agnes6 FROM /192.168.2.103:45566
SENT:agnes7
BEGIN TO RECEIVE
RECEIVED:agnes7 FROM /192.168.2.103:45566

So it's not a multicast probleme but most a configuration probleme.
ovea-inspiron sent is ok but the received is empty ?
Some suggestion(s) ?

Thank's for the progress

On 2/15/06, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:
  

1)Clustering need sticky_session=true and is only design for
  

failover (see servlet spec).

Not true for Tomcat, using replicationMode=pooled and
waitForAck=true, you can do round robin non sticky load balancing as
long as you don't have more than one thread accessing the session at any
point in time.



INFO: Manager [/cluster-1.0-SNAPSHOT]: skipping state transfer. No
  

members active in cluster group.

yes, your multicast isn't working, or it should have said that you had a
member.
Take a look at the bottom of the page and run the MCaster test included
in a super old version of Tomcat 4 clustering.
http://people.apache.org/~fhanik/

On multihomed hosts, it can get a little tricky to get multicasting
working and you might have to setup some routes to help. Check with your
sysadmin.

Filip



Peter Rossbach wrote:


Hey,

1)Clustering need sticky_session=true and is only design for
failover (see servlet spec).
2)Are your sure that MULTICAST is enabled at eth0?

regards
Peter
[EMAIL PROTECTED]



Am 15.02.2006 um 02:26 schrieb David Avenante:

  

Hi,

I' ve try to use Tomcat 5.5.15 in cluster mod. And after some work on
configuration and test
i seems to be on limit of my all possibilities ;)

I try to use two tomcat in cluster with apache web server and mod_jk as
connector.

my Apache configuration look like :


# workers.properties

ps=/

# List the workers name
worker.list=loadbalancer

# 
# First worker
# 
worker.node01.port=8009
worker.node01.host=agnes
worker.node01.type=ajp13
worker.node01.lbfactor=1
#worker.node01.domain=cluster1
# 
# Second worker
# 
worker.node02.port=9009
worker.node02.host=ovea-inspiron
worker.node02.type=ajp13
worker.node02.lbfactor=1
#worker.node02.domain=cluster1
# --
# Load Balancer worker
# --
worker.loadbalancer.type=lb
worker.loadbalancer.sticky_session=false
worker.loadbalancer.balanced_workers=node01,node02

As you can see i use two server ('agnes' IP : 192.168.2.102 and
'ovea-inspiron' IP : 192.168.2.103)
I' ve coded a little aplication who read un file and create a
sessions if
session not exist.

If i use the system in mod load balancing (with no cluster mod


activate)


all is great (my config is of course
worker.loadbalancer.sticky_session=true
)

So system run with session affinitu but the two server are accessible


;)


Now i try to configure as cluster mode with session replication
(my config is now worker.loadbalancer.sticky_session=3Dfalse)

I configure my to server.xml like that :
agnes (IP : 192.168.2.102)

Server port=8005 shutdown=SHUTDOWN
  GlobalNamingResources
Resource name=UserDatabase auth=Container
   

Re: Tomcat 5.5.15 Clustering ?

2006-02-15 Thread David Avenante
I try it and the multicast seems OK ?

On 2/15/06, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:

 It is a multicast problem, your second box is not receiving any
 multicast messages, only from itself.

 To run this test properly, you will need to shutdown your tomcats, then
 run MCaster on both machines at the same time,
 if both machines are not receiving messages from each other (like your
 example below) then you have a multicast problem

 Filip


 David Avenante wrote:
  Thank you very much for the toolkit ;)
  My feeling was also on my multicast support.
  But i' ve read more documentation for my Linux
  and i think that my servers support MULTICAST like
  explaned on my first message (compile kernel support
  and add route + test with tcpdump)
 
  So this toolkit seems confirme the fact that my servers support
 multicast.
  When i test on agnes with target ovea-inspiron i've:
 
  java -cp tomcat-replication.jar MCaster 224.0.0.1 45564 ovea-inspiron
  Usage MCaster [address port message]
  BEGIN TO RECEIVE
  SENT:ovea-inspiron1
  RECEIVED:ovea-inspiron1 FROM /192.168.2.102:45564
  SENT:ovea-inspiron2
  BEGIN TO RECEIVE
  RECEIVED:(gtcp://192.168.2.103:400cluster1 FROM /192.168.2.103:45564
  SENT:ovea-inspiron3
  BEGIN TO RECEIVE
  RECEIVED:(ftcp://192.168.2.102:400catalina FROM /192.168.2.102:45564
  SENT:ovea-inspiron4
  BEGIN TO RECEIVE
  RECEIVED:(gtcp://192.168.2.103:400cluster1 FROM /192.168.2.103:45564
 
  And when i test on ovea-inspiron with target agnes i've:
  java -cp tomcat-replication.jar MCaster 224.0.0.1 http://228.1.2.3/
 45566
  agnes
   Usage MCaster [address port message]
  BEGIN TO RECEIVE
  SENT:agnes1
  RECEIVED:agnes1 FROM /192.168.2.103:45566
  SENT:agnes2
  BEGIN TO RECEIVE
  RECEIVED:agnes2 FROM /192.168.2.103:45566
  SENT:agnes3
  BEGIN TO RECEIVE
  RECEIVED:agnes3 FROM /192.168.2.103:45566
  SENT:agnes4
  BEGIN TO RECEIVE
  RECEIVED:agnes4 FROM /192.168.2.103:45566
  SENT:agnes5
  BEGIN TO RECEIVE
  RECEIVED:agnes5 FROM /192.168.2.103:45566
  SENT:agnes6
  BEGIN TO RECEIVE
  RECEIVED:agnes6 FROM /192.168.2.103:45566
  SENT:agnes7
  BEGIN TO RECEIVE
  RECEIVED:agnes7 FROM /192.168.2.103:45566
 
  So it's not a multicast probleme but most a configuration probleme.
  ovea-inspiron sent is ok but the received is empty ?
  Some suggestion(s) ?
 
  Thank's for the progress
 
  On 2/15/06, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:
 
  1)Clustering need sticky_session=true and is only design for
 
  failover (see servlet spec).
 
  Not true for Tomcat, using replicationMode=pooled and
  waitForAck=true, you can do round robin non sticky load balancing as
  long as you don't have more than one thread accessing the session at
 any
  point in time.
 
 
  INFO: Manager [/cluster-1.0-SNAPSHOT]: skipping state transfer. No
 
  members active in cluster group.
 
  yes, your multicast isn't working, or it should have said that you had
 a
  member.
  Take a look at the bottom of the page and run the MCaster test included
  in a super old version of Tomcat 4 clustering.
  http://people.apache.org/~fhanik/
 
  On multihomed hosts, it can get a little tricky to get multicasting
  working and you might have to setup some routes to help. Check with
 your
  sysadmin.
 
  Filip
 
 
 
  Peter Rossbach wrote:
 
  Hey,
 
  1)Clustering need sticky_session=true and is only design for
  failover (see servlet spec).
  2)Are your sure that MULTICAST is enabled at eth0?
 
  regards
  Peter
  [EMAIL PROTECTED]
 
 
 
  Am 15.02.2006 um 02:26 schrieb David Avenante:
 
 
  Hi,
 
  I' ve try to use Tomcat 5.5.15 in cluster mod. And after some work on
  configuration and test
  i seems to be on limit of my all possibilities ;)
 
  I try to use two tomcat in cluster with apache web server and mod_jk
 as
  connector.
 
  my Apache configuration look like :
 
 
  # workers.properties
 
  ps=/
 
  # List the workers name
  worker.list=loadbalancer
 
  # 
  # First worker
  # 
  worker.node01.port=8009
  worker.node01.host=agnes
  worker.node01.type=ajp13
  worker.node01.lbfactor=1
  #worker.node01.domain=cluster1
  # 
  # Second worker
  # 
  worker.node02.port=9009
  worker.node02.host=ovea-inspiron
  worker.node02.type=ajp13
  worker.node02.lbfactor=1
  #worker.node02.domain=cluster1
  # --
  # Load Balancer worker
  # --
  worker.loadbalancer.type=lb
  worker.loadbalancer.sticky_session=false
  worker.loadbalancer.balanced_workers=node01,node02
 
  As you can see i use two server ('agnes' IP : 192.168.2.102 and
  'ovea-inspiron' IP : 192.168.2.103)
  I' ve coded a little aplication who read un file and create a
  sessions if
  session not exist.
 
  If i use the system in mod load balancing (with no cluster mod
 
  activate)
 
  all is great (my config is of course
  worker.loadbalancer.sticky_session=true
  )
 
  So system run with session affinitu but the two server are accessible
 
  

Re: Tomcat 5.5.15 Clustering ?

2006-02-15 Thread David Avenante
Yes all right !

INFO: Register manager /cluster-1.0-SNAPSHOT to cluster element Host with
name localhost
Feb 15, 2006 10:47:32 AM org.apache.catalina.cluster.session.DeltaManagerstart

But Why 
my mcastAddress is good !

now i' ve a new error

Feb 15, 2006 10:50:41 AM
org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThreadpushQueuedMessages
WARNING: Unable to asynchronously send session with id=[GET-ALL-/cluster-
1.0-SNAPSHOT] - message will be ignored.
java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)

but it's a big progress ;)

I got to verifiy if my ntp synchronisation between my server is OK ;)

Thank you very much.





On 2/15/06, Peter Rossbach [EMAIL PROTECTED] wrote:

 Can you test your config without the parameter mcastBindAddress=xx?


 Peter



 Am 15.02.2006 um 14:35 schrieb David Avenante:

  Yes MULTICAST is enabled i see that by too fact :
 
  first,
  ifconfig eth0 :
 
  eth0  Link encap:Ethernet  HWaddr 00:13:D4:45:A6:3F
inet addr:192.168.2.102  Bcast:192.168.2.255  Mask:
  255.255.255.0
UP BROADCAST NOTRAILERS RUNNING ALLMULTI MULTICAST  MTU:1500
  Metric:1
RX packets:264493 errors:0 dropped:0 overruns:0 frame:0
TX packets:292063 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:98079150 (93.5 Mb)  TX bytes:41007393 (39.1 Mb)
 
  ALLMULTI and MULTICAST is enabled on two serveur interface.
 
  second,
 
  as you see in my first post tcpdump track the UDP messages send
  between
  server.
 
 
  For sticky_session=true i' m not agree with you.
  In the connector documentation (see
  http://tomcat.apache.org/connectors-doc/config/workers.html)
  = Set sticky_session to *False* when Tomcat is using a Session
  Manager
  which can persist session data across multiple instances of Tomcat
  It' s my situation.
 
  So i' m alway in the trouble by thanks a lot for the verification ;)
 
 
  On 2/15/06, Peter Rossbach [EMAIL PROTECTED] wrote:
 
  Hey,
 
  1)  Clustering need sticky_session=true and is only design for
  failover (see servlet spec).
  2)  Are your sure that MULTICAST is enabled at eth0?
 
  regards
  Peter
  [EMAIL PROTECTED]
 
 
 
  Am 15.02.2006 um 02:26 schrieb David Avenante:
 
  Hi,
 
  I' ve try to use Tomcat 5.5.15 in cluster mod. And after some
  work on
  configuration and test
  i seems to be on limit of my all possibilities ;)
 
  I try to use two tomcat in cluster with apache web server and
  mod_jk as
  connector.
 
  my Apache configuration look like :
 
 
  # workers.properties
 
  ps=/
 
  # List the workers name
  worker.list=loadbalancer
 
  # 
  # First worker
  # 
  worker.node01.port=8009
  worker.node01.host=agnes
  worker.node01.type=ajp13
  worker.node01.lbfactor=1
  #worker.node01.domain=cluster1
  # 
  # Second worker
  # 
  worker.node02.port=9009
  worker.node02.host=ovea-inspiron
  worker.node02.type=ajp13
  worker.node02.lbfactor=1
  #worker.node02.domain=cluster1
  # --
  # Load Balancer worker
  # --
  worker.loadbalancer.type=lb
  worker.loadbalancer.sticky_session=false
  worker.loadbalancer.balanced_workers=node01,node02
 
  As you can see i use two server ('agnes' IP : 192.168.2.102 and
  'ovea-inspiron' IP : 192.168.2.103)
  I' ve coded a little aplication who read un file and create a
  sessions if
  session not exist.
 
  If i use the system in mod load balancing (with no cluster mod
  activate)
  all is great (my config is of course
  worker.loadbalancer.sticky_session=true
  )
 
  So system run with session affinitu but the two server are
  accessible ;)
 
  Now i try to configure as cluster mode with session replication
  (my config is now worker.loadbalancer.sticky_session=3Dfalse)
 
  I configure my to server.xml like that :
  agnes (IP : 192.168.2.102)
 
  Server port=8005 shutdown=SHUTDOWN
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=8080 maxHttpHeaderSize=8192
maxThreads=150 minSpareThreads=25
maxSpareThreads=75
enableLookups=false redirectPort=8443
  acceptCount=100
connectionTimeout=2
  disableUploadTimeout=true
  /
 
  Connector port=8009 enableLookups=false
redirectPort=8443 protocol=AJP/1.3 /
 
  Engine name=Catalina defaultHost=localhost
  jvmRoute=node01 
 
Realm className=org.apache.catalina.realm.UserDatabaseRealm
 

Re: Tomcat 5.5.15 Clustering ?

2006-02-15 Thread Filip Hanik - Dev Lists

David, you are all over the place. Slow down for a second.
my guess is that one of your interfaces is not doing what you think it 
is doing.


follow these simple steps

1. Make sure that your multicast is working
2. Stop all your tomcat processes
3. Make sure nothing else is broadcasting on the same mcast address
4. Delete or archive all your previous logs
5. Startup tomcat 1 - wait 10 seconds
6. Startup tomcat 2

Then do the following
7. Set tcpListenAddress=auto in your server.xml file
8. Repeat steps 1 through 6

9. email the logs to the list

our guess is that you have a networking problem, but you just don't dont 
look into it close enough for yourself and then provide us with the info.


Filip




David Avenante wrote:

Yes all right !

INFO: Register manager /cluster-1.0-SNAPSHOT to cluster element Host with
name localhost
Feb 15, 2006 10:47:32 AM org.apache.catalina.cluster.session.DeltaManagerstart

But Why 
my mcastAddress is good !

now i' ve a new error

Feb 15, 2006 10:50:41 AM
org.apache.catalina.cluster.tcp.FastAsyncSocketSender$FastQueueThreadpushQueuedMessages
WARNING: Unable to asynchronously send session with id=[GET-ALL-/cluster-
1.0-SNAPSHOT] - message will be ignored.
java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)

but it's a big progress ;)

I got to verifiy if my ntp synchronisation between my server is OK ;)

Thank you very much.



  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5.15 Clustering ?

2006-02-15 Thread David Avenante
 You're right so :

 1 - I reboot my too servers agnes : 192.168.2.102 and ovea-inspiron :
192.168.2.103
 2 - I test the multicat on each server

 for that, I start on agnes the command
 java -cp tomcat-replication.jar MCaster 224.0.0.1 45564 ovea-inspiron
 output :
 Usage MCaster [address port message]
 BEGIN TO RECEIVE
 SENT:ovea-inspiron1
 RECEIVED:ovea-inspiron1 FROM /192.168.2.102:45564
 BEGIN TO RECEIVE
 SENT:ovea-inspiron2
 RECEIVED:ovea-inspiron2 FROM /192.168.2.102:45564
 BEGIN TO RECEIVE
 ...
 a tcpdump on agnes output :
 12:03:56.160976 IP 192.168.2.102.45564 
all-systems.mcast.net.45564: UDP, length 14
 12:03:59.165908 IP 192.168.2.102.45564 
all-systems.mcast.net.45564: UDP, length 14
 12:04:02.170789 IP 192.168.2.102.45564 
all-systems.mcast.net.45564: UDP, length 14
 12:04:05.175930 IP 192.168.2.102.45564 
all-systems.mcast.net.45564: UDP, length 14
 12:04:08.180810 IP 192.168.2.102.45564 
all-systems.mcast.net.45564: UDP, length 14
 ...

 a tcpdump on ovea-inspiron output :
 12:00:24.229852 IP AGNES.45564  ALL-SYSTEMS.MCAST.NET.45564:
UDP, length 15
 12:00:27.234391 IP AGNES.45564  ALL-SYSTEMS.MCAST.NET.45564:
UDP, length 15
 ...

 I stop the process on agnes and on ovea-inspiron start comand :
java -cp tomcat-replication.jar MCaster 224.0.0.1 45564 agnes
 Usage MCaster [address port message]
 BEGIN TO RECEIVE
 RECEIVED:agnes1 FROM /192.168.2.103:45566
 SENT:agnes1
 BEGIN TO RECEIVE
 SENT:agnes2
 RECEIVED:agnes2 FROM /192.168.2.103:45566
 SENT:agnes3
 BEGIN TO RECEIVE
 RECEIVED:agnes3 FROM /192.168.2.103:45566

 a tcpdump on agnes output :
 12:12:48.210143 IP ovea-inspiron.45566 
all-systems.mcast.net.45566: UDP, length 6
 12:12:51.264541 IP ovea-inspiron.45566 
all-systems.mcast.net.45566: UDP, length 6
 12:12:54.396574 IP ovea-inspiron.45566 
all-systems.mcast.net.45566: UDP, length 7

 a tcpdump on ovea-inspiron output :
 12:27:10.603013 IP ovea-inspiron.45566 
all-systems.mcast.net.45566:UDP, length 8
 12:27:13.855782 IP ovea-inspiron.45566 
all-systems.mcast.net.45566:UDP, length 8
 12:27:16.863749 IP ovea-inspiron.45566 
all-systems.mcast.net.45566:UDP, length 8

 Ok here first problem in the first server name of agnes is not
resolved 
 so i take a look on my hosts and a see the problem 
 fuck ... bad configuration
 it's
 127.0.0.1   localhost  agnes
 192.168.2.103   ovea-inspiron
 but must be
 127.0.0.1   localhost
 192.168.2.102   agnes
 192.168.2.103   ovea-inspiron

 same error on second server so i correct this mistake
 and retry the test ... ok name is resolved as well.

 Now i run the command simultany on two servers
 on agnes the command java -cp tomcat-replication.jar MCaster
224.0.0.1 45564 ovea-inspiron
 and on ovea-inspiron start comand : java -cp
tomcat-replication.jar MCaster 224.0.0.1 45564 agnes

 the ouput as the same a the other tests but tcpdump info are now :
 on agnes
 12:43:02.336748 IP ovea-inspiron.45566 
all-systems.mcast.net.45566: UDP, length 7
 12:43:02.395214 IP agnes.45564  all-systems.mcast.net.45564:
UDP, length 15
 12:43:05.400696 IP agnes.45564  all-systems.mcast.net.45564:
UDP, length 15
 12:43:05.506764 IP ovea-inspiron.45566 
all-systems.mcast.net.45566: UDP, length 7
 12:43:08.405287 IP agnes.45564  all-systems.mcast.net.45564:
UDP, length 15
 12:43:08.604056 IP ovea-inspiron.45566 
all-systems.mcast.net.45566: UDP, length 7
 12:43:11.410371 IP agnes.45564  all-systems.mcast.net.45564:
UDP, length 15
 12:43:11.608944 IP ovea-inspiron.45566 
all-systems.mcast.net.45566: UDP, length 7

 on ovea-inspiron
 12:45:55.861466 IP ovea-inspiron.45566 
all-systems.mcast.net.45566:UDP, length 7
 12:45:57.983294 IP AGNES.45564  all-systems.mcast.net.45564:
UDP, length 14
 12:45:58.914085 IP ovea-inspiron.45566 
all-systems.mcast.net.45566:UDP, length 7
 12:46:00.988429 IP AGNES.45564  all-systems.mcast.net.45564:
UDP, length 15
 12:46:01.918123 IP ovea-inspiron.45566 
all-systems.mcast.net.45566:UDP, length 7

 Ok so now I think my multicast is OK no ?

 So now I use the two server configuration of my first post and i
start the first server.
 the log is :
Feb 15, 2006 4:00:26 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/opt/sun-jdk-1.5.0.06/jre/lib/i386/client:/opt/sun-jdk-1.5.0.06/jre/lib/i386:/opt/sun-jdk-1.5.0.06/jre/../lib/i386
Feb 15, 2006 4:00:26 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Feb 15, 2006 4:00:26 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 980 ms
Feb 15, 2006 4:00:26 PM 

Re: Tomcat 5.5.15 Clustering ?

2006-02-15 Thread David Avenante
Yes you're right i' ve a problem in my /etc/hosts as you can see in my
response
to Hanik.

I hope this type of thread can help people to save time.
Because some skills are necessary for reolve the problem.

Thank you Paul ;)


On 2/15/06, Paul Smith [EMAIL PROTECTED] wrote:

 Is the multicast going over the 127.0.0.1 instead?  We've had this
 problem before (redhat el3), and to fix it, you have to make sure
 that in /etc/hosts that localhost is bound to a real IP address and
 not 127.0.0.1.  for some reason, in Java it always seems to want to
 stick to the local interface when localhost is mapped to this.

 Paul Smith
 On 16/02/2006, at 3:08 AM, Filip Hanik - Dev Lists wrote:

  David, you are all over the place. Slow down for a second.
  my guess is that one of your interfaces is not doing what you think
  it is doing.
 
  follow these simple steps
 
  1. Make sure that your multicast is working
  2. Stop all your tomcat processes
  3. Make sure nothing else is broadcasting on the same mcast address
  4. Delete or archive all your previous logs
  5. Startup tomcat 1 - wait 10 seconds
  6. Startup tomcat 2
 
  Then do the following
  7. Set tcpListenAddress=auto in your server.xml file
  8. Repeat steps 1 through 6
 
  9. email the logs to the list
 
  our guess is that you have a networking problem, but you just don't
  dont look into it close enough for yourself and then provide us
  with the info.
 
  Filip
 
 
 
 
  David Avenante wrote:
  Yes all right !
 
  INFO: Register manager /cluster-1.0-SNAPSHOT to cluster element
  Host with
  name localhost
  Feb 15, 2006 10:47:32 AM
  org.apache.catalina.cluster.session.DeltaManagerstart
 
  But Why 
  my mcastAddress is good !
 
  now i' ve a new error
 
  Feb 15, 2006 10:50:41 AM
  org.apache.catalina.cluster.tcp.FastAsyncSocketSender
  $FastQueueThreadpushQueuedMessages
  WARNING: Unable to asynchronously send session with id=[GET-ALL-/
  cluster-
  1.0-SNAPSHOT] - message will be ignored.
  java.net.ConnectException: Connection timed out
  at java.net.PlainSocketImpl.socketConnect(Native Method)
 
  but it's a big progress ;)
 
  I got to verifiy if my ntp synchronisation between my server is OK ;)
 
  Thank you very much.
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Tomcat 5.5.15 Clustering ?

2006-02-15 Thread Filip Hanik - Dev Lists

ok, we will work through it one item at the time.

show me the output from both servers MCaster program (not the tcpdump) 
when they run simultanously.


Filip


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5.15 Clustering ?

2006-02-15 Thread David Avenante
See my previous post
it's

 on agnes the command java -cp tomcat-replication.jar MCaster
224.0.0.1 45564 ovea-inspiron
 and on ovea-inspiron start comand : java -cp
tomcat-replication.jar MCaster 224.0.0.1 45564 agnes

 the ouput as the same a the other tests but tcpdump info are now :
 on agnes
 12:43:02.336748 IP ovea-inspiron.45566 
all-systems.mcast.net.45566: UDP, length 7
 12:43:02.395214 IP agnes.45564  all-systems.mcast.net.45564:
UDP, length 15
 12:43:05.400696 IP agnes.45564  all-systems.mcast.net.45564:
UDP, length 15
 12:43:05.506764 IP ovea-inspiron.45566 
all-systems.mcast.net.45566: UDP, length 7
 12:43:08.405287 IP agnes.45564  all-systems.mcast.net.45564:
UDP, length 15
 12:43:08.604056 IP ovea-inspiron.45566 
all-systems.mcast.net.45566: UDP, length 7
 12:43:11.410371 IP agnes.45564  all-systems.mcast.net.45564:
UDP, length 15
 12:43:11.608944 IP ovea-inspiron.45566 
all-systems.mcast.net.45566: UDP, length 7

 on ovea-inspiron
 12:45:55.861466 IP ovea-inspiron.45566 
all-systems.mcast.net.45566:UDP, length 7
 12:45:57.983294 IP AGNES.45564  all-systems.mcast.net.45564:
UDP, length 14
 12:45:58.914085 IP ovea-inspiron.45566 
all-systems.mcast.net.45566:UDP, length 7
 12:46:00.988429 IP AGNES.45564  all-systems.mcast.net.45564:
UDP, length 15
 12:46:01.918123 IP ovea-inspiron.45566 
all-systems.mcast.net.45566:UDP, length 7



On 2/15/06, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:

 ok, we will work through it one item at the time.

 show me the output from both servers MCaster program (not the tcpdump)
 when they run simultanously.

 Filip


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Tomcat 5.5.15 Clustering ?

2006-02-14 Thread David Avenante
Hi,

I' ve try to use Tomcat 5.5.15 in cluster mod. And after some work on
configuration and test
i seems to be on limit of my all possibilities ;)

I try to use two tomcat in cluster with apache web server and mod_jk as
connector.

my Apache configuration look like :


# workers.properties

ps=/

# List the workers name
worker.list=loadbalancer

# 
# First worker
# 
worker.node01.port=8009
worker.node01.host=agnes
worker.node01.type=ajp13
worker.node01.lbfactor=1
#worker.node01.domain=cluster1
# 
# Second worker
# 
worker.node02.port=9009
worker.node02.host=ovea-inspiron
worker.node02.type=ajp13
worker.node02.lbfactor=1
#worker.node02.domain=cluster1
# --
# Load Balancer worker
# --
worker.loadbalancer.type=lb
worker.loadbalancer.sticky_session=false
worker.loadbalancer.balanced_workers=node01,node02

As you can see i use two server ('agnes' IP : 192.168.2.102 and
'ovea-inspiron' IP : 192.168.2.103)
I' ve coded a little aplication who read un file and create a sessions if
session not exist.

If i use the system in mod load balancing (with no cluster mod activate)
all is great (my config is of course worker.loadbalancer.sticky_session=true
)

So system run with session affinitu but the two server are accessible ;)

Now i try to configure as cluster mode with session replication
(my config is now worker.loadbalancer.sticky_session=3Dfalse)

I configure my to server.xml like that :
agnes (IP : 192.168.2.102)

Server port=8005 shutdown=SHUTDOWN
  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=8080 maxHttpHeaderSize=8192
  maxThreads=150 minSpareThreads=25
  maxSpareThreads=75
  enableLookups=false redirectPort=8443
acceptCount=100
  connectionTimeout=2 disableUploadTimeout=true
/

Connector port=8009 enableLookups=false
  redirectPort=8443 protocol=AJP/1.3 /

Engine name=Catalina defaultHost=localhost jvmRoute=node01 

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

  Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
 Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
  doClusterLog=true
  clusterLogName=clusterlog
  manager.className=
org.apache.catalina.cluster.session.DeltaManager
  manager.expireSessionsOnShutdown=false
  manager.notifyListenersOnReplication=true
  manager.notifySessionListenersOnReplication=true
  manager.sendAllSessions=true
  manager.sendAllSessionsSize=500
  manager.sendAllSessionsWaitTime=20

Membership className=
org.apache.catalina.cluster.mcast.McastService
 mcastBindAddress=192.168.2.102
 mcastAddr=224.0.0.1
 mcastPort=45564
 mcastFrequency=1000
 mcastDropTime=3/

Receiver className=
org.apache.catalina.cluster.tcp.ReplicationListener
 tcpListenAddress=192.168.2.102
 tcpListenPort=4000
 tcpSelectorTimeout=100
 tcpThreadCount=6 /

Sender className=
org.apache.catalina.cluster.tcp.ReplicationTransmitter
  replicationMode=fastasyncqueue
  doTransmitterProcessingStats=true
  doProcessingStats=true
  doWaitAckStats=true
  queueTimeWait=true
  queueDoStats=true
  queueCheckLock=true
  ackTimeout=15000
  waitForAck=true
  keepAliveTimeout=8
  keepAliveMaxRequestCount=-1 /

  /Host
/Engine
  /Service
/Server


ovea-inspiron (IP : 192.168.2.103)
Server port=9005 shutdown=SHUTDOWN

  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=9080 maxHttpHeaderSize=8192
   

Re: Tomcat 5.5.15 Clustering ?

2006-02-14 Thread Peter Rossbach

Hey,

1)	Clustering need sticky_session=true and is only design for  
failover (see servlet spec).

2)  Are your sure that MULTICAST is enabled at eth0?

regards
Peter
[EMAIL PROTECTED]



Am 15.02.2006 um 02:26 schrieb David Avenante:


Hi,

I' ve try to use Tomcat 5.5.15 in cluster mod. And after some work on
configuration and test
i seems to be on limit of my all possibilities ;)

I try to use two tomcat in cluster with apache web server and  
mod_jk as

connector.

my Apache configuration look like :


# workers.properties

ps=/

# List the workers name
worker.list=loadbalancer

# 
# First worker
# 
worker.node01.port=8009
worker.node01.host=agnes
worker.node01.type=ajp13
worker.node01.lbfactor=1
#worker.node01.domain=cluster1
# 
# Second worker
# 
worker.node02.port=9009
worker.node02.host=ovea-inspiron
worker.node02.type=ajp13
worker.node02.lbfactor=1
#worker.node02.domain=cluster1
# --
# Load Balancer worker
# --
worker.loadbalancer.type=lb
worker.loadbalancer.sticky_session=false
worker.loadbalancer.balanced_workers=node01,node02

As you can see i use two server ('agnes' IP : 192.168.2.102 and
'ovea-inspiron' IP : 192.168.2.103)
I' ve coded a little aplication who read un file and create a  
sessions if

session not exist.

If i use the system in mod load balancing (with no cluster mod  
activate)
all is great (my config is of course  
worker.loadbalancer.sticky_session=true

)

So system run with session affinitu but the two server are  
accessible ;)


Now i try to configure as cluster mode with session replication
(my config is now worker.loadbalancer.sticky_session=3Dfalse)

I configure my to server.xml like that :
agnes (IP : 192.168.2.102)

Server port=8005 shutdown=SHUTDOWN
  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=8080 maxHttpHeaderSize=8192
  maxThreads=150 minSpareThreads=25
  maxSpareThreads=75
  enableLookups=false redirectPort=8443
acceptCount=100
  connectionTimeout=2  
disableUploadTimeout=true

/

Connector port=8009 enableLookups=false
  redirectPort=8443 protocol=AJP/1.3 /

Engine name=Catalina defaultHost=localhost  
jvmRoute=node01 


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

  Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
 Cluster  
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

  doClusterLog=true
  clusterLogName=clusterlog
  manager.className=
org.apache.catalina.cluster.session.DeltaManager
  manager.expireSessionsOnShutdown=false
  manager.notifyListenersOnReplication=true
  manager.notifySessionListenersOnReplication=true
  manager.sendAllSessions=true
  manager.sendAllSessionsSize=500
  manager.sendAllSessionsWaitTime=20

Membership className=
org.apache.catalina.cluster.mcast.McastService
 mcastBindAddress=192.168.2.102
 mcastAddr=224.0.0.1
 mcastPort=45564
 mcastFrequency=1000
 mcastDropTime=3/

Receiver className=
org.apache.catalina.cluster.tcp.ReplicationListener
 tcpListenAddress=192.168.2.102
 tcpListenPort=4000
 tcpSelectorTimeout=100
 tcpThreadCount=6 /

Sender className=
org.apache.catalina.cluster.tcp.ReplicationTransmitter
  replicationMode=fastasyncqueue
  doTransmitterProcessingStats=true
  doProcessingStats=true
  doWaitAckStats=true
  queueTimeWait=true
  queueDoStats=true
  queueCheckLock=true
  ackTimeout=15000
  waitForAck=true
  keepAliveTimeout=8
  keepAliveMaxRequestCount=-1 /

  /Host
/Engine
  /Service
/Server


ovea-inspiron (IP : 192.168.2.103)
Server port=9005 shutdown=SHUTDOWN

  GlobalNamingResources
Resource name=UserDatabase auth=Container
 type=org.apache.catalina.UserDatabase
 description=User database that