You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tomcat Newbie <to...@allthatnet.com> on 2004/09/04 01:26:45 UTC

Tomcat 5.5 In-Memory Session Replication

I know the replication subject has been addressed somewhat for 5.x. I am
trying my first replication setup with two 5.5 servers on the same host.
Each Tomcat instance works just fine by itself.

I followed the configuration notes for Tomcat in the documentation for
in-memory replication, however I do not see any activity in the logs as
far as replication is concerned. The only thing I see logged is the
message:


Sep 3, 2004 6:59:37 PM org.apache.catalina.cluster.session.DeltaManager start
INFO: Starting clustering manager...:/servlets-examples
Sep 3, 2004 6:59:37 PM org.apache.catalina.cluster.session.DeltaManager start
INFO: Manager[/servlets-examples], skipping state transfer. No members active in cluster group.


The two instances are setup with unique tcpListenPort properties. The 
application has <distributable /> in web.xml on both instances. I tried the 
setup with both dirtyFlag enabled and disabled.

I even tried to put it behind Apache server proxy to get rid of localhost:port, 
but it has not changed anything. I still see no session replication activity. 
Each instance creates its own sessions and they are not propagated.

Can someone offer some ideas as to how to proceed?

Also, a couple of questions regarding the replication. What prevents a "hostile" tomcat
instance from joining the cluster when the cluster is configured on multiple hosts? Is 
there any documentation on replication using JDBC--I saw it mentioned, but no examples or
configuration options.


Thanks,

Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.5 In-Memory Session Replication

Posted by Tomcat Newbie <to...@allthatnet.com>.
> I forgot to tell you
> the debug flag is not in place anymore.
> if you want to see debug messages, you have to enable it through the logger.
> I setup log4j and set the output to DEBUG to see all the replication
> messages, there are plenty of them :)

OK, I remember seeing the post about log4j. I will look what it says
about not replicating! LOL

Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.5 In-Memory Session Replication

Posted by "Filip Hanik (lists)" <de...@hanik.com>.
and to do this, very easy,

just read
/tomcat-docs/config/printer/logger.html

Filip

-----Original Message-----
From: Filip Hanik (lists) [mailto:devlists@hanik.com]
Sent: Sunday, September 05, 2004 4:05 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.5 In-Memory Session Replication


I forgot to tell you
the debug flag is not in place anymore.
if you want to see debug messages, you have to enable it through the logger.
I setup log4j and set the output to DEBUG to see all the replication
messages, there are plenty of them :)

Filip

-----Original Message-----
From: Tomcat Newbie [mailto:tomcat@allthatnet.com]
Sent: Sunday, September 05, 2004 4:07 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.5 In-Memory Session Replication


> did you try replication with 5.0.27?
> if that works for you, then for sure something broke.

It does. Quietly, like 5.0.28, but it seems to work. I just tested 5.5
again, and I still cannot get it to replicate.


> 5.5 is still in dev mode, so you can't bank on everything working quit yet

Yes, I understand. I was only testing replication for the first time
anyway, since 5.5 will be production version before I know it. :-) You
guys are both fast and good. Usually, I find that even alpha versions
are pretty good.

I will have to stick to 5.0.28 for now. :-)

Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.5 In-Memory Session Replication

Posted by "Filip Hanik (lists)" <de...@hanik.com>.
I forgot to tell you
the debug flag is not in place anymore.
if you want to see debug messages, you have to enable it through the logger.
I setup log4j and set the output to DEBUG to see all the replication
messages, there are plenty of them :)

Filip

-----Original Message-----
From: Tomcat Newbie [mailto:tomcat@allthatnet.com]
Sent: Sunday, September 05, 2004 4:07 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.5 In-Memory Session Replication


> did you try replication with 5.0.27?
> if that works for you, then for sure something broke.

It does. Quietly, like 5.0.28, but it seems to work. I just tested 5.5
again, and I still cannot get it to replicate.


> 5.5 is still in dev mode, so you can't bank on everything working quit yet

Yes, I understand. I was only testing replication for the first time
anyway, since 5.5 will be production version before I know it. :-) You
guys are both fast and good. Usually, I find that even alpha versions
are pretty good.

I will have to stick to 5.0.28 for now. :-)

Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.5 In-Memory Session Replication

Posted by "Filip Hanik (lists)" <de...@hanik.com>.
Oki doki artichokie,
I just had 5 min to spare :), so I found the bug and fixed it in the 5.5
branch.
So replication should work like on 5.0.x in 5.5 now,
farming is still broken in 5.5

Filip

-----Original Message-----
From: Tomcat Newbie [mailto:tomcat@allthatnet.com]
Sent: Sunday, September 05, 2004 4:07 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.5 In-Memory Session Replication


> did you try replication with 5.0.27?
> if that works for you, then for sure something broke.

It does. Quietly, like 5.0.28, but it seems to work. I just tested 5.5
again, and I still cannot get it to replicate.


> 5.5 is still in dev mode, so you can't bank on everything working quit yet

Yes, I understand. I was only testing replication for the first time
anyway, since 5.5 will be production version before I know it. :-) You
guys are both fast and good. Usually, I find that even alpha versions
are pretty good.

I will have to stick to 5.0.28 for now. :-)

Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.5 In-Memory Session Replication

Posted by Tomcat Newbie <to...@allthatnet.com>.
> did you try replication with 5.0.27?
> if that works for you, then for sure something broke.

It does. Quietly, like 5.0.28, but it seems to work. I just tested 5.5
again, and I still cannot get it to replicate.


> 5.5 is still in dev mode, so you can't bank on everything working quit yet

Yes, I understand. I was only testing replication for the first time
anyway, since 5.5 will be production version before I know it. :-) You
guys are both fast and good. Usually, I find that even alpha versions
are pretty good.

I will have to stick to 5.0.28 for now. :-)

Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.5 In-Memory Session Replication

Posted by Tomcat Newbie <to...@allthatnet.com>.
> that is exactly the point I was trying to make. Setup your security in the
> OS that way you get more performance out of tomcat.
> If you allow mcast traffic from other hosts into your machine, you are
> already taking up resources.

Oh, I get it now. :-)


Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.5 In-Memory Session Replication

Posted by "Filip Hanik (lists)" <de...@hanik.com>.
>Well, my primary concern was that I don't want _other_ hosts to join my
>cluster not the other way around, so I am guessing I have to limit my
>mcast invitations and tcp traffic to relevant parties only?

that is exactly the point I was trying to make. Setup your security in the
OS that way you get more performance out of tomcat.
If you allow mcast traffic from other hosts into your machine, you are
already taking up resources.

Filip


-----Original Message-----
From: Filip Hanik (lists) [mailto:devlists@hanik.com]
Sent: Saturday, September 04, 2004 2:22 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.5 In-Memory Session Replication


did you try replication with 5.0.27?
if that works for you, then for sure something broke.
5.5 is still in dev mode, so you can't bank on everything working quit yet
:)

Filip

-----Original Message-----
From: Tomcat Newbie [mailto:tomcat@allthatnet.com]
Sent: Saturday, September 04, 2004 4:51 AM
To: Tomcat Users List
Subject: RE: Tomcat 5.5 In-Memory Session Replication


Thanks again, Filip. I am sending this response to document my
experience for others.

> set up machines to only access mcast and tcp traffic from certain IPs and
> certain ports.

Well, my primary concern was that I don't want _other_ hosts to join my
cluster not the other way around, so I am guessing I have to limit my
mcast invitations and tcp traffic to relevant parties only? :-)

> ok, I haven't tested replication on 5.5 yet myself, I've been to busy with
> corporate world.
> but from what I am reading, is that the replication valve is not issuing
the
> transfer or session deltas. Maybe something broke...we'll have to check

Sounds about right. Logs show original and replicate session creation.
Most of the time, SessionListener will log correct original session
attribute name, but null value. However, even when it does log both name
and value, still there is no replication done.

> you do have the replication valve set up in server.xml right?

I believe so. Default setup and I saw no instructions for additional
setup anywhere for replication valve, other than the filter options.


I figured I ventured into something too "bleeding edge" for me (I did so
mainly because Jakarta site said that 5.5 was branched off from 5.0.27).
So I went back to 5.0.28. Then, after spending a few hours pointlessly
watching the logs for any activity other than mcast membership
registrations, to my surprise, I discovered that the session attributes
were replicating beautifully on 5.0.28, but without any logging. Yup,
with all debug="" cranked up all the way to 9 or 10. Go figure! Glad it
works, though.

I also found a link for JDBC persistence manager (http://www.ingrid.org/
jajakarta/tomcat/tomcat-4.0b5/src/catalina/docs/JDBCStore-howto.html),
so I might go in that direction, since such setup would certainly
address my security concerns. Similar, but less complete documentation
is available for 5.x (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/
config/manager.html). I have played with built-in MySQL replication and
so far I have no complaints about its performance for low-load servers.
I just need to make sure that it stores sessions in MySQL all the time,
not just swapped. MySQL will take care of the rest.


Regards,

Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.5 In-Memory Session Replication

Posted by "Filip Hanik (lists)" <de...@hanik.com>.
did you try replication with 5.0.27?
if that works for you, then for sure something broke.
5.5 is still in dev mode, so you can't bank on everything working quit yet
:)

Filip

-----Original Message-----
From: Tomcat Newbie [mailto:tomcat@allthatnet.com]
Sent: Saturday, September 04, 2004 4:51 AM
To: Tomcat Users List
Subject: RE: Tomcat 5.5 In-Memory Session Replication


Thanks again, Filip. I am sending this response to document my
experience for others.

> set up machines to only access mcast and tcp traffic from certain IPs and
> certain ports.

Well, my primary concern was that I don't want _other_ hosts to join my
cluster not the other way around, so I am guessing I have to limit my
mcast invitations and tcp traffic to relevant parties only? :-)

> ok, I haven't tested replication on 5.5 yet myself, I've been to busy with
> corporate world.
> but from what I am reading, is that the replication valve is not issuing
the
> transfer or session deltas. Maybe something broke...we'll have to check

Sounds about right. Logs show original and replicate session creation.
Most of the time, SessionListener will log correct original session
attribute name, but null value. However, even when it does log both name
and value, still there is no replication done.

> you do have the replication valve set up in server.xml right?

I believe so. Default setup and I saw no instructions for additional
setup anywhere for replication valve, other than the filter options.


I figured I ventured into something too "bleeding edge" for me (I did so
mainly because Jakarta site said that 5.5 was branched off from 5.0.27).
So I went back to 5.0.28. Then, after spending a few hours pointlessly
watching the logs for any activity other than mcast membership
registrations, to my surprise, I discovered that the session attributes
were replicating beautifully on 5.0.28, but without any logging. Yup,
with all debug="" cranked up all the way to 9 or 10. Go figure! Glad it
works, though.

I also found a link for JDBC persistence manager (http://www.ingrid.org/
jajakarta/tomcat/tomcat-4.0b5/src/catalina/docs/JDBCStore-howto.html),
so I might go in that direction, since such setup would certainly
address my security concerns. Similar, but less complete documentation
is available for 5.x (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/
config/manager.html). I have played with built-in MySQL replication and
so far I have no complaints about its performance for low-load servers.
I just need to make sure that it stores sessions in MySQL all the time,
not just swapped. MySQL will take care of the rest.


Regards,

Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.5 In-Memory Session Replication

Posted by Tomcat Newbie <to...@allthatnet.com>.
Thanks again, Filip. I am sending this response to document my
experience for others.

> set up machines to only access mcast and tcp traffic from certain IPs and
> certain ports.

Well, my primary concern was that I don't want _other_ hosts to join my
cluster not the other way around, so I am guessing I have to limit my
mcast invitations and tcp traffic to relevant parties only? :-)

> ok, I haven't tested replication on 5.5 yet myself, I've been to busy with
> corporate world.
> but from what I am reading, is that the replication valve is not issuing the
> transfer or session deltas. Maybe something broke...we'll have to check

Sounds about right. Logs show original and replicate session creation.
Most of the time, SessionListener will log correct original session
attribute name, but null value. However, even when it does log both name
and value, still there is no replication done.

> you do have the replication valve set up in server.xml right?

I believe so. Default setup and I saw no instructions for additional
setup anywhere for replication valve, other than the filter options.


I figured I ventured into something too "bleeding edge" for me (I did so
mainly because Jakarta site said that 5.5 was branched off from 5.0.27).
So I went back to 5.0.28. Then, after spending a few hours pointlessly
watching the logs for any activity other than mcast membership
registrations, to my surprise, I discovered that the session attributes
were replicating beautifully on 5.0.28, but without any logging. Yup,
with all debug="" cranked up all the way to 9 or 10. Go figure! Glad it
works, though.

I also found a link for JDBC persistence manager (http://www.ingrid.org/
jajakarta/tomcat/tomcat-4.0b5/src/catalina/docs/JDBCStore-howto.html),
so I might go in that direction, since such setup would certainly
address my security concerns. Similar, but less complete documentation
is available for 5.x (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/
config/manager.html). I have played with built-in MySQL replication and
so far I have no complaints about its performance for low-load servers.
I just need to make sure that it stores sessions in MySQL all the time,
not just swapped. MySQL will take care of the rest.


Regards,

Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.5 In-Memory Session Replication

Posted by "Filip Hanik (lists)" <de...@hanik.com>.
>I am sure, my question was not very clear regarding security.

that is true, I'm sure you could limit this traffic with configuration on
your OS between your two servers.

set up machines to only access mcast and tcp traffic from certain IPs and
certain ports.

cause the feature you talk about, doesn't exist in Tomcat today

ok, I haven't tested replication on 5.5 yet myself, I've been to busy with
corporate world.
but from what I am reading, is that the replication valve is not issuing the
transfer or session deltas. Maybe something broke...we'll have to check
you do have the replication valve set up in server.xml right?

Filip

-----Original Message-----
From: Tomcat Newbie [mailto:tomcat@allthatnet.com]
Sent: Friday, September 03, 2004 11:36 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.5 In-Memory Session Replication


Filip,

Thank you for your assistance. You are very helpful as usual.

> Make sure you have multicast enabled. This can be a little tricky if you
run
> on a multihomed host, but you can google it.

OK, that may not be that difficult on a single host, or so I hope. I
tried on Fedora Linux (ifconfig showed multicast enabled, but a route
was missing in my setup):

route add -net 224.0.0.0 netmask 224.0.0.0 dev lo

which now allows me to see servers joining. This roue basically means
that I am not using network, or so they say. :-) (One probably should
stop tomcat instances before changing network settings, since CPU use
shot almost to 100%, as noted in the docs.)


> are you kidding me, there are no "hostile" tomcats, only "friendly" ones.
> (slap yourself on the head if you configure tomcats on the same multicast
> address but you don't want them to be in the same cluster, after a few
> times, you'll have it figured out :)

I am sure, my question was not very clear regarding security. Example, I
use two servers for webhosting. If I understand anything about
multicasting, that would imply that every multicast-able server on the
LAN will be receiving the brodacast? So if there was another Tomcat
instance on the LAN, which happened to have mcastAddress same as my
cluster, would it not receive an invitation to join the cluster?
Apparently, setting TTL would limit the multicast at a router, however I
am not sure if it applies to this situation, when I am dealing basically
with a LAN.

I made some progress in a sense that I can see servers joining. I see
session created on one server and also on another server. Session
attributes do not replicate however (with a default replication filter
and useDirtyFlag=true). Often SessionListener reports the attribute
value of null, but a few times when it actually reported a real value,
it still did not replicate. So I can access app instances on each server
with the same cookie and session information is different.

Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.5 In-Memory Session Replication

Posted by Tomcat Newbie <to...@allthatnet.com>.
Filip,

Thank you for your assistance. You are very helpful as usual.

> Make sure you have multicast enabled. This can be a little tricky if you run
> on a multihomed host, but you can google it.

OK, that may not be that difficult on a single host, or so I hope. I
tried on Fedora Linux (ifconfig showed multicast enabled, but a route
was missing in my setup):

route add -net 224.0.0.0 netmask 224.0.0.0 dev lo

which now allows me to see servers joining. This roue basically means
that I am not using network, or so they say. :-) (One probably should
stop tomcat instances before changing network settings, since CPU use
shot almost to 100%, as noted in the docs.)


> are you kidding me, there are no "hostile" tomcats, only "friendly" ones.
> (slap yourself on the head if you configure tomcats on the same multicast
> address but you don't want them to be in the same cluster, after a few
> times, you'll have it figured out :)

I am sure, my question was not very clear regarding security. Example, I
use two servers for webhosting. If I understand anything about
multicasting, that would imply that every multicast-able server on the
LAN will be receiving the brodacast? So if there was another Tomcat
instance on the LAN, which happened to have mcastAddress same as my
cluster, would it not receive an invitation to join the cluster?
Apparently, setting TTL would limit the multicast at a router, however I
am not sure if it applies to this situation, when I am dealing basically
with a LAN.

I made some progress in a sense that I can see servers joining. I see
session created on one server and also on another server. Session
attributes do not replicate however (with a default replication filter
and useDirtyFlag=true). Often SessionListener reports the attribute
value of null, but a few times when it actually reported a real value,
it still did not replicate. So I can access app instances on each server
with the same cookie and session information is different.

Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.5 In-Memory Session Replication

Posted by "Filip Hanik (lists)" <de...@hanik.com>.
also forgot to mention, setting TTL on the multicast will keep the multicast
messages from going all over the place

Filip

-----Original Message-----
From: Filip Hanik (lists) [mailto:devlists@hanik.com]
Sent: Friday, September 03, 2004 7:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 5.5 In-Memory Session Replication


Make sure you have multicast enabled. This can be a little tricky if you run
on a multihomed host, but you can google it.

>The only thing I see logged is the message:
If it says skipping state transfer, no other members in the cluster,
means that the members haven't discovered each other, this goes back to
making sure your multicasting is working. In the log you will see that
members are joining the cluster when it is working

>What prevents a "hostile" tomcat
>instance from joining the cluster when the cluster

are you kidding me, there are no "hostile" tomcats, only "friendly" ones.
(slap yourself on the head if you configure tomcats on the same multicast
address but you don't want them to be in the same cluster, after a few
times, you'll have it figured out :)

Filip

-----Original Message-----
From: Tomcat Newbie [mailto:tomcat@allthatnet.com]
Sent: Friday, September 03, 2004 6:27 PM
To: Tomcat Users List
Subject: Tomcat 5.5 In-Memory Session Replication


I know the replication subject has been addressed somewhat for 5.x. I am
trying my first replication setup with two 5.5 servers on the same host.
Each Tomcat instance works just fine by itself.

I followed the configuration notes for Tomcat in the documentation for
in-memory replication, however I do not see any activity in the logs as
far as replication is concerned. The only thing I see logged is the
message:


Sep 3, 2004 6:59:37 PM org.apache.catalina.cluster.session.DeltaManager
start
INFO: Starting clustering manager...:/servlets-examples
Sep 3, 2004 6:59:37 PM org.apache.catalina.cluster.session.DeltaManager
start
INFO: Manager[/servlets-examples], skipping state transfer. No members
active in cluster group.


The two instances are setup with unique tcpListenPort properties. The
application has <distributable /> in web.xml on both instances. I tried the
setup with both dirtyFlag enabled and disabled.

I even tried to put it behind Apache server proxy to get rid of
localhost:port,
but it has not changed anything. I still see no session replication
activity.
Each instance creates its own sessions and they are not propagated.

Can someone offer some ideas as to how to proceed?

Also, a couple of questions regarding the replication. What prevents a
"hostile" tomcat
instance from joining the cluster when the cluster is configured on multiple
hosts? Is
there any documentation on replication using JDBC--I saw it mentioned, but
no examples or
configuration options.


Thanks,

Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat 5.5 In-Memory Session Replication

Posted by "Filip Hanik (lists)" <de...@hanik.com>.
Make sure you have multicast enabled. This can be a little tricky if you run
on a multihomed host, but you can google it.

>The only thing I see logged is the message:
If it says skipping state transfer, no other members in the cluster,
means that the members haven't discovered each other, this goes back to
making sure your multicasting is working. In the log you will see that
members are joining the cluster when it is working

>What prevents a "hostile" tomcat
>instance from joining the cluster when the cluster

are you kidding me, there are no "hostile" tomcats, only "friendly" ones.
(slap yourself on the head if you configure tomcats on the same multicast
address but you don't want them to be in the same cluster, after a few
times, you'll have it figured out :)

Filip

-----Original Message-----
From: Tomcat Newbie [mailto:tomcat@allthatnet.com]
Sent: Friday, September 03, 2004 6:27 PM
To: Tomcat Users List
Subject: Tomcat 5.5 In-Memory Session Replication


I know the replication subject has been addressed somewhat for 5.x. I am
trying my first replication setup with two 5.5 servers on the same host.
Each Tomcat instance works just fine by itself.

I followed the configuration notes for Tomcat in the documentation for
in-memory replication, however I do not see any activity in the logs as
far as replication is concerned. The only thing I see logged is the
message:


Sep 3, 2004 6:59:37 PM org.apache.catalina.cluster.session.DeltaManager
start
INFO: Starting clustering manager...:/servlets-examples
Sep 3, 2004 6:59:37 PM org.apache.catalina.cluster.session.DeltaManager
start
INFO: Manager[/servlets-examples], skipping state transfer. No members
active in cluster group.


The two instances are setup with unique tcpListenPort properties. The
application has <distributable /> in web.xml on both instances. I tried the
setup with both dirtyFlag enabled and disabled.

I even tried to put it behind Apache server proxy to get rid of
localhost:port,
but it has not changed anything. I still see no session replication
activity.
Each instance creates its own sessions and they are not propagated.

Can someone offer some ideas as to how to proceed?

Also, a couple of questions regarding the replication. What prevents a
"hostile" tomcat
instance from joining the cluster when the cluster is configured on multiple
hosts? Is
there any documentation on replication using JDBC--I saw it mentioned, but
no examples or
configuration options.


Thanks,

Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org