Re: Tomcat Clustering, Mod_JK, Fail_on_Status, Stopped Application

2023-06-21 Thread Christopher Schultz

Mark and Dan,

On 6/21/23 04:57, Mark Thomas wrote:

On 20/06/2023 17:12, Dan McLaughlin wrote:

Mark,

What are your thoughts on changing the Tomcat codebase to return a 503
instead of a 404 if a context is marked as distributable or if
clustering is enabled and deployed but stopped?  When I did searches
years ago on this issue, most people at the time would recommend
adding 404 to the fail_on_status, which is what we did...until I
realized that we were causing our own internal DOS attack when we had
a 404 mistakenly left in our apps; that got me thinking how easy it
would be to make mod_jk thrash by just requesting pages that didn't
exist.   It's not a huge issue for us since most of our apps are
authenticated using SAML, so all requests are intercepted before the
request is ever sent to Tomcat, but for our apps that don't require
authentication, it would be easy to exploit any app that had 404 in
the fail_on_status.


I think the problem is the "STOPPED" state is used by different users 
for different things. Some want it to be equivalent to "The application 
isn't deployed" while others want it to be equivalent to "The 
application is present but currently under maintenance". I don't think 
we can safely infer which of those behaviors the user wants from the 
clustering and/or distributable settings.


I think the best solution is the "maintenance in progress" servlet 
deployed in the ROOT web application. Other options I considered:


1. New Lifecycle state "MAINTENANCE". This would be a significant change 
and I don't think the size of the problem justifies the scale of the 
changes required.


2. Extending/enhancing the "pause" feature. Not really the right place 
to start as pausing a context doesn't allow it to be updated (assuming 
updates are the main reason for the maintenance).


3. A per Host configuration option to set the status to be used for 
deployed but stopped web applications. Defaults to 404. Could be 
configured to be 503. Would require some changes to the mapper to 
add/remove contexts on deploy/undeploy rather than start/stop. Actually, 
this is a significant behavioural change since it changes the mapping. 
And the rewrite valve may complicate things further.


The more I think about this, the more nervous I get about changes like 
this introducing regressions.


I come back to the "maintenance in progress" servlet deployed in the 
ROOT web application. The one use case this doesn't cover is maintenance 
of the ROOT web application. Currently Tomcat is hard-coded to return a 
404 if a request would be mapped to ROOT but that application isn't 
started. I think a request to make that status configurable would be 
implemented pretty quickly.


If you want to remove the node from the load-balancer, why not ... just 
do it? You can't test an application without it being deployed, and 
taking a node down for maintenance can (and IMHO) should include 
notifying the load-balancer that that node is coming down for 
maintenance. Otherwise, you'll bounce users off the node unnecessarily.


Since mod_jk is being used, why not simply change the state of the 
node-worker in mod_jk from ACTIVE to DISABLED (for testing, since 
requests with that node as a target will continue to go to it) or 
STOPPED (where mod_jk won't send any requests to it anymore?


http://home.apache.org/~schultz/ApacheCon%20NA%202015/Load-balancing%20Tomcat%20with%20mod_jk.pdf
Start on Slide 41

-chris

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



Re: Tomcat Clustering, Mod_JK, Fail_on_Status, Stopped Application

2023-06-21 Thread Mark Thomas

On 20/06/2023 17:12, Dan McLaughlin wrote:

Mark,

What are your thoughts on changing the Tomcat codebase to return a 503
instead of a 404 if a context is marked as distributable or if
clustering is enabled and deployed but stopped?  When I did searches
years ago on this issue, most people at the time would recommend
adding 404 to the fail_on_status, which is what we did...until I
realized that we were causing our own internal DOS attack when we had
a 404 mistakenly left in our apps; that got me thinking how easy it
would be to make mod_jk thrash by just requesting pages that didn't
exist.   It's not a huge issue for us since most of our apps are
authenticated using SAML, so all requests are intercepted before the
request is ever sent to Tomcat, but for our apps that don't require
authentication, it would be easy to exploit any app that had 404 in
the fail_on_status.


I think the problem is the "STOPPED" state is used by different users 
for different things. Some want it to be equivalent to "The application 
isn't deployed" while others want it to be equivalent to "The 
application is present but currently under maintenance". I don't think 
we can safely infer which of those behaviors the user wants from the 
clustering and/or distributable settings.


I think the best solution is the "maintenance in progress" servlet 
deployed in the ROOT web application. Other options I considered:


1. New Lifecycle state "MAINTENANCE". This would be a significant change 
and I don't think the size of the problem justifies the scale of the 
changes required.


2. Extending/enhancing the "pause" feature. Not really the right place 
to start as pausing a context doesn't allow it to be updated (assuming 
updates are the main reason for the maintenance).


3. A per Host configuration option to set the status to be used for 
deployed but stopped web applications. Defaults to 404. Could be 
configured to be 503. Would require some changes to the mapper to 
add/remove contexts on deploy/undeploy rather than start/stop. Actually, 
this is a significant behavioural change since it changes the mapping. 
And the rewrite valve may complicate things further.


The more I think about this, the more nervous I get about changes like 
this introducing regressions.


I come back to the "maintenance in progress" servlet deployed in the 
ROOT web application. The one use case this doesn't cover is maintenance 
of the ROOT web application. Currently Tomcat is hard-coded to return a 
404 if a request would be mapped to ROOT but that application isn't 
started. I think a request to make that status configurable would be 
implemented pretty quickly.


Mark




--

Thanks,
Dan

On Tue, Jun 20, 2023 at 10:41 AM Dan McLaughlin  
wrote:


We typically don't deploy a ROOT context in our production environments--for no 
other reason than making it more difficult to poke around.  I'll look at that 
as an option. Thanks for the tips.

--

Thanks,
Dan


On Tue, Jun 20, 2023 at 10:28 AM Mark Thomas  wrote:


On 20/06/2023 15:41, Dan McLaughlin wrote:

So I tried to create a Valve to check to see if the application is stopped
and convert the 404 response to a 503, but I haven't had any luck getting
it to work. Is there another internal API that I should be using?
context.getState().isAvailable
ways seems to report the app is available even though it's stopped.


The code is looking at the wrong Context. Since the web application has
been stopped the request won't be mapped to it. I'm guessing the request
has been mapped to the root context which is available.

You'll need to do something like:

Container[] containers = request.getHost().findChildren();
for (Container container : containers) {
  if (container.getState().isAvailable()) {
  continue;
  }
  Context context = (Context) container;
  if (request.getDecodedRequestURI().equals(context.getPath()) ||
  request.getDecodedRequestURI().startsWith(
  context.getPath() + '/')) {
  response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
  }
}

I haven't optimised this at all. It isn't particularly efficient. It is
just to give you an idea.

Actually. I have just had a much better idea. It works by taking
advantage of the Servlet specification mapping rules which require the
longest context path match.

Lets assume you have /app1 /app2 and /app3

In your ROOT web application create a maintenance Servlet that just
returns a 503 and map it to "/app1/*" "/app2/*" and /app3/*".

If app1 is running, the longest context path match rule means it will be
mapped to /app1 and the application will handle it. If the web
application is stopped, the request will be mapped to ROOT where it will
match the maintenance Servlet and return a 503.

The only thing that this won't work for is if you want to take the RROT
web application out of service.

Mark



import org.apache.catalina.*;
import org.apache.catalina.connector.Request;
import 

Re: Tomcat Clustering, Mod_JK, Fail_on_Status, Stopped Application

2023-06-20 Thread Christopher Schultz

Dan,

On 6/20/23 11:32, Dan McLaughlin wrote:

When I attach with a debugger, I can see what's causing it not to
work.   When the Web Application is started, then
request.getContext(); returns the correct Web Application context, but
when the application is stopped, request.getContext(); returns the
ROOT context, which is up, so the 404 is passed on.  Why would
request.getContext(); return ROOT if that wasn't the requested
context?  Is this a bug?


I know you posted a lot of messages in a short amount of time, and maybe 
you've moved-on from this question, but..


How does Tomcat know the difference between a request for /foo/bar and 
/bar/foo if there is a ROOT application and a /foo application? What 
happens when /foo is stopped, undeployed, etc.? Why *wouldn't* ROOT 
handle all requests that don't go to another application? URL paths 
dictate which application handles a particular request, and the ROOT 
application, by definition, handles requests that don't map to another 
application.


-chris

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



Re: Tomcat Clustering, Mod_JK, Fail_on_Status, Stopped Application

2023-06-20 Thread Dan McLaughlin
FYI... Here is the valve I finally came up with that seems to work.

import org.apache.catalina.*;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.valves.ValveBase;

import jakarta.servlet.ServletException;
import java.io.IOException;
import java.util.logging.Logger;
import java.util.logging.Level;

import jakarta.servlet.http.HttpServletResponse;

public class DownForMaintenanceValve extends ValveBase {

// Create a Logger instance to log activity
private static final Logger log =
Logger.getLogger(DownForMaintenanceValve.class.getName());

// Constructor logs that the valve has been instantiated
public DownForMaintenanceValve() {
log.info("DownForMaintenanceValve started");
}

// Main method of the Valve, where the logic is implemented
@Override
public void invoke(Request request, Response response) throws
IOException, ServletException {
// Get the Context of the request
Context context = request.getContext();

// If the context is null, log an info message and send a 503 error
if (context == null) {
log.info("Context is null, sending 503");
response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
return; // Stop further execution
}

// If the context is not available, log an info message and send a 503 error
if (!context.getState().isAvailable()) {
log.info("Application is not available, sending 503");
response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
} else {
// If the context is available, get all contexts (children of the host)
Container[] containers = request.getHost().findChildren();

// Iterate over all contexts
for (Container container : containers) {
// If the current context is available, skip the rest of the loop
if (container.getState().isAvailable()) {
continue;
}
// Cast the container to Context to be able to call Context methods
context = (Context) container;

// If the request URI matches the path of the context or is a subpath
of the context,
// log an info message and send a 503 error
if (request.getDecodedRequestURI().equals(context.getPath()) ||
request.getDecodedRequestURI().startsWith(context.getPath() + '/')) {
log.info("Application is not available, sending 503");
response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
return; // Stop further execution
}
}
// If no unavailable context matching the request URI was found, log a
fine message
// and pass the request to the next Valve
log.info("Application is available, passing to next valve");
getNext().invoke(request, response);
}
}
}

--

Thanks,
Dan

On Tue, Jun 20, 2023 at 12:15 PM Dan McLaughlin  
wrote:
>
> One thing I just tested was to undeploy the ROOT context, which is how
> we run anyways, and this causes request.getContext() to return null,
> which with the code, as is, results in a null pointer and a 500 being
> thrown--which inadvertently would cause mod_jk to retry on another
> node.  I don't like letting code knowingly throw null pointers, so I
> was thinking of just checking if the context is null and throwing a
> 503. The only problem is that the valve would only work when the ROOT
> context wasn't deployed, so your two other suggestions would be the
> only options.
>
> Mark,
>
> I've been considering opening an official enhancement request to the
> clustering implementation in Tomcat that would state the following...
>
> Currently, when an application within a clustered environment is
> unavailable or stopped, Tomcat returns an HTTP 404 (Not Found) status
> code. While this behavior is generally acceptable in a non-clustered
> environment, it can lead to less than optimal routing decisions by
> load balancers within a clustered setup.
>
> Most load balancers, including mod_jk, do not interpret a 404 status
> code as an indication of application unavailability warranting a
> failover. Moreover, reconfiguring load balancers to treat 404 codes as
> triggers for failover could potentially expose systems to DOS attacks,
> as malicious users could generate unnecessary failovers by requesting
> non-existent resources.
>
> While there are workarounds to this issue, such as creating a custom
> valve to check the application status and modifying the 404 to a 503,
> or using root context and servlet mappings to return a 503, these
> solutions require custom implementations by the end user. This adds
> complexity and is not an ideal solution.
>
> In light of this, I propose that Tomcat should return an HTTP 503
> (Service Unavailable) status code when an application is not available
> in a clustered environment. The 503 code, which signifies temporary
> unavailability of the application, would align more accurately with
> the circumstances and could enable load balancers to make more
> informed and effective routing decisions.
>
> Thoughts?
>
> --
>
> Thanks,
> Dan
>
>
> --
>
> Thanks,
>
> Dan McLaughlin
>
> Robert Clay Vineyards
>
>
> Proprietor/Vigneron
>
> d...@robertclayvineyards.com
>
>
> mobile: 512.633.8086
>
> main: 

Re: Tomcat Clustering, Mod_JK, Fail_on_Status, Stopped Application

2023-06-20 Thread Dan McLaughlin
One thing I just tested was to undeploy the ROOT context, which is how
we run anyways, and this causes request.getContext() to return null,
which with the code, as is, results in a null pointer and a 500 being
thrown--which inadvertently would cause mod_jk to retry on another
node.  I don't like letting code knowingly throw null pointers, so I
was thinking of just checking if the context is null and throwing a
503. The only problem is that the valve would only work when the ROOT
context wasn't deployed, so your two other suggestions would be the
only options.

Mark,

I've been considering opening an official enhancement request to the
clustering implementation in Tomcat that would state the following...

Currently, when an application within a clustered environment is
unavailable or stopped, Tomcat returns an HTTP 404 (Not Found) status
code. While this behavior is generally acceptable in a non-clustered
environment, it can lead to less than optimal routing decisions by
load balancers within a clustered setup.

Most load balancers, including mod_jk, do not interpret a 404 status
code as an indication of application unavailability warranting a
failover. Moreover, reconfiguring load balancers to treat 404 codes as
triggers for failover could potentially expose systems to DOS attacks,
as malicious users could generate unnecessary failovers by requesting
non-existent resources.

While there are workarounds to this issue, such as creating a custom
valve to check the application status and modifying the 404 to a 503,
or using root context and servlet mappings to return a 503, these
solutions require custom implementations by the end user. This adds
complexity and is not an ideal solution.

In light of this, I propose that Tomcat should return an HTTP 503
(Service Unavailable) status code when an application is not available
in a clustered environment. The 503 code, which signifies temporary
unavailability of the application, would align more accurately with
the circumstances and could enable load balancers to make more
informed and effective routing decisions.

Thoughts?

--

Thanks,
Dan


--

Thanks,

Dan McLaughlin

Robert Clay Vineyards


Proprietor/Vigneron

d...@robertclayvineyards.com


mobile: 512.633.8086

main: 325.261.0075

https://robertclayvineyards.com



Facebook | Instagram





On Tue, Jun 20, 2023 at 10:28 AM Mark Thomas  wrote:
>
> On 20/06/2023 15:41, Dan McLaughlin wrote:
> > So I tried to create a Valve to check to see if the application is stopped
> > and convert the 404 response to a 503, but I haven't had any luck getting
> > it to work. Is there another internal API that I should be using?
> > context.getState().isAvailable
> > ways seems to report the app is available even though it's stopped.
>
> The code is looking at the wrong Context. Since the web application has
> been stopped the request won't be mapped to it. I'm guessing the request
> has been mapped to the root context which is available.
>
> You'll need to do something like:
>
> Container[] containers = request.getHost().findChildren();
> for (Container container : containers) {
>  if (container.getState().isAvailable()) {
>  continue;
>  }
>  Context context = (Context) container;
>  if (request.getDecodedRequestURI().equals(context.getPath()) ||
>  request.getDecodedRequestURI().startsWith(
>  context.getPath() + '/')) {
>  response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
>  }
> }
>
> I haven't optimised this at all. It isn't particularly efficient. It is
> just to give you an idea.
>
> Actually. I have just had a much better idea. It works by taking
> advantage of the Servlet specification mapping rules which require the
> longest context path match.
>
> Lets assume you have /app1 /app2 and /app3
>
> In your ROOT web application create a maintenance Servlet that just
> returns a 503 and map it to "/app1/*" "/app2/*" and /app3/*".
>
> If app1 is running, the longest context path match rule means it will be
> mapped to /app1 and the application will handle it. If the web
> application is stopped, the request will be mapped to ROOT where it will
> match the maintenance Servlet and return a 503.
>
> The only thing that this won't work for is if you want to take the RROT
> web application out of service.
>
> Mark
>
>
> > import org.apache.catalina.*;
> > import org.apache.catalina.connector.Request;
> > import org.apache.catalina.connector.Response;
> > import org.apache.catalina.valves.ValveBase;
> >
> > import jakarta.servlet.ServletException;
> > import java.io.IOException;
> > import java.util.logging.Logger;
> > import java.util.logging.Level;
> >
> > public class DownForMaintenanceValve extends ValveBase {
> >
> > // Create a Logger
> > private static final Logger log = Logger.getLogger(DownForMaintenanceValve.
> > class.getName());
> >
> > public DownForMaintenanceValve() {
> > 

Re: Tomcat Clustering, Mod_JK, Fail_on_Status, Stopped Application

2023-06-20 Thread Dan McLaughlin
Mark,

What are your thoughts on changing the Tomcat codebase to return a 503
instead of a 404 if a context is marked as distributable or if
clustering is enabled and deployed but stopped?  When I did searches
years ago on this issue, most people at the time would recommend
adding 404 to the fail_on_status, which is what we did...until I
realized that we were causing our own internal DOS attack when we had
a 404 mistakenly left in our apps; that got me thinking how easy it
would be to make mod_jk thrash by just requesting pages that didn't
exist.   It's not a huge issue for us since most of our apps are
authenticated using SAML, so all requests are intercepted before the
request is ever sent to Tomcat, but for our apps that don't require
authentication, it would be easy to exploit any app that had 404 in
the fail_on_status.

--

Thanks,
Dan

On Tue, Jun 20, 2023 at 10:41 AM Dan McLaughlin  
wrote:
>
> We typically don't deploy a ROOT context in our production environments--for 
> no other reason than making it more difficult to poke around.  I'll look at 
> that as an option. Thanks for the tips.
>
> --
>
> Thanks,
> Dan
>
>
> On Tue, Jun 20, 2023 at 10:28 AM Mark Thomas  wrote:
>>
>> On 20/06/2023 15:41, Dan McLaughlin wrote:
>> > So I tried to create a Valve to check to see if the application is stopped
>> > and convert the 404 response to a 503, but I haven't had any luck getting
>> > it to work. Is there another internal API that I should be using?
>> > context.getState().isAvailable
>> > ways seems to report the app is available even though it's stopped.
>>
>> The code is looking at the wrong Context. Since the web application has
>> been stopped the request won't be mapped to it. I'm guessing the request
>> has been mapped to the root context which is available.
>>
>> You'll need to do something like:
>>
>> Container[] containers = request.getHost().findChildren();
>> for (Container container : containers) {
>>  if (container.getState().isAvailable()) {
>>  continue;
>>  }
>>  Context context = (Context) container;
>>  if (request.getDecodedRequestURI().equals(context.getPath()) ||
>>  request.getDecodedRequestURI().startsWith(
>>  context.getPath() + '/')) {
>>  response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
>>  }
>> }
>>
>> I haven't optimised this at all. It isn't particularly efficient. It is
>> just to give you an idea.
>>
>> Actually. I have just had a much better idea. It works by taking
>> advantage of the Servlet specification mapping rules which require the
>> longest context path match.
>>
>> Lets assume you have /app1 /app2 and /app3
>>
>> In your ROOT web application create a maintenance Servlet that just
>> returns a 503 and map it to "/app1/*" "/app2/*" and /app3/*".
>>
>> If app1 is running, the longest context path match rule means it will be
>> mapped to /app1 and the application will handle it. If the web
>> application is stopped, the request will be mapped to ROOT where it will
>> match the maintenance Servlet and return a 503.
>>
>> The only thing that this won't work for is if you want to take the RROT
>> web application out of service.
>>
>> Mark
>>
>>
>> > import org.apache.catalina.*;
>> > import org.apache.catalina.connector.Request;
>> > import org.apache.catalina.connector.Response;
>> > import org.apache.catalina.valves.ValveBase;
>> >
>> > import jakarta.servlet.ServletException;
>> > import java.io.IOException;
>> > import java.util.logging.Logger;
>> > import java.util.logging.Level;
>> >
>> > public class DownForMaintenanceValve extends ValveBase {
>> >
>> > // Create a Logger
>> > private static final Logger log = Logger.getLogger(DownForMaintenanceValve.
>> > class.getName());
>> >
>> > public DownForMaintenanceValve() {
>> > log.info("DownForMaintenanceValve started");
>> > }
>> >
>> > @Override
>> > public void invoke(Request request, Response response) throws
>> > IOException, ServletException
>> > {
>> > Context context = request.getContext();
>> > if (!context.getState().isAvailable()) {
>> > log.info("Application is not available, sending 503");
>> > response.sendError(503);
>> > } else {
>> > log.fine("Application is available, passing to next valve");
>> > getNext().invoke(request, response);
>> > }
>> > }
>> > }
>> >
>> >
>> > --
>> >
>> > Thanks,
>> > Dan
>> >
>> > On Wed, Jun 14, 2023 at 2:32 PM Mark Thomas  wrote:
>> >
>> >> On 14/06/2023 19:49, Dan McLaughlin wrote:
>> >>> Hello,
>> >>>
>> >>> This is probably a question that would be better suited for the dev list,
>> >>> but I thought I'd start here first.
>> >>
>> >> That depends. It is generally better to start on the users list.
>> >>
>> >>> Does anyone understand the reasoning behind why Tomcat, when clustered,
>> >>> throws an HTTP status 404 and not a 503 when you have an application
>> >>> deployed but stopped or paused?
>> >>
>> >> The issue you describe only affects stopped applications. If an
>> >> 

Re: Tomcat Clustering, Mod_JK, Fail_on_Status, Stopped Application

2023-06-20 Thread Dan McLaughlin
We typically don't deploy a ROOT context in our production
environments--for no other reason than making it more difficult to poke
around.  I'll look at that as an option. Thanks for the tips.

--

Thanks,
Dan


On Tue, Jun 20, 2023 at 10:28 AM Mark Thomas  wrote:

> On 20/06/2023 15:41, Dan McLaughlin wrote:
> > So I tried to create a Valve to check to see if the application is
> stopped
> > and convert the 404 response to a 503, but I haven't had any luck getting
> > it to work. Is there another internal API that I should be using?
> > context.getState().isAvailable
> > ways seems to report the app is available even though it's stopped.
>
> The code is looking at the wrong Context. Since the web application has
> been stopped the request won't be mapped to it. I'm guessing the request
> has been mapped to the root context which is available.
>
> You'll need to do something like:
>
> Container[] containers = request.getHost().findChildren();
> for (Container container : containers) {
>  if (container.getState().isAvailable()) {
>  continue;
>  }
>  Context context = (Context) container;
>  if (request.getDecodedRequestURI().equals(context.getPath()) ||
>  request.getDecodedRequestURI().startsWith(
>  context.getPath() + '/')) {
>  response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
>  }
> }
>
> I haven't optimised this at all. It isn't particularly efficient. It is
> just to give you an idea.
>
> Actually. I have just had a much better idea. It works by taking
> advantage of the Servlet specification mapping rules which require the
> longest context path match.
>
> Lets assume you have /app1 /app2 and /app3
>
> In your ROOT web application create a maintenance Servlet that just
> returns a 503 and map it to "/app1/*" "/app2/*" and /app3/*".
>
> If app1 is running, the longest context path match rule means it will be
> mapped to /app1 and the application will handle it. If the web
> application is stopped, the request will be mapped to ROOT where it will
> match the maintenance Servlet and return a 503.
>
> The only thing that this won't work for is if you want to take the RROT
> web application out of service.
>
> Mark
>
>
> > import org.apache.catalina.*;
> > import org.apache.catalina.connector.Request;
> > import org.apache.catalina.connector.Response;
> > import org.apache.catalina.valves.ValveBase;
> >
> > import jakarta.servlet.ServletException;
> > import java.io.IOException;
> > import java.util.logging.Logger;
> > import java.util.logging.Level;
> >
> > public class DownForMaintenanceValve extends ValveBase {
> >
> > // Create a Logger
> > private static final Logger log =
> Logger.getLogger(DownForMaintenanceValve.
> > class.getName());
> >
> > public DownForMaintenanceValve() {
> > log.info("DownForMaintenanceValve started");
> > }
> >
> > @Override
> > public void invoke(Request request, Response response) throws
> > IOException, ServletException
> > {
> > Context context = request.getContext();
> > if (!context.getState().isAvailable()) {
> > log.info("Application is not available, sending 503");
> > response.sendError(503);
> > } else {
> > log.fine("Application is available, passing to next valve");
> > getNext().invoke(request, response);
> > }
> > }
> > }
> >
> >
> > --
> >
> > Thanks,
> > Dan
> >
> > On Wed, Jun 14, 2023 at 2:32 PM Mark Thomas  wrote:
> >
> >> On 14/06/2023 19:49, Dan McLaughlin wrote:
> >>> Hello,
> >>>
> >>> This is probably a question that would be better suited for the dev
> list,
> >>> but I thought I'd start here first.
> >>
> >> That depends. It is generally better to start on the users list.
> >>
> >>> Does anyone understand the reasoning behind why Tomcat, when clustered,
> >>> throws an HTTP status 404 and not a 503 when you have an application
> >>> deployed but stopped or paused?
> >>
> >> The issue you describe only affects stopped applications. If an
> >> application is paused then any requests to that application should be
> >> held until the application is unpaused (or the client timeouts out).
> >>
> >> The current Tomcat Mapper dates back to at least Tomcat 4. It might be
> >> earlier but I don't know the Tomcat 3 code well enough to find the
> >> Tomcat 3 mapping code in the web interface and I'm not curious enough to
> >> check the code out so I can use grep.
> >>
> >> The clustering implementation dates back to Tomcat 5.
> >>
> >> You'll need to dig through the archives to see if this topic was ever
> >> raised and, if it was, the result of that discussion. Probably around
> >> the time clustering was added.
> >>
> >>> I think I understand that my only option is to
> >>> failover for 404s considering the current implementation.
> >>
> >> That might cause problems. If the node returning 404 is marked as down
> >> you'll have a DoS vulnerability that is trivial to exploit.
> >>
> >>> I've looked to
> >>> see if there was a configuration setting related to clustering that
> 

Re: Tomcat Clustering, Mod_JK, Fail_on_Status, Stopped Application

2023-06-20 Thread Dan McLaughlin
When I attach with a debugger, I can see what's causing it not to
work.   When the Web Application is started, then
request.getContext(); returns the correct Web Application context, but
when the application is stopped, request.getContext(); returns the
ROOT context, which is up, so the 404 is passed on.  Why would
request.getContext(); return ROOT if that wasn't the requested
context?  Is this a bug?
--

Thanks,
Dan


--

Thanks,
Dan McLaughlin
DJAB Enterprises, LLC
d...@djabenterprises.com
mobile: 512.633.8086

NOTICE: This e-mail message and all attachments transmitted with it
are for the sole use of the intended recipient(s) and may contain
confidential and privileged information. Any unauthorized review, use,
disclosure or distribution is strictly prohibited. The contents of
this e-mail are confidential and may be subject to work product
privileges. If you are not the intended recipient, please contact the
sender by reply e-mail and destroy all copies of the original message.


On Tue, Jun 20, 2023 at 9:41 AM Dan McLaughlin  wrote:
>
> So I tried to create a Valve to check to see if the application is stopped 
> and convert the 404 response to a 503, but I haven't had any luck getting it 
> to work. Is there another internal API that I should be using? 
> context.getState().isAvailable ways seems to report the app is available even 
> though it's stopped.
> import org.apache.catalina.*;
> import org.apache.catalina.connector.Request;
> import org.apache.catalina.connector.Response;
> import org.apache.catalina.valves.ValveBase;
>
> import jakarta.servlet.ServletException;
> import java.io.IOException;
> import java.util.logging.Logger;
> import java.util.logging.Level;
>
> public class DownForMaintenanceValve extends ValveBase {
>
> // Create a Logger
> private static final Logger log = 
> Logger.getLogger(DownForMaintenanceValve.class.getName());
>
> public DownForMaintenanceValve() {
> log.info("DownForMaintenanceValve started");
> }
>
> @Override
> public void invoke(Request request, Response response) throws IOException, 
> ServletException {
> Context context = request.getContext();
> if (!context.getState().isAvailable()) {
> log.info("Application is not available, sending 503");
> response.sendError(503);
> } else {
> log.fine("Application is available, passing to next valve");
> getNext().invoke(request, response);
> }
> }
> }
>
>
> --
>
> Thanks,
> Dan
>
> On Wed, Jun 14, 2023 at 2:32 PM Mark Thomas  wrote:
>>
>> On 14/06/2023 19:49, Dan McLaughlin wrote:
>> > Hello,
>> >
>> > This is probably a question that would be better suited for the dev list,
>> > but I thought I'd start here first.
>>
>> That depends. It is generally better to start on the users list.
>>
>> > Does anyone understand the reasoning behind why Tomcat, when clustered,
>> > throws an HTTP status 404 and not a 503 when you have an application
>> > deployed but stopped or paused?
>>
>> The issue you describe only affects stopped applications. If an
>> application is paused then any requests to that application should be
>> held until the application is unpaused (or the client timeouts out).
>>
>> The current Tomcat Mapper dates back to at least Tomcat 4. It might be
>> earlier but I don't know the Tomcat 3 code well enough to find the
>> Tomcat 3 mapping code in the web interface and I'm not curious enough to
>> check the code out so I can use grep.
>>
>> The clustering implementation dates back to Tomcat 5.
>>
>> You'll need to dig through the archives to see if this topic was ever
>> raised and, if it was, the result of that discussion. Probably around
>> the time clustering was added.
>>
>> > I think I understand that my only option is to
>> > failover for 404s considering the current implementation.
>>
>> That might cause problems. If the node returning 404 is marked as down
>> you'll have a DoS vulnerability that is trivial to exploit.
>>
>> > I've looked to
>> > see if there was a configuration setting related to clustering that would
>> > allow me to change the behavior, and I couldn't find one; the only solution
>> > seems to be to write a custom listener that detects that an application is
>> > deployed but stopped or paused, and then throw a 503 instead.
>>
>> That would be a better short-term solution and fairly simple to write.
>> I'd probably do it as a Valve as you'll get access to Tomcat's internals
>> that way.
>>
>> The clustering implementation generally assumes that all applications
>> are available on all nodes. If that isn't the case I wouldn't be
>> surprised to see log messages indicating issues with replication.
>>
>> What is the use case for stopping one (or more) web applications on a node?
>>
>> Mark
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>

-- 








*NOTICE:* This e-mail message and all attachments transmitted with 
it are for the 

Re: Tomcat Clustering, Mod_JK, Fail_on_Status, Stopped Application

2023-06-20 Thread Mark Thomas

On 20/06/2023 15:41, Dan McLaughlin wrote:

So I tried to create a Valve to check to see if the application is stopped
and convert the 404 response to a 503, but I haven't had any luck getting
it to work. Is there another internal API that I should be using?
context.getState().isAvailable
ways seems to report the app is available even though it's stopped.


The code is looking at the wrong Context. Since the web application has 
been stopped the request won't be mapped to it. I'm guessing the request 
has been mapped to the root context which is available.


You'll need to do something like:

Container[] containers = request.getHost().findChildren();
for (Container container : containers) {
if (container.getState().isAvailable()) {
continue;
}
Context context = (Context) container;
if (request.getDecodedRequestURI().equals(context.getPath()) ||
request.getDecodedRequestURI().startsWith(
context.getPath() + '/')) {
response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
}
}

I haven't optimised this at all. It isn't particularly efficient. It is 
just to give you an idea.


Actually. I have just had a much better idea. It works by taking 
advantage of the Servlet specification mapping rules which require the 
longest context path match.


Lets assume you have /app1 /app2 and /app3

In your ROOT web application create a maintenance Servlet that just 
returns a 503 and map it to "/app1/*" "/app2/*" and /app3/*".


If app1 is running, the longest context path match rule means it will be 
mapped to /app1 and the application will handle it. If the web 
application is stopped, the request will be mapped to ROOT where it will 
match the maintenance Servlet and return a 503.


The only thing that this won't work for is if you want to take the RROT 
web application out of service.


Mark



import org.apache.catalina.*;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.valves.ValveBase;

import jakarta.servlet.ServletException;
import java.io.IOException;
import java.util.logging.Logger;
import java.util.logging.Level;

public class DownForMaintenanceValve extends ValveBase {

// Create a Logger
private static final Logger log = Logger.getLogger(DownForMaintenanceValve.
class.getName());

public DownForMaintenanceValve() {
log.info("DownForMaintenanceValve started");
}

@Override
public void invoke(Request request, Response response) throws
IOException, ServletException
{
Context context = request.getContext();
if (!context.getState().isAvailable()) {
log.info("Application is not available, sending 503");
response.sendError(503);
} else {
log.fine("Application is available, passing to next valve");
getNext().invoke(request, response);
}
}
}


--

Thanks,
Dan

On Wed, Jun 14, 2023 at 2:32 PM Mark Thomas  wrote:


On 14/06/2023 19:49, Dan McLaughlin wrote:

Hello,

This is probably a question that would be better suited for the dev list,
but I thought I'd start here first.


That depends. It is generally better to start on the users list.


Does anyone understand the reasoning behind why Tomcat, when clustered,
throws an HTTP status 404 and not a 503 when you have an application
deployed but stopped or paused?


The issue you describe only affects stopped applications. If an
application is paused then any requests to that application should be
held until the application is unpaused (or the client timeouts out).

The current Tomcat Mapper dates back to at least Tomcat 4. It might be
earlier but I don't know the Tomcat 3 code well enough to find the
Tomcat 3 mapping code in the web interface and I'm not curious enough to
check the code out so I can use grep.

The clustering implementation dates back to Tomcat 5.

You'll need to dig through the archives to see if this topic was ever
raised and, if it was, the result of that discussion. Probably around
the time clustering was added.


I think I understand that my only option is to
failover for 404s considering the current implementation.


That might cause problems. If the node returning 404 is marked as down
you'll have a DoS vulnerability that is trivial to exploit.


I've looked to
see if there was a configuration setting related to clustering that would
allow me to change the behavior, and I couldn't find one; the only

solution

seems to be to write a custom listener that detects that an application

is

deployed but stopped or paused, and then throw a 503 instead.


That would be a better short-term solution and fairly simple to write.
I'd probably do it as a Valve as you'll get access to Tomcat's internals
that way.

The clustering implementation generally assumes that all applications
are available on all nodes. If that isn't the case I wouldn't be
surprised to see log messages indicating issues with replication.

What is the use case for stopping one (or more) web applications on a node?

Mark


Re: Tomcat Clustering, Mod_JK, Fail_on_Status, Stopped Application

2023-06-20 Thread Dan McLaughlin
So I tried to create a Valve to check to see if the application is stopped
and convert the 404 response to a 503, but I haven't had any luck getting
it to work. Is there another internal API that I should be using?
context.getState().isAvailable
ways seems to report the app is available even though it's stopped.
import org.apache.catalina.*;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.valves.ValveBase;

import jakarta.servlet.ServletException;
import java.io.IOException;
import java.util.logging.Logger;
import java.util.logging.Level;

public class DownForMaintenanceValve extends ValveBase {

// Create a Logger
private static final Logger log = Logger.getLogger(DownForMaintenanceValve.
class.getName());

public DownForMaintenanceValve() {
log.info("DownForMaintenanceValve started");
}

@Override
public void invoke(Request request, Response response) throws
IOException, ServletException
{
Context context = request.getContext();
if (!context.getState().isAvailable()) {
log.info("Application is not available, sending 503");
response.sendError(503);
} else {
log.fine("Application is available, passing to next valve");
getNext().invoke(request, response);
}
}
}


--

Thanks,
Dan

On Wed, Jun 14, 2023 at 2:32 PM Mark Thomas  wrote:

> On 14/06/2023 19:49, Dan McLaughlin wrote:
> > Hello,
> >
> > This is probably a question that would be better suited for the dev list,
> > but I thought I'd start here first.
>
> That depends. It is generally better to start on the users list.
>
> > Does anyone understand the reasoning behind why Tomcat, when clustered,
> > throws an HTTP status 404 and not a 503 when you have an application
> > deployed but stopped or paused?
>
> The issue you describe only affects stopped applications. If an
> application is paused then any requests to that application should be
> held until the application is unpaused (or the client timeouts out).
>
> The current Tomcat Mapper dates back to at least Tomcat 4. It might be
> earlier but I don't know the Tomcat 3 code well enough to find the
> Tomcat 3 mapping code in the web interface and I'm not curious enough to
> check the code out so I can use grep.
>
> The clustering implementation dates back to Tomcat 5.
>
> You'll need to dig through the archives to see if this topic was ever
> raised and, if it was, the result of that discussion. Probably around
> the time clustering was added.
>
> > I think I understand that my only option is to
> > failover for 404s considering the current implementation.
>
> That might cause problems. If the node returning 404 is marked as down
> you'll have a DoS vulnerability that is trivial to exploit.
>
> > I've looked to
> > see if there was a configuration setting related to clustering that would
> > allow me to change the behavior, and I couldn't find one; the only
> solution
> > seems to be to write a custom listener that detects that an application
> is
> > deployed but stopped or paused, and then throw a 503 instead.
>
> That would be a better short-term solution and fairly simple to write.
> I'd probably do it as a Valve as you'll get access to Tomcat's internals
> that way.
>
> The clustering implementation generally assumes that all applications
> are available on all nodes. If that isn't the case I wouldn't be
> surprised to see log messages indicating issues with replication.
>
> What is the use case for stopping one (or more) web applications on a node?
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 








*NOTICE:* This e-mail message and all attachments transmitted with 
it are for the sole use of the intended recipient(s) and may contain 
confidential and privileged information. Any unauthorized review, use, 
disclosure, ​or distribution is strictly prohibited. The contents of this 
e-mail are confidential and may be subject to work product privileges. If 
you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message.





Re: Tomcat Clustering, Mod_JK, Fail_on_Status, Stopped Application

2023-06-14 Thread Dan McLaughlin
Hey Mark,

Thanks for the information and quick response!

The typical use case is either during a hot redeployment of an application;
we don't use the application context versions only because we had issues
with it in the past, but the last time I tried it was years ago.  If I
remember correctly, the problems might have been classloader issues or
related to JMX conflicts.  For that reason, we redeploy using the same
context and version. When the redeployment happens using the same context
version, there is a small window where the app is stopped during the
redeployment.  The other case is on rare occasions, we will need to stop
just one application deployed on a Tomcat node to troubleshoot something
where clustering is making it more difficult to debug. We don't want to
take down all the apps or the entire Tomcat node because we need it to
handle the load.

We don't hot deploy often, so it's not a huge issue, and even more rarely
do we run into issues in production where we need to stop just one app, but
it has happened. It would just be nice not to have to go tell mod_jk that a
node was down for an application or have to stop Tomcat to get it to not
send requests to a stopped app, if it was stopped and threw a 503 it would
just happen.

The only reason I even looked at this is that I've been tasked with
implementing a comprehensive solution for handling all the different error
conditions properly and displaying the proper error pages. We are also
implementing a way to put all our applications in a "Down for Maintenance
Mode" without having to stop them and that can be scheduled at the
individual application level.

I'll look at using a valve if we decide it's a big enough issue.

Thanks again for the explanation!

Dan

On Wed, Jun 14, 2023 at 2:32 PM Mark Thomas  wrote:

> On 14/06/2023 19:49, Dan McLaughlin wrote:
> > Hello,
> >
> > This is probably a question that would be better suited for the dev list,
> > but I thought I'd start here first.
>
> That depends. It is generally better to start on the users list.
>
> > Does anyone understand the reasoning behind why Tomcat, when clustered,
> > throws an HTTP status 404 and not a 503 when you have an application
> > deployed but stopped or paused?
>
> The issue you describe only affects stopped applications. If an
> application is paused then any requests to that application should be
> held until the application is unpaused (or the client timeouts out).
>
> The current Tomcat Mapper dates back to at least Tomcat 4. It might be
> earlier but I don't know the Tomcat 3 code well enough to find the
> Tomcat 3 mapping code in the web interface and I'm not curious enough to
> check the code out so I can use grep.
>
> The clustering implementation dates back to Tomcat 5.
>
> You'll need to dig through the archives to see if this topic was ever
> raised and, if it was, the result of that discussion. Probably around
> the time clustering was added.
>
> > I think I understand that my only option is to
> > failover for 404s considering the current implementation.
>
> That might cause problems. If the node returning 404 is marked as down
> you'll have a DoS vulnerability that is trivial to exploit.
>
> > I've looked to
> > see if there was a configuration setting related to clustering that would
> > allow me to change the behavior, and I couldn't find one; the only
> solution
> > seems to be to write a custom listener that detects that an application
> is
> > deployed but stopped or paused, and then throw a 503 instead.
>
> That would be a better short-term solution and fairly simple to write.
> I'd probably do it as a Valve as you'll get access to Tomcat's internals
> that way.
>
> The clustering implementation generally assumes that all applications
> are available on all nodes. If that isn't the case I wouldn't be
> surprised to see log messages indicating issues with replication.
>
> What is the use case for stopping one (or more) web applications on a node?
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 








*NOTICE:* This e-mail message and all attachments transmitted with 
it are for the sole use of the intended recipient(s) and may contain 
confidential and privileged information. Any unauthorized review, use, 
disclosure, ​or distribution is strictly prohibited. The contents of this 
e-mail are confidential and may be subject to work product privileges. If 
you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message.





Re: Tomcat Clustering, Mod_JK, Fail_on_Status, Stopped Application

2023-06-14 Thread Mark Thomas

On 14/06/2023 19:49, Dan McLaughlin wrote:

Hello,

This is probably a question that would be better suited for the dev list,
but I thought I'd start here first.


That depends. It is generally better to start on the users list.


Does anyone understand the reasoning behind why Tomcat, when clustered,
throws an HTTP status 404 and not a 503 when you have an application
deployed but stopped or paused?


The issue you describe only affects stopped applications. If an 
application is paused then any requests to that application should be 
held until the application is unpaused (or the client timeouts out).


The current Tomcat Mapper dates back to at least Tomcat 4. It might be 
earlier but I don't know the Tomcat 3 code well enough to find the 
Tomcat 3 mapping code in the web interface and I'm not curious enough to 
check the code out so I can use grep.


The clustering implementation dates back to Tomcat 5.

You'll need to dig through the archives to see if this topic was ever 
raised and, if it was, the result of that discussion. Probably around 
the time clustering was added.



I think I understand that my only option is to
failover for 404s considering the current implementation.


That might cause problems. If the node returning 404 is marked as down 
you'll have a DoS vulnerability that is trivial to exploit.



I've looked to
see if there was a configuration setting related to clustering that would
allow me to change the behavior, and I couldn't find one; the only solution
seems to be to write a custom listener that detects that an application is
deployed but stopped or paused, and then throw a 503 instead.


That would be a better short-term solution and fairly simple to write. 
I'd probably do it as a Valve as you'll get access to Tomcat's internals 
that way.


The clustering implementation generally assumes that all applications 
are available on all nodes. If that isn't the case I wouldn't be 
surprised to see log messages indicating issues with replication.


What is the use case for stopping one (or more) web applications on a node?

Mark

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



Re: Tomcat Clustering Support

2018-10-20 Thread Mark Thomas
On 11/10/18 10:12, Mark Thomas wrote:



> If folks think this looks reasonable, I can create a BZ enhancement
> request to implement it.

https://bz.apache.org/bugzilla/show_bug.cgi?id=62841

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



Re: Tomcat Clustering Support

2018-10-11 Thread Mark Thomas
On 10/10/18 23:04, Caldarale, Charles R wrote:
>> From: Mark Thomas [mailto:ma...@apache.org] 
>> Subject: Re: Tomcat Clustering Support
> 
>> Thread A is in the middle of processing a request. It is evaluating some
>> EL which requires access to the view map which in turn causes the
>> ViewMap to update the session.
>> com.sun.faces.application.view.ViewScopeManager.processEvent locks the
>> ViewMap object. It then tries to update the session. To do this it
>> requires the session lock. Thread A is waiting for this lock.
> 
> Assuming the ViewMap is used by multiple sessions, this locking order goes
> against the usual protocol of more local before more global.  Might be
> possible to file a bug report with Mojarra, but given that the code appears
> to be in a com.sun class, that might not get anywhere.
> 
>> Thread B is at the end of a request. The session has been updated and it
>> is attempting to write the updated session attributes to the cluster.
>> The session lock has been obtained. The individual attributes are being
>> written. The code has reached the ViewMap object. In order to write this
>> object, the ViewMap object must be locked. Thread B is waiting for this
>> lock.
> 
> This is the generally the more desirable order.

I think ViewMap is per session but I haven't looked that closely at the
code.

>> Has anyone on the users list come across this problem before? If so, how
>> have you solved it? Suggestions for alternative solutions also welcome.
> 
> Can the thread doing the session synchronization lock the session, get a
> shallow copy of the attributes, unlock the session, then process the
> attributes?  Not sure if that would maintain sufficient coherency.

A variation of that might work but at the possible expense of generating
rather more garbage. The changes to the session are stored in a
DeltaRequest. Currently the sequence is:
- lock session
- serialize DeltaRequest to message
- recycle DeltaRequest
- unlock session
- send message

Change that to:
- lock session
- keep reference to populated DeltaRequest
- provide session with new DeltaRequest object
- unlock session
- serialize populated DeltaRequest to message
- send message

and this deadlock should be resolved. To avoid the expense of creating a
new DeltaRequest each time, a pool of them could be used which should
minimise the garbage.

Looking at the sequence of events, I don't think this does much that is
likely to harm coherence.

If folks think this looks reasonable, I can create a BZ enhancement
request to implement it.

Mark

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



RE: Tomcat Clustering Support

2018-10-10 Thread Caldarale, Charles R
> From: Mark Thomas [mailto:ma...@apache.org] 
> Subject: Re: Tomcat Clustering Support

> Thread A is in the middle of processing a request. It is evaluating some
> EL which requires access to the view map which in turn causes the
> ViewMap to update the session.
> com.sun.faces.application.view.ViewScopeManager.processEvent locks the
> ViewMap object. It then tries to update the session. To do this it
> requires the session lock. Thread A is waiting for this lock.

Assuming the ViewMap is used by multiple sessions, this locking order goes
against the usual protocol of more local before more global.  Might be
possible to file a bug report with Mojarra, but given that the code appears
to be in a com.sun class, that might not get anywhere.

> Thread B is at the end of a request. The session has been updated and it
> is attempting to write the updated session attributes to the cluster.
> The session lock has been obtained. The individual attributes are being
> written. The code has reached the ViewMap object. In order to write this
> object, the ViewMap object must be locked. Thread B is waiting for this
> lock.

This is the generally the more desirable order.

> Has anyone on the users list come across this problem before? If so, how
> have you solved it? Suggestions for alternative solutions also welcome.

Can the thread doing the session synchronization lock the session, get a
shallow copy of the attributes, unlock the session, then process the
attributes?  Not sure if that would maintain sufficient coherency.

  - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.



smime.p7s
Description: S/MIME cryptographic signature


Re: Tomcat Clustering Support

2018-10-10 Thread Mark Thomas
On 15/08/18 20:52, Mark Thomas wrote:
> On 15/08/18 20:43, Scott Evans wrote:
>> Hi,
>>
>> Our system is on Apache Tomcat Version 8.0.47.
>> OS is Windows Server 2012 R2 Datacenter.
>>
>> We are looking for someone that may be interested in paid contract work to
>> assist with troubleshooting and resolving a Tomcat clustering issue in our
>> system.
>>
>> The system is composed of multiple Java PrimeFaces applications running in
>> a clustered Tomcat environment which is experiencing occasional
>> deadlocking issues from an unknown source requiring the Nodes to be cycled
>> in order to resolve.  The issue is only occurring in our Production
>> environment and we've determined that the issues are occurring at random
>> with the replication threads.
>>
>> We would need someone to help investigate our configuration and determine
>> if there are any further changes that can be made to our system to catch
>> these deadlock issues before they occur (requiring a Node cycle).
>>
>> Please let me know if you or someone you know may be interested or if you
>> have further questions I can help answer.
> 
> If you can provide a thread dump of the deadlock when it occurs we can
> probably help you here for free.

Scott provided me with a sanitised copy of the thread-dump off-line. I'm
sharing my analysis with the list (with Scott's permission) as I think
the root cause is likely to be of wider interest.

There was, indeed, a deadlock.

The issues was follows.

The application is using JSF. Specifically, the Mojarra implementation
from Oracle.

There are multiple concurrent requests for the same session.

Each request is processed by a dedicated thread (this is mandated by the
Servlet spec although it may not be expressed that way).

The threads in question are:

A. ajp-apr-8009-exec-9005
B. ajp-apr-8009-exec-9000

Thread A is in the middle of processing a request. It is evaluating some
EL which requires access to the view map which in turn causes the
ViewMap to update the session.
com.sun.faces.application.view.ViewScopeManager.processEvent locks the
ViewMap object. It then tries to update the session. To do this it
requires the session lock. Thread A is waiting for this lock.

Thread B is at the end of a request. The session has been updated and it
is attempting to write the updated session attributes to the cluster.
The session lock has been obtained. The individual attributes are being
written. The code has reached the ViewMap object. In order to write this
object, the ViewMap object must be locked. Thread B is waiting for this
lock.

So, thread A holds the lock that thread B wants and is waiting for the
lock thread B is holding. Thread B holds the lock the thread A wants and
is waiting for the lock thread A is holding. Deadlock.

This is, in essence, cause by a combination of how Tomcat's clustering
is designed and Mojarra is implemented.

The application is using the BackupManager. I assume with sticky
sessions. Therefore, I would expect session failover between nodes to be
a rare event.

My recommendation is to investigate excluding the ViewMap from the
replication via sessionAttributeNameFilter. You'd need a regular
expression that matched anything except
"com.sun.faces.application.view.activeViewMaps"
I don't know how integral this object is to Mojarra. Mojarra may simply
recreate this object if required. If not, you may need to trigger
recreation after failover. I don't know how feasible this solution is.
This will require some testing and possibly code changes.

Has anyone on the users list come across this problem before? If so, how
have you solved it? Suggestions for alternative solutions also welcome.

Mark

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



Re: Tomcat Clustering Support

2018-08-15 Thread Mark Thomas
On 15/08/18 20:43, Scott Evans wrote:
> Hi,
> 
> Our system is on Apache Tomcat Version 8.0.47.
> OS is Windows Server 2012 R2 Datacenter.
> 
> We are looking for someone that may be interested in paid contract work to
> assist with troubleshooting and resolving a Tomcat clustering issue in our
> system.
> 
> The system is composed of multiple Java PrimeFaces applications running in
> a clustered Tomcat environment which is experiencing occasional
> deadlocking issues from an unknown source requiring the Nodes to be cycled
> in order to resolve.  The issue is only occurring in our Production
> environment and we've determined that the issues are occurring at random
> with the replication threads.
> 
> We would need someone to help investigate our configuration and determine
> if there are any further changes that can be made to our system to catch
> these deadlock issues before they occur (requiring a Node cycle).
> 
> Please let me know if you or someone you know may be interested or if you
> have further questions I can help answer.

If you can provide a thread dump of the deadlock when it occurs we can
probably help you here for free.

Mark

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



Re: Tomcat clustering and FarmDeployer

2016-10-21 Thread Daniel Savard
Le 20 oct. 2016 3:21 PM, "André Warnier (tomcat)"  a écrit :
>
> Maybe naive, and I have never tried any of this myself, but is there a
reason why you cannot use method 2 in
>
http://tomcat.apache.org/tomcat-8.0-doc/deployer-howto.html#A_word_on_Contexts
> in that scenario ?
>

Thanks, tested for my needs and it's working fine. I had to change one
minor thing in my approach.


Re: Tomcat clustering and FarmDeployer

2016-10-20 Thread Daniel Savard
2016-10-20 15:16 GMT-04:00 André Warnier (tomcat) :

Maybe naive, and I have never tried any of this myself, but is there a
> reason why you cannot use method 2 in
> http://tomcat.apache.org/tomcat-8.0-doc/deployer-howto.html#
> A_word_on_Contexts
> in that scenario ?
>
>
André,

thanks I will give it a try. I never used method 2 before and I just forgot
about it.

-
Daniel Savard


Re: Tomcat clustering and FarmDeployer

2016-10-20 Thread tomcat

On 20.10.2016 20:50, Daniel Savard wrote:

Hi everyone,

I am testing the FarmDeployer in a Tomcat cluster environment and it seems
it cannot do what I would like it to do.

So far, it works fine to deploy the web application on all cluster members.
However, the way they are deployed is the plain war file drop into the
appBase directory. I didn't find any way to make it working with a context
specific to the application configured in the ${ENGINE}/${HOST}/appName.xml
file for example for the appName web application.

Anyone knows if there is a trick to do that? Or is there a reason it is not
possible to associate a context specific to the web application?

BTW, if it is of any use, I am running Tomcat 8.0.36 and Oracle JDK
1.8.0_92.



Maybe naive, and I have never tried any of this myself, but is there a reason why you 
cannot use method 2 in

http://tomcat.apache.org/tomcat-8.0-doc/deployer-howto.html#A_word_on_Contexts
in that scenario ?



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



Re: Tomcat clustering for simplified config

2015-10-12 Thread Christoph Nenning
Christopher,

> >> Hi list,
> >> 
> >> I just signed up to the list - please forgive any newb mistakes
> >> but hopefully I'm following the right format, style and content.
> >> 
> >> I currently work in a production environment with eight app
> >> servers, all running the same version of Tomcat (currently
> >> 7.0.62).  Four servers support version 1 of our app, the other
> >> four servers support version 2.  Within each group of four, two
> >> serve completely open content via 80, the other two support
> >> queries of sensitive data via 443.  Servers are named with a
> >> number system where all odd-named servers are for the secure
> >> content, all evens are open.
> >> 
> >> So here's the setup in a hopefully clearer portrayal:
> >> 
> >> App Version 1: Server 01: secure queries via 443 Server 02: open
> >> content via 80 Server 03: secure queries via 443 Server 04: open
> >> content via 80
> >> 
> >> App Version 2: Server 05: secure queries via 443 Server 06: open
> >> content via 80 Server 07: secure queries via 443 Server 08: open
> >> content via 80
> >> 
> >> Each pair of even and odd named servers are *conceptually*
> >> linked, but physically stand on their own.  All http traffic and
> >> https traffic for each version is directed to a particular server
> >> by a load balancer.  No Apache Web Server is in the mix and we
> >> would like to keep it that way for simplicity.  Load-wise, our
> >> eight Tomcats are not taxed.
> >> 
> >> I'm responsible for upkeep of these servers, which requires
> >> regular version upgrades and configuration changes when any
> >> vulnerability is found by regular, periodic Nessus scans
> >> (http://www.tenable.com/ products/nessus-vulnerability-scanner).
> >> Sometimes the changes are related to ciphers, sometimes other
> >> things, but I'd say 90% of the time, I just need to upgrade to a
> >> newer version.
> >> 
> >> So no big deal conceptually, I fully admit, but doing this across
> >>  eight servers is TEDIOUS.  And more importantly, it's a ripe 
> >> opportunity for introducing user error.  On three occasions I
> >> have brought our production systems by stupid mistakes in
> >> server.xml or other config files, or most recently, accidentally
> >> copying the wrong ROOT from a version 2 (05) box into the version
> >> one boxes (01 and 03). I got things up and running fine with no
> >> serious consequences but this being the third time, I thought
> >> "there has to be a better way" right after I talked myself off
> >> the "you're a complete idiot"
> > ledge.
> >> 
> >> I'm starting to research Tomcat clustering but everything I see
> >> just talks about load balancing and failover.  **What about ease
> >> of configuration??** I'd like to be able to set up Tomcat
> >>  (clusters?) to help automate what I've described
> >> above to make it less tedious and reduce the chances of making
> >> stupid mistakes when I'm on the 6th, 7th, 8th server.  I'm not
> >> sure if Tomcat clustering is what I need, or if I should look at
> >> something else.
> >> 
> >> Can you nice folks help direct me to where I should look for 
> >> starters?  Will Tomcat clustering get me what I want?  or
> >> something else, like Zookeeper?
> >> 
> >> Thanks, Mark Bramer
> >> 
> > 
> > 
> > We do somthing similar by utilizing docker containers.
> > 
> > At first we create a base-image consisting of: - minified linux
> > distro - jvm - tomcat
> > 
> > Then we have application images based on that which add: - app
> > specific tomcat config - the app itself
> > 
> > These images can be run as multiple instances and thus becoming 
> > containers.
> > 
> > When we update tomcat it is done in the base-image and all
> > app-images are rebuilt and containers restarted. So it is just one
> > place where the change has to be done.
> > 
> > On config updates the according app-image is changed, rebuilt and 
> > restarted.
> 
> I would love to invite you to ApacheCon and have you give a
> presentation on how you do this because it's something I've been
> wanting to do for a while, now.
> 

Happy to hear that :)



> Would your employer send you to ApacheCon?
> 

Looks bad. ApacheCon Europe *might* be possible.


Regards,
Christoph

This Email was scanned by Sophos Anti Virus


Re: Tomcat clustering for simplified config

2015-10-12 Thread Chris Gamache

I don't have a solution or advice to contribute, but I hope I can spur along 
some more discussion on the issue.

We struggle with the problem of pets versus cattle also. 

We have a farm of pets right now. 

Our team is still evaluating at what level in our infrastructure our tomcat 
servers will live. 

Tomcat is its own container server, able to deploy and undeploy multiple apps 
all by itself. Making docker containers of tomcats which will then run multiple 
webapps-- would we deploy a whole container, pre-loaded with war files? That 
gives us the power of docker but eliminates the power of tomcat's own 
deployment. Do we create empty tomcat docker containers and fill them with 
warfiles once they are running? That gives us long-running docker containers 
which, from what I understand, misses the point of docker. Or do we go old 
school and use chef/puppet/ansible to create cattle servers in our private 
cloud without docker altogether. They will be long-running, but we will likely 
pay a price at server creation time. 

Plus, all the cool kids are using docker these days. 

So were stuck in this limbo, having to make a serious design choice. 

> On Oct 12, 2015, at 7:07 AM, Christoph Nenning 
>  wrote:
> 
> Christopher,
> 
 Hi list,
 
 I just signed up to the list - please forgive any newb mistakes
 but hopefully I'm following the right format, style and content.
 
 I currently work in a production environment with eight app
 servers, all running the same version of Tomcat (currently
 7.0.62).  Four servers support version 1 of our app, the other
 four servers support version 2.  Within each group of four, two
 serve completely open content via 80, the other two support
 queries of sensitive data via 443.  Servers are named with a
 number system where all odd-named servers are for the secure
 content, all evens are open.
 
 So here's the setup in a hopefully clearer portrayal:
 
 App Version 1: Server 01: secure queries via 443 Server 02: open
 content via 80 Server 03: secure queries via 443 Server 04: open
 content via 80
 
 App Version 2: Server 05: secure queries via 443 Server 06: open
 content via 80 Server 07: secure queries via 443 Server 08: open
 content via 80
 
 Each pair of even and odd named servers are *conceptually*
 linked, but physically stand on their own.  All http traffic and
 https traffic for each version is directed to a particular server
 by a load balancer.  No Apache Web Server is in the mix and we
 would like to keep it that way for simplicity.  Load-wise, our
 eight Tomcats are not taxed.
 
 I'm responsible for upkeep of these servers, which requires
 regular version upgrades and configuration changes when any
 vulnerability is found by regular, periodic Nessus scans
 (http://www.tenable.com/ products/nessus-vulnerability-scanner).
 Sometimes the changes are related to ciphers, sometimes other
 things, but I'd say 90% of the time, I just need to upgrade to a
 newer version.
 
 So no big deal conceptually, I fully admit, but doing this across
 eight servers is TEDIOUS.  And more importantly, it's a ripe 
 opportunity for introducing user error.  On three occasions I
 have brought our production systems by stupid mistakes in
 server.xml or other config files, or most recently, accidentally
 copying the wrong ROOT from a version 2 (05) box into the version
 one boxes (01 and 03). I got things up and running fine with no
 serious consequences but this being the third time, I thought
 "there has to be a better way" right after I talked myself off
 the "you're a complete idiot"
>>> ledge.
 
 I'm starting to research Tomcat clustering but everything I see
 just talks about load balancing and failover.  **What about ease
 of configuration??** I'd like to be able to set up Tomcat
  (clusters?) to help automate what I've described
 above to make it less tedious and reduce the chances of making
 stupid mistakes when I'm on the 6th, 7th, 8th server.  I'm not
 sure if Tomcat clustering is what I need, or if I should look at
 something else.
 
 Can you nice folks help direct me to where I should look for 
 starters?  Will Tomcat clustering get me what I want?  or
 something else, like Zookeeper?
 
 Thanks, Mark Bramer
>>> 
>>> 
>>> We do somthing similar by utilizing docker containers.
>>> 
>>> At first we create a base-image consisting of: - minified linux
>>> distro - jvm - tomcat
>>> 
>>> Then we have application images based on that which add: - app
>>> specific tomcat config - the app itself
>>> 
>>> These images can be run as multiple instances and thus becoming 
>>> containers.
>>> 
>>> When we update tomcat it is done in the base-image and all
>>> app-images are rebuilt and containers restarted. 

Re: Tomcat clustering for simplified config

2015-10-12 Thread Christoph Nenning
> I don't have a solution or advice to contribute, but I hope I can 
> spur along some more discussion on the issue.
> 
> We struggle with the problem of pets versus cattle also. 
> 
> We have a farm of pets right now. 
> 
> Our team is still evaluating at what level in our infrastructure our
> tomcat servers will live. 
> 


Here are some notes how *we* do it:


> Tomcat is its own container server, able to deploy and undeploy 
> multiple apps all by itself. Making docker containers of tomcats 
> which will then run multiple webapps-- would we deploy a whole 
> container, pre-loaded with war files? That gives us the power of 
> docker but eliminates the power of tomcat's own deployment. 

We think of it as "application containers", not "tomcat containers". So 
yes, we don't use tomcat's deployment powers anymore.



> Do we 
> create empty tomcat docker containers and fill them with warfiles 
> once they are running? 

We package tomcat, app and app-specific-tomcat-config in one image. 
Deploying a new version of an app means we deploy the whole image. 
Warfiles are not deployed anymore.



> That gives us long-running docker containers 
> which, from what I understand, misses the point of docker. 

We do use long-running docker containers.



> Or do we 
> go old school and use chef/puppet/ansible to create cattle servers 
> in our private cloud without docker altogether. They will be long-
> running, but we will likely pay a price at server creation time. 

We were thinking about that, too. But we concluded that maintaining our 
tomcats and apps with those tools is too hard for us. But actually we use 
puppet to run containers.



Regards,
Christoph

This Email was scanned by Sophos Anti Virus


Re: Tomcat clustering for simplified config

2015-10-07 Thread Mark Thomas
On 07/10/2015 00:36, Mark Bramer wrote:
> Hi list,
> 
> I just signed up to the list - please forgive any newb mistakes but hopefully 
> I'm following the right format, style and content.
> 
> I currently work in a production environment with eight app servers, all 
> running the same version of Tomcat (currently 7.0.62).  Four servers support 
> version 1 of our app, the other four servers support version 2.  Within each 
> group of four, two serve completely open content via 80, the other two 
> support queries of sensitive data via 443.  Servers are named with a number 
> system where all odd-named servers are for the secure content, all evens are 
> open.  
> 
> So here's the setup in a hopefully clearer portrayal:
> 
> App Version 1:
> Server 01: secure queries via 443
> Server 02: open content via 80
> Server 03: secure queries via 443
> Server 04: open content via 80
> 
> App Version 2:
> Server 05: secure queries via 443
> Server 06: open content via 80
> Server 07: secure queries via 443
> Server 08: open content via 80
> 
> Each pair of even and odd named servers are *conceptually* linked, but 
> physically stand on their own.  All http traffic and https traffic for each 
> version is directed to a particular server by a load balancer.  No Apache Web 
> Server is in the mix and we would like to keep it that way for simplicity.  
> Load-wise, our eight Tomcats are not taxed.
> 
> I'm responsible for upkeep of these servers, which requires regular version 
> upgrades and configuration changes when any vulnerability is found by 
> regular, periodic Nessus scans 
> (http://www.tenable.com/products/nessus-vulnerability-scanner).  Sometimes 
> the changes are related to ciphers, sometimes other things, but I'd say 90% 
> of the time, I just need to upgrade to a newer version.
> 
> So no big deal conceptually, I fully admit, but doing this across eight 
> servers is TEDIOUS.  And more importantly, it's a ripe opportunity for 
> introducing user error.  On three occasions I have brought our production 
> systems by stupid mistakes in server.xml or other config files, or most 
> recently, accidentally copying the wrong ROOT from a version 2 (05) box into 
> the version one boxes (01 and 03). I got things up and running fine with no 
> serious consequences but this being the third time, I thought "there has to 
> be a better way" right after I talked myself off the "you're a complete 
> idiot" ledge.  
> 
> I'm starting to research Tomcat clustering but everything I see just talks 
> about load balancing and failover.  **What about ease of configuration??** 
> I'd like to be able to set up Tomcat  (clusters?) to help automate 
> what I've described above to make it less tedious and reduce the chances of 
> making stupid mistakes when I'm on the 6th, 7th, 8th server.  I'm not sure if 
> Tomcat clustering is what I need, or if I should look at something else.
> 
> Can you nice folks help direct me to where I should look for starters?  Will 
> Tomcat clustering get me what I want?  or something else, like Zookeeper?

Tomcat clustering won't help.

A couple of things you might want to look at:

1. Use separate CATALINA_HOME / CATALINA_BASE. That reduces version
upgrades to:
- extract archive for new version
- stop instance
- edit startup script to point to new CATALINA_HOME
- start instance

2. Consider using ${your.property.name} style substitution in your xml
files. This lets you have a common configuration file that you can
simply copy across all your servers with server specific settings
defined as properties (that can be picked up from catalina.properties).
This allows 'global' changes to server.xml (or any other xml config
file) to be rolled out by copying the same file to all instances. You
should be able to use the same file in test and production, reducing the
chances of errors during changes.

HTH,

Mark


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



Re: Tomcat clustering for simplified config

2015-10-07 Thread Christoph Nenning
> Hi list,
> 
> I just signed up to the list - please forgive any newb mistakes but 
> hopefully I'm following the right format, style and content.
> 
> I currently work in a production environment with eight app servers,
> all running the same version of Tomcat (currently 7.0.62).  Four 
> servers support version 1 of our app, the other four servers support
> version 2.  Within each group of four, two serve completely open 
> content via 80, the other two support queries of sensitive data via 
> 443.  Servers are named with a number system where all odd-named 
> servers are for the secure content, all evens are open. 
> 
> So here's the setup in a hopefully clearer portrayal:
> 
> App Version 1:
> Server 01: secure queries via 443
> Server 02: open content via 80
> Server 03: secure queries via 443
> Server 04: open content via 80
> 
> App Version 2:
> Server 05: secure queries via 443
> Server 06: open content via 80
> Server 07: secure queries via 443
> Server 08: open content via 80
> 
> Each pair of even and odd named servers are *conceptually* linked, 
> but physically stand on their own.  All http traffic and https 
> traffic for each version is directed to a particular server by a 
> load balancer.  No Apache Web Server is in the mix and we would like
> to keep it that way for simplicity.  Load-wise, our eight Tomcats 
> are not taxed.
> 
> I'm responsible for upkeep of these servers, which requires regular 
> version upgrades and configuration changes when any vulnerability is
> found by regular, periodic Nessus scans (http://www.tenable.com/
> products/nessus-vulnerability-scanner).  Sometimes the changes are 
> related to ciphers, sometimes other things, but I'd say 90% of the 
> time, I just need to upgrade to a newer version.
> 
> So no big deal conceptually, I fully admit, but doing this across 
> eight servers is TEDIOUS.  And more importantly, it's a ripe 
> opportunity for introducing user error.  On three occasions I have 
> brought our production systems by stupid mistakes in server.xml or 
> other config files, or most recently, accidentally copying the wrong
> ROOT from a version 2 (05) box into the version one boxes (01 and 
> 03). I got things up and running fine with no serious consequences 
> but this being the third time, I thought "there has to be a better 
> way" right after I talked myself off the "you're a complete idiot" 
ledge. 
> 
> I'm starting to research Tomcat clustering but everything I see just
> talks about load balancing and failover.  **What about ease of 
> configuration??** I'd like to be able to set up Tomcat  
> (clusters?) to help automate what I've described above to make it 
> less tedious and reduce the chances of making stupid mistakes when 
> I'm on the 6th, 7th, 8th server.  I'm not sure if Tomcat clustering 
> is what I need, or if I should look at something else.
> 
> Can you nice folks help direct me to where I should look for 
> starters?  Will Tomcat clustering get me what I want?  or something 
> else, like Zookeeper?
> 
> Thanks,
> Mark Bramer
> 


We do somthing similar by utilizing docker containers.

At first we create a base-image consisting of:
- minified linux distro
- jvm
- tomcat

Then we have application images based on that which add:
- app specific tomcat config
- the app itself

These images can be run as multiple instances and thus becoming 
containers.

When we update tomcat it is done in the base-image and all app-images are 
rebuilt and containers restarted. So it is just one place where the change 
has to be done.

On config updates the according app-image is changed, rebuilt and 
restarted.



Regards,
Christoph

This Email was scanned by Sophos Anti Virus


Re: Tomcat clustering for simplified config

2015-10-07 Thread Igor Cicimov
On 07/10/2015 10:37 AM, "Mark Bramer"  wrote:
>
> Hi list,
>
> I just signed up to the list - please forgive any newb mistakes but
hopefully I'm following the right format, style and content.
>
> I currently work in a production environment with eight app servers, all
running the same version of Tomcat (currently 7.0.62).  Four servers
support version 1 of our app, the other four servers support version 2.
Within each group of four, two serve completely open content via 80, the
other two support queries of sensitive data via 443.  Servers are named
with a number system where all odd-named servers are for the secure
content, all evens are open.
>
> So here's the setup in a hopefully clearer portrayal:
>
> App Version 1:
> Server 01: secure queries via 443
> Server 02: open content via 80
> Server 03: secure queries via 443
> Server 04: open content via 80
>
> App Version 2:
> Server 05: secure queries via 443
> Server 06: open content via 80
> Server 07: secure queries via 443
> Server 08: open content via 80
>
> Each pair of even and odd named servers are *conceptually* linked, but
physically stand on their own.  All http traffic and https traffic for each
version is directed to a particular server by a load balancer.  No Apache
Web Server is in the mix and we would like to keep it that way for
simplicity.  Load-wise, our eight Tomcats are not taxed.
>
> I'm responsible for upkeep of these servers, which requires regular
version upgrades and configuration changes when any vulnerability is found
by regular, periodic Nessus scans (
http://www.tenable.com/products/nessus-vulnerability-scanner).  Sometimes
the changes are related to ciphers, sometimes other things, but I'd say 90%
of the time, I just need to upgrade to a newer version.
>
> So no big deal conceptually, I fully admit, but doing this across eight
servers is TEDIOUS.  And more importantly, it's a ripe opportunity for
introducing user error.  On three occasions I have brought our production
systems by stupid mistakes in server.xml or other config files, or most
recently, accidentally copying the wrong ROOT from a version 2 (05) box
into the version one boxes (01 and 03). I got things up and running fine
with no serious consequences but this being the third time, I thought
"there has to be a better way" right after I talked myself off the "you're
a complete idiot" ledge.
>
> I'm starting to research Tomcat clustering but everything I see just
talks about load balancing and failover.  **What about ease of
configuration??** I'd like to be able to set up Tomcat 
(clusters?) to help automate what I've described above to make it less
tedious and reduce the chances of making stupid mistakes when I'm on the
6th, 7th, 8th server.  I'm not sure if Tomcat clustering is what I need, or
if I should look at something else.
>
> Can you nice folks help direct me to where I should look for starters?
Will Tomcat clustering get me what I want?  or something else, like
Zookeeper?
>
Sounds like you should start using configuration manager like Puppet, Chef
etc. We use Ansible and pretty happy with it.


Re: Tomcat clustering for simplified config

2015-10-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Christoph,

On 10/7/15 4:36 AM, Christoph Nenning wrote:
>> Hi list,
>> 
>> I just signed up to the list - please forgive any newb mistakes
>> but hopefully I'm following the right format, style and content.
>> 
>> I currently work in a production environment with eight app
>> servers, all running the same version of Tomcat (currently
>> 7.0.62).  Four servers support version 1 of our app, the other
>> four servers support version 2.  Within each group of four, two
>> serve completely open content via 80, the other two support
>> queries of sensitive data via 443.  Servers are named with a
>> number system where all odd-named servers are for the secure
>> content, all evens are open.
>> 
>> So here's the setup in a hopefully clearer portrayal:
>> 
>> App Version 1: Server 01: secure queries via 443 Server 02: open
>> content via 80 Server 03: secure queries via 443 Server 04: open
>> content via 80
>> 
>> App Version 2: Server 05: secure queries via 443 Server 06: open
>> content via 80 Server 07: secure queries via 443 Server 08: open
>> content via 80
>> 
>> Each pair of even and odd named servers are *conceptually*
>> linked, but physically stand on their own.  All http traffic and
>> https traffic for each version is directed to a particular server
>> by a load balancer.  No Apache Web Server is in the mix and we
>> would like to keep it that way for simplicity.  Load-wise, our
>> eight Tomcats are not taxed.
>> 
>> I'm responsible for upkeep of these servers, which requires
>> regular version upgrades and configuration changes when any
>> vulnerability is found by regular, periodic Nessus scans
>> (http://www.tenable.com/ products/nessus-vulnerability-scanner).
>> Sometimes the changes are related to ciphers, sometimes other
>> things, but I'd say 90% of the time, I just need to upgrade to a
>> newer version.
>> 
>> So no big deal conceptually, I fully admit, but doing this across
>>  eight servers is TEDIOUS.  And more importantly, it's a ripe 
>> opportunity for introducing user error.  On three occasions I
>> have brought our production systems by stupid mistakes in
>> server.xml or other config files, or most recently, accidentally
>> copying the wrong ROOT from a version 2 (05) box into the version
>> one boxes (01 and 03). I got things up and running fine with no
>> serious consequences but this being the third time, I thought
>> "there has to be a better way" right after I talked myself off
>> the "you're a complete idiot"
> ledge.
>> 
>> I'm starting to research Tomcat clustering but everything I see
>> just talks about load balancing and failover.  **What about ease
>> of configuration??** I'd like to be able to set up Tomcat
>>  (clusters?) to help automate what I've described
>> above to make it less tedious and reduce the chances of making
>> stupid mistakes when I'm on the 6th, 7th, 8th server.  I'm not
>> sure if Tomcat clustering is what I need, or if I should look at
>> something else.
>> 
>> Can you nice folks help direct me to where I should look for 
>> starters?  Will Tomcat clustering get me what I want?  or
>> something else, like Zookeeper?
>> 
>> Thanks, Mark Bramer
>> 
> 
> 
> We do somthing similar by utilizing docker containers.
> 
> At first we create a base-image consisting of: - minified linux
> distro - jvm - tomcat
> 
> Then we have application images based on that which add: - app
> specific tomcat config - the app itself
> 
> These images can be run as multiple instances and thus becoming 
> containers.
> 
> When we update tomcat it is done in the base-image and all
> app-images are rebuilt and containers restarted. So it is just one
> place where the change has to be done.
> 
> On config updates the according app-image is changed, rebuilt and 
> restarted.

I would love to invite you to ApacheCon and have you give a
presentation on how you do this because it's something I've been
wanting to do for a while, now.

Would your employer send you to ApacheCon?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJWFUEwAAoJEBzwKT+lPKRYw34P/1QAyLAWOioogv2pJPQ09Ppx
kFVvgw1XJPhaI2ZdFgadPXkrvm9wNJIU/cR+/I+97Ehpmk/DFM0ZutYjunzB0IeI
Cr883Y/PtPvJvhurkggM4P147F68d/4DpdSDCNrdmHteQ3k3lB6pY57PCCr/45zX
81s553Nn/Y/l3m4HEUjWbIYZI2BiL1Fp8aJ//hgB8t/GWAPRoeTh6PMstQqD9EhA
xE7dkdlH4vYVMUtV8krPUGGgIbfJ1Q3UOyk36SdDBx5kNacFPM1BrwW/HSwj9ou1
GYeAlb+uAYIaKglADhKkjVwTxeYnJWscA5yoaTzSUNyQE08yVTD/ekhlR9b5EVMi
XUa1G9lGLgpJjMhCVK6yqSn+fHbZvxDPaYzpFHG3UQmxVBI+kl8GKhckSQRtG64k
PTJrQsC1xcjwh0i4Fi/FrOaveHndNCHv2eQ7KbarKWivE886gLMBtINuHNWoGHuP
dcQUK2wiTWCQR141Oiqd17p18/gYxUqtOhyzNW3SxkfwyTvEfE8BT8ioOH0350Li
l53bTEAiqhnF2clzQcWLDjsuSWnMfjGLVT/KD2WFDUe0awjOy/kc16OqWndKdpB0
iWVM2Ds6ddf63h4bdBvLI2+INugu+PkQIXoN9/J7OYaNB+oo4GCUidPfk9kGRQl2
YaRATse6j0NsPjgipVju
=aprI
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org

Re: Tomcat Clustering

2015-01-15 Thread Arun Kumar
Hi Chris

Appreciate your help.

On 12/28/14 5:59 PM, Arun Kumar wrote:
 Thanks a ton for reaching me out and i really appreciate your help. I am
 new to Tomcat clustering, if my questions doesn't make any sense, please
 forgive me :)

 On 12/26/14 12:36 PM, Arun Kumar wrote:
 I have two Tomcat 7.0  installed on two different machines and
 edited the server.xml file on both the machines with the code
 below, i am not sure if the Tomcats are clustered.

 Which exact version of Tomcat 7.0?

 I have Tomcat 7.0.32 installed on both the machines.

You should definitely upgrade to 7.0.57 and continue with your testing.
There have been a lot of fixes in the intervening years between the two
releases. I haven't read the changelog, but I wouldn't be surprised if
something has been fixed between then and now.

The Tomcat versions that i have installed are by default by installing my
product SAP Business Objects, i haven't installed them separately. I cannot
update my tomcats, they will get updated once i update my Business Objects
product to higher versions.

 I tried to turn of one Tomcat manually to check if the clustering
 is implemented or not. But the failover doesn't work.

 Are you expecting that your sessions will be available to any node, or
 are you using sticky sessions? The term cluster usually indicates
 that you want distributable sessions that will be available on any
 cluster node, but I just wanted to confirm that's what you want.

 _Two things_

 First i wanted to test if the first tomcat fails the second Tomcat has
 to start. I was not testing the session sticky session in the first
 scenario.

Just to be clear: both Tomcats have to be running at the same time. When
one fails, the other can't start-up and take-over. Instead, they share
the load at first and then if one node goes down, fail-over to the other
(still running node) occurs.

I used a wronging wording to explain, the Two Tomcats will be running all
the time

 Secondly i want to implement Sticky session. I guess Apache (mod_jk) has
 to be implemented in front of the Tomcat servers for sticky session.

If you want to use load-balancing *at all*, you'll need a network
component out front. mod_jk is not necessary, and neither is Apache
httpd: you can do this with other products as well.

 We
 have a hardware load balancer appliance, can we use this hardware load
 balancer for load balancing without installing Apache (mod_jk). I don't
 have the details of the hardware appliance that load balances the
 Tomcats. (My Manager is on leave, so i have to wait until he returns)

If you can rig the LB to use part of Tomcat's session id as a
differentiating factor, then use the part of the session id after the
period (.) to determine which route to use (set by the jvmRoute
attribute of your Engine in server.xml). If that doesn't work, you can
almost always use a LB's built-in session-stickiness, which typically
uses HTTP cookies to maintain identification of the back-end instance.

We have a Netscaler Hardware Loadbalance which we used to do loadbalance
our two Tomcat servers, implemented HTTP cookies for Sticky session.

 If you can afford to have users re-login and re-start a workflow when
 a node fails, using session-stickiness without any formal clustering
 is a much easier configuration and will yield higher performance from
 the whole setup.

 What is the process if the users can afford re-login and restart a
 workflow ? Could you please guide me how to implement it. Does the code
 which i sent will be helpful for this scenario.

If a user makes a request to a resource which requires authentication,
Tomcat will store the user's request, challenge the user for
authentication and then re-process the original request
post-authentication. So, as long as your workflows contain enough
information in the HTTP request to resume those workflows after a
failed-over login, then there's nothing else for you to do.

I logged in using a unique URL given by my loadbalancing team to test if
the session replication. Created an active session and started a workflow
while the two Tomcats were running, stopped Tomcat 1 and tested my session
to see if i got kicked out or not, in which i was not kicked out and
workflow was still remained, did the same procedure by turning on the
Tomcat 1 and stopping the Tomcat 2 and checked if the the workflow existed
or not. I got an error message saying

com.businessobjects.sdk.core.server.CommunicationException$UnexpectedServerException:
 HTTP transport error: java.net.ConnectException: Connection timed out:
 connect
 at
 com.businessobjects.sdk.core.exception.ExceptionBuilder.make(ExceptionBuilder.java:152)
 at
 com.businessobjects.sdk.core.exception.ExceptionBuilder.make(ExceptionBuilder.java:109)
 at
 com.businessobjects.sdk.core.server.internal.AbstractServer.processIt(AbstractServer.java:183)
 at
 com.businessobjects.sdk.core.server.internal.AbstractServer.process(AbstractServer.java:133)
 at
 

Re: Tomcat Clustering

2014-12-28 Thread Arun Kumar
Thanks a ton for reaching me out and i really appreciate your help. I am
new to Tomcat clustering, if my questions doesn't make any sense, please
forgive me :)

On 12/26/14 12:36 PM, Arun Kumar wrote:
 I have two Tomcat 7.0  installed on two different machines and
 edited the server.xml file on both the machines with the code
 below, i am not sure if the Tomcats are clustered.

Which exact version of Tomcat 7.0?

I have Tomcat 7.0.32 installed on both the machines.

 I tried to turn of one Tomcat manually to check if the clustering
 is implemented or not. But the failover doesn't work.

Are you expecting that your sessions will be available to any node, or
are you using sticky sessions? The term cluster usually indicates
that you want distributable sessions that will be available on any
cluster node, but I just wanted to confirm that's what you want.

*Two things*

First i wanted to test if the first tomcat fails the second Tomcat has to
start. I was not testing the session sticky session in the first scenario.

Secondly i want to implement Sticky session. I guess Apache (mod_jk) has to
be implemented in front of the Tomcat servers for sticky session. We have a
hardware load balancer appliance, can we use this hardware load balancer
for load balancing without installing Apache (mod_jk). I don't have the
details of the hardware appliance that load balances the Tomcats. (My
Manager is on leave, so i have to wait until he returns)

If you can afford to have users re-login and re-start a workflow when
a node fails, using session-stickiness without any formal clustering
is a much easier configuration and will yield higher performance from
the whole setup.

What is the process if the users can afford re-login and restart a workflow
?Could you please guide me how to implement it. Does the code which i sent
will be helpful for this scenario.

Anyway...

 Please let me know how to confirm if the servers are clustered or
 not. Appreciate your help.

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

 Manager className=org.apache.catalina.ha.session.BackupManager
 expireSessionsOnShutdown=false
 notifyListenersOnReplication=true mapSendOptions=6/ !--
 Manager className=org.apache.catalina.ha.session.DeltaManager
 expireSessionsOnShutdown=false
 notifyListenersOnReplication=true/ -- Channel
 className=org.apache.catalina.tribes.group.GroupChannel
 Membership
 className=org.apache.catalina.tribes.membership.McastService
 address=228.0.0.4 port=45564 frequency=500 dropTime=3000/
 Receiver
 className=org.apache.catalina.tribes.transport.nio.NioReceiver
 address=auto port=5000 selectorTimeout=100 maxThreads=6/

 Sender
 className=org.apache.catalina.tribes.transport.ReplicationTransmitter


Transport

className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/


/Sender
 Interceptor

className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/


Interceptor

className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/


Interceptor

className=org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor/


/Channel

 Valve className=org.apache.catalina.ha.tcp.ReplicationValve


filter=.*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*\.html|.*\.css|.*\.txt/

  Deployer
 className=org.apache.catalina.ha.deploy.FarmWarDeployer
 tempDir=/tmp/war-temp/ deployDir=/tmp/war-deploy/
 watchDir=/tmp/war-listen/ watchEnabled=false/

 ClusterListener
 className=org.apache.catalina.ha.session.ClusterSessionListener/


/Cluster

When you say failover doesn't work do you mean that you don't get
sent to another back-end server, or do you mean that when you get to
that alternate server, your session isn't there?

Failover in my opinion is, if the first Tomcat fails the second server has
to start and the application should be available to the users without any
downtime. Sticky session was not part of my failover testing.

My first question is: do you have distributable/ set in your
web.xml? That's the easiest thing to overlook because it's not in
server.xml and will silently prevent your sessions from being
distributed to the rest of the cluster.

No, i haven't edited the web.xml file with the distributable/ set, the
Tomcat - How to cluster web page has that information, but they don't
clearly explain the procedure where to add it in the web.xml file. Do i
need to just add distributable/ parameter at the end by opening it in
the notepad. Please let me know.


Regards !!
Arun Chanda

On Sat, Dec 27, 2014 at 11:05 AM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Arun,

 On 12/26/14 12:36 PM, Arun Kumar wrote:
  I have two Tomcat 7.0  installed on two different machines and
  edited the server.xml file on both the machines with the code
  below, i am not sure if the Tomcats are clustered.

 Which exact version of Tomcat 7.0?

  I tried to turn of one Tomcat manually to check if the 

Re: Tomcat Clustering

2014-12-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Arun,

On 12/26/14 12:36 PM, Arun Kumar wrote:
 I have two Tomcat 7.0  installed on two different machines and
 edited the server.xml file on both the machines with the code
 below, i am not sure if the Tomcats are clustered.

Which exact version of Tomcat 7.0?

 I tried to turn of one Tomcat manually to check if the clustering
 is implemented or not. But the failover doesn't work.

Are you expecting that your sessions will be available to any node, or
are you using sticky sessions? The term cluster usually indicates
that you want distributable sessions that will be available on any
cluster node, but I just wanted to confirm that's what you want.

If you can afford to have users re-login and re-start a workflow when
a node fails, using session-stickiness without any formal clustering
is a much easier configuration and will yield higher performance from
the whole setup.

Anyway...

 Please let me know how to confirm if the servers are clustered or
 not. Appreciate your help.
 
 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster 
 channelSendOptions=6
 
 Manager className=org.apache.catalina.ha.session.BackupManager 
 expireSessionsOnShutdown=false 
 notifyListenersOnReplication=true mapSendOptions=6/ !-- 
 Manager className=org.apache.catalina.ha.session.DeltaManager 
 expireSessionsOnShutdown=false 
 notifyListenersOnReplication=true/ -- Channel
 className=org.apache.catalina.tribes.group.GroupChannel 
 Membership 
 className=org.apache.catalina.tribes.membership.McastService 
 address=228.0.0.4 port=45564 frequency=500 dropTime=3000/ 
 Receiver 
 className=org.apache.catalina.tribes.transport.nio.NioReceiver 
 address=auto port=5000 selectorTimeout=100 maxThreads=6/
 
 Sender 
 className=org.apache.catalina.tribes.transport.ReplicationTransmitter

 
Transport
 className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/

 
/Sender
 Interceptor 
 className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/

 
Interceptor
 className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/

 
Interceptor
 className=org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor/

 
/Channel
 
 Valve className=org.apache.catalina.ha.tcp.ReplicationValve
 
 filter=.*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*\.html|.*\.css|.*\.txt/

  Deployer
 className=org.apache.catalina.ha.deploy.FarmWarDeployer 
 tempDir=/tmp/war-temp/ deployDir=/tmp/war-deploy/ 
 watchDir=/tmp/war-listen/ watchEnabled=false/
 
 ClusterListener 
 className=org.apache.catalina.ha.session.ClusterSessionListener/

 
/Cluster

When you say failover doesn't work do you mean that you don't get
sent to another back-end server, or do you mean that when you get to
that alternate server, your session isn't there?

My first question is: do you have distributable/ set in your
web.xml? That's the easiest thing to overlook because it's not in
server.xml and will silently prevent your sessions from being
distributed to the rest of the cluster.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUntiuAAoJEBzwKT+lPKRYZPsP/0WLFhAbn/ASUbGSoXDhxs99
TMVs3Y7+UcacuosSpSldT2NLqY5qUMdGtJY6UUl4LVQ2NPdZ9bgak8MJCgl0IsnK
r7bld1KrlDp47O/7gt9lEqqvPZ93jWBE3/CNdCPX8dHaAXx5NnDHlJsxKc/va1G4
H5b5pMc0GAzkhGCdEe0f0+cTQ8FXKfF83jUPmjhNCkyPsh352zIPo0yhkxBh4LOm
UCakw54k1YtGxcpSQlc5NuCEtHTq+rKZQPTAL2q8pYfxZe4kqbPFGF+mY+BCkmLR
ndSmZdY+FIWx1lvRd3QmPziPdvxQETrCveDf7GlUZz2qTgNtOItlz5me0bDG4Zfx
B4xf6qD7LfKoUtV/FSjj6nsT8AXIfJy2sVC0JY9sWWxqDmvoPa+0M1Fat8UlGq0m
c2wNuHSdAjnAr+OUS2rKAXUkp/Qe1xbK8/XvjhplPUauN0pjU3o9FsToMrpT1teP
llXOxF6G6cPr4QEpfGVv1QP7e+PapOnX1IFR1hVqcJPYYAcuzTtZpCf/j1lJJKIO
S7PDj8W0AeKyLoBxWvOk+tzTQpQ32YPMg0joVpA8NmZxONedXc09AOKmV/SabgXY
GJMTXyLxGrAM0k6nzfSyXyPI/QsSqLOdeyb8Br1FZxj2Ec1ybuuNMhhBFa/yVF10
GZR36ISkSFpcXZzHzahw
=AlDX
-END PGP SIGNATURE-

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



Re: Tomcat Clustering - when the tomcat instances are on different machines

2013-12-17 Thread Keiichi Fujino
DeltaManager starts session sync phase by sending a SESSION-GET-ALL message
at startup.
DeltaManager that has received the SESSION-GET-ALL message sends all
session data by sending a ALL-SESSION-DATA message.
Then sends a SESSION-STATE-TRANSFERED message in order to notify the
transmission completion.
DeltaManager that has received the SESSION-STATE-TRANSFERED message
completes session sync phase.


According to this log,



 Dec 16, 2013 6:43:29 PM org.apache.catalina.ha.session.DeltaManager
 waitForSendAllSessions
 SEVERE: Manager [/HATest]: No session state send at 12/16/13 6:42 PM
 received, timing out after 60,102 ms.


This log means that time-out occurred in session sync phase. (Default 60
seconds)

and



 Dec 16, 2013 6:43:29 PM org.apache.catalina.ha.session.DeltaManager
 getAllClusterSessions
 WARNING: Manager [/HATest]: Drop message SESSION-GET-ALL inside
 GET_ALL_SESSIONS sync phase start date 12/16/13 6:42 PM message date 1/1/70
 2:00 AM


This log means that SESSION-GET-ALL message that received during session
sync phase is dropped.

Thus, It seems that two nodes were started at the same time.
If SESSION-GET-ALL message is dropped, SESSION-STATE-TRANSFERED message can
not be received.
As a result, will be time-out  in session sync phase.

You should start Tomcat in proper order (rather than simultaneously).

Another problem.
In warning log, time stamp of the SESSION-GET-ALL messages that were
dropped has become to 1/1/70.
This is just a trivial bug.
I will fix this later.
That way, the correct time stamp will be output.




 Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
 deployDirectory
 INFO: Deploying web application directory
 /usr/local/tomcat7/apache-tomcat-7.0.47/webapps/docs
 Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
 deployDirectory
 INFO: Deploying web application directory
 /usr/local/tomcat7/apache-tomcat-7.0.47/webapps/host-manager
 Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
 deployDirectory
 INFO: Deploying web application directory
 /usr/local/tomcat7/apache-tomcat-7.0.47/webapps/ROOT
 Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
 deployDirectory
 INFO: Deploying web application directory
 /usr/local/tomcat7/apache-tomcat-7.0.47/webapps/examples
 Dec 16, 2013 6:43:30 PM org.apache.catalina.startup.HostConfig
 deployDirectory
 INFO: Deploying web application directory
 /usr/local/tomcat7/apache-tomcat-7.0.47/webapps/manager
 Dec 16, 2013 6:43:30 PM org.apache.catalina.ha.session.DeltaManager
 startInternal
 INFO: Register manager /manager to cluster element Host with name localhost
 Dec 16, 2013 6:43:30 PM org.apache.catalina.ha.session.DeltaManager
 startInternal
 INFO: Starting clustering manager at /manager
 Dec 16, 2013 6:43:30 PM org.apache.catalina.ha.session.DeltaManager
 getAllClusterSessions
 INFO: Manager [/manager], requesting session state from
 org.apache.catalina.tribes.membership.MemberImpl[tcp://{127, 0, 1,
 1}:5000,{127, 0, 1, 1},5000, alive=65057, securePort=-1, UDP Port=-1,
 id={-90 41 -113 110 96 -50 78 -88 -79 -103 1 61 -60 -125 75 44 },
 payload={}, command={}, domain={}, ]. This operation will timeout if no
 session state has been received within 60 seconds.
 Dec 16, 2013 6:44:16 PM
 org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
 memberDisappeared
 INFO: Verification complete. Member
 disappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp://{127, 0,
 1, 1}:5000,{127, 0, 1, 1},5000, alive=112037, securePort=-1, UDP Port=-1,
 id={-90 41 -113 110 96 -50 78 -88 -79 -103 1 61 -60 -125 75 44 },
 payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)}, domain={}, ]]
 Dec 16, 2013 6:44:16 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
 memberDisappeared
 INFO: Received member
 disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://{127, 0,
 1, 1}:5000,{127, 0, 1, 1},5000, alive=112037, securePort=-1, UDP Port=-1,
 id={-90 41 -113 110 96 -50 78 -88 -79 -103 1 61 -60 -125 75 44 },
 payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)}, domain={}, ]
 Dec 16, 2013 6:44:22 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
 memberAdded
 INFO: Replication member
 added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{127, 0, 1,
 1}:5000,{127, 0, 1, 1},5000, alive=1014, securePort=-1, UDP Port=-1, id={75
 3 86 -1 25 78 67 111 -125 -65 74 58 79 -20 93 16 }, payload={}, command={},
 domain={}, ]
 Dec 16, 2013 6:44:30 PM org.apache.catalina.ha.session.DeltaManager
 waitForSendAllSessions
 SEVERE: Manager [/manager]: No session state send at 12/16/13 6:43 PM
 received, timing out after 60,081 ms.
 Dec 16, 2013 6:44:30 PM org.apache.catalina.ha.session.DeltaManager
 getAllClusterSessions
 WARNING: Manager [/manager]: Drop message SESSION-GET-ALL inside
 GET_ALL_SESSIONS sync phase start date 12/16/13 6:43 PM message date 1/1/70
 2:00 AM
 Dec 16, 2013 6:44:30 PM org.apache.coyote.AbstractProtocol start
 INFO: Starting ProtocolHandler [http-bio-8080]
 Dec 

Re: Tomcat Clustering - when the tomcat instances are on different machines

2013-12-17 Thread Nir A
Ok , So now we started node 1 , waited until it was up and running and only
then we started node2.

There are no warnings \ errors on the log files.

Only problem is that our session's are not being replicated.

here are the logs of the catalina:

Node1:


Dec 17, 2013 10:52:21 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: /usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib
Dec 17, 2013 10:52:21 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler [http-bio-8080]
Dec 17, 2013 10:52:21 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler [ajp-bio-8009]
Dec 17, 2013 10:52:21 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 789 ms
Dec 17, 2013 10:52:21 AM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
Dec 17, 2013 10:52:21 AM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Dec 17, 2013 10:52:21 AM org.apache.catalina.ha.tcp.SimpleTcpCluster
startInternal
INFO: Cluster is about to start
Dec 17, 2013 10:52:21 AM org.apache.catalina.tribes.transport.ReceiverBase
bind
INFO: Receiver Server Socket bound to:/127.0.1.1:5000
Dec 17, 2013 10:52:21 AM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Setting cluster mcast soTimeout to 500
Dec 17, 2013 10:52:21 AM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start
level:4
Dec 17, 2013 10:52:22 AM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:4
Dec 17, 2013 10:52:22 AM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start
level:8
Dec 17, 2013 10:52:23 AM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:8
Dec 17, 2013 10:52:23 AM org.apache.catalina.ha.deploy.FarmWarDeployer start
INFO: Cluster FarmWarDeployer started.
Dec 17, 2013 10:52:23 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/HATest.war
Dec 17, 2013 10:52:24 AM
org.apache.catalina.tribes.tipis.AbstractReplicatedMap init
INFO: Initializing AbstractReplicatedMap with context name:/HATest-map
Dec 17, 2013 10:52:24 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/docs
Dec 17, 2013 10:52:24 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/host-manager
Dec 17, 2013 10:52:24 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/ROOT
Dec 17, 2013 10:52:24 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/examples
Dec 17, 2013 10:52:24 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/manager
Dec 17, 2013 10:52:25 AM
org.apache.catalina.tribes.tipis.AbstractReplicatedMap init
INFO: Initializing AbstractReplicatedMap with context name:/manager-map
Dec 17, 2013 10:52:25 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [http-bio-8080]
Dec 17, 2013 10:52:25 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [ajp-bio-8009]
Dec 17, 2013 10:52:25 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3592 ms
Dec 17, 2013 10:52:42 AM org.apache.catalina.ha.tcp.SimpleTcpCluster
memberAdded
INFO: Replication member
added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{127, 0, 1,
1}:5000,{127, 0, 1, 1},5000, alive=1016, securePort=-1, UDP Port=-1, id={12
109 58 47 47 -29 65 29 -113 -10 7 24 97 -113 -24 -96 }, payload={},
command={}, domain={}, ]
Dec 17, 2013 10:52:42 AM org.apache.catalina.tribes.io.BufferPool
getBufferPool
INFO: Created a buffer pool with max size:104857600 bytes of
type:org.apache.catalina.tribes.io.BufferPool15Impl
Dec 17, 2013 10:52:43 AM
org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor report
INFO: ThroughputInterceptor Report[
Tx Msg:1 messages
Sent:0.00 MB (total)
Sent:0.00 MB (application)
Time:0.01 seconds
Tx Speed:0.08 MB/sec (total)
TxSpeed:0.08 MB/sec (application)
Error Msg:0
Rx Msg:2 messages
Rx Speed:0.00 MB/sec (since 1st msg)
Received:0.00 MB]







Node 2:

Dec 17, 2013 10:52:40 AM org.apache.catalina.core.AprLifecycleListener init
INFO: 

Re: Tomcat Clustering - when the tomcat instances are on different machines

2013-12-17 Thread Keiichi Fujino
It seems that there is no problem.
Initialization of AbstractReplicatedMap seems to work correctly.




 We have 3 sessions currently: one on node-1 and 2 on node-2 but there are
 only primary sessions on each (3) and not backup sessions at all. what
 could be the problem?


How did you confirm this?
please show more detail.



 On Tue, Dec 17, 2013 at 10:25 AM, Keiichi Fujino kfuj...@apache.org
 wrote:

  DeltaManager starts session sync phase by sending a SESSION-GET-ALL
 message
  at startup.
  DeltaManager that has received the SESSION-GET-ALL message sends all
  session data by sending a ALL-SESSION-DATA message.
  Then sends a SESSION-STATE-TRANSFERED message in order to notify the
  transmission completion.
  DeltaManager that has received the SESSION-STATE-TRANSFERED message
  completes session sync phase.
 
 
  According to this log,
 
 
 
   Dec 16, 2013 6:43:29 PM org.apache.catalina.ha.session.DeltaManager
   waitForSendAllSessions
   SEVERE: Manager [/HATest]: No session state send at 12/16/13 6:42 PM
   received, timing out after 60,102 ms.
  
 
  This log means that time-out occurred in session sync phase. (Default 60
  seconds)
 
  and
 
 
 
   Dec 16, 2013 6:43:29 PM org.apache.catalina.ha.session.DeltaManager
   getAllClusterSessions
   WARNING: Manager [/HATest]: Drop message SESSION-GET-ALL inside
   GET_ALL_SESSIONS sync phase start date 12/16/13 6:42 PM message date
  1/1/70
   2:00 AM
  
 
  This log means that SESSION-GET-ALL message that received during session
  sync phase is dropped.
 
  Thus, It seems that two nodes were started at the same time.
  If SESSION-GET-ALL message is dropped, SESSION-STATE-TRANSFERED message
 can
  not be received.
  As a result, will be time-out  in session sync phase.
 
  You should start Tomcat in proper order (rather than simultaneously).
 
  Another problem.
  In warning log, time stamp of the SESSION-GET-ALL messages that were
  dropped has become to 1/1/70.
  This is just a trivial bug.
  I will fix this later.
  That way, the correct time stamp will be output.
 
 
 
 
   Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
   deployDirectory
   INFO: Deploying web application directory
   /usr/local/tomcat7/apache-tomcat-7.0.47/webapps/docs
   Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
   deployDirectory
   INFO: Deploying web application directory
   /usr/local/tomcat7/apache-tomcat-7.0.47/webapps/host-manager
   Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
   deployDirectory
   INFO: Deploying web application directory
   /usr/local/tomcat7/apache-tomcat-7.0.47/webapps/ROOT
   Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
   deployDirectory
   INFO: Deploying web application directory
   /usr/local/tomcat7/apache-tomcat-7.0.47/webapps/examples
   Dec 16, 2013 6:43:30 PM org.apache.catalina.startup.HostConfig
   deployDirectory
   INFO: Deploying web application directory
   /usr/local/tomcat7/apache-tomcat-7.0.47/webapps/manager
   Dec 16, 2013 6:43:30 PM org.apache.catalina.ha.session.DeltaManager
   startInternal
   INFO: Register manager /manager to cluster element Host with name
  localhost
   Dec 16, 2013 6:43:30 PM org.apache.catalina.ha.session.DeltaManager
   startInternal
   INFO: Starting clustering manager at /manager
   Dec 16, 2013 6:43:30 PM org.apache.catalina.ha.session.DeltaManager
   getAllClusterSessions
   INFO: Manager [/manager], requesting session state from
   org.apache.catalina.tribes.membership.MemberImpl[tcp://{127, 0, 1,
   1}:5000,{127, 0, 1, 1},5000, alive=65057, securePort=-1, UDP Port=-1,
   id={-90 41 -113 110 96 -50 78 -88 -79 -103 1 61 -60 -125 75 44 },
   payload={}, command={}, domain={}, ]. This operation will timeout if no
   session state has been received within 60 seconds.
   Dec 16, 2013 6:44:16 PM
   org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
   memberDisappeared
   INFO: Verification complete. Member
  
 disappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp://{127,
  0,
   1, 1}:5000,{127, 0, 1, 1},5000, alive=112037, securePort=-1, UDP
 Port=-1,
   id={-90 41 -113 110 96 -50 78 -88 -79 -103 1 61 -60 -125 75 44 },
   payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)}, domain={}, ]]
   Dec 16, 2013 6:44:16 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
   memberDisappeared
   INFO: Received member
  
 disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://{127,
  0,
   1, 1}:5000,{127, 0, 1, 1},5000, alive=112037, securePort=-1, UDP
 Port=-1,
   id={-90 41 -113 110 96 -50 78 -88 -79 -103 1 61 -60 -125 75 44 },
   payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)}, domain={}, ]
   Dec 16, 2013 6:44:22 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
   memberAdded
   INFO: Replication member
   added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{127, 0,
 1,
   1}:5000,{127, 0, 1, 1},5000, alive=1014, securePort=-1, UDP Port=-1,
  id={75
   3 86 -1 25 78 67 111 -125 -65 74 

Re: Tomcat Clustering - when the tomcat instances are on different machines

2013-12-17 Thread Nir A
In the tomcat manager We can see that our web application called HATest
is having the sessions.
Its a small demo of a shopping cart that keeps the items in the session.

here is an example of a session we created in on of the tomcats nodes:

Details for Session 33265A9C6318C014ADA92220A76F566C  Session Id
33265A9C6318C014ADA92220A76F566C  Guessed Locale
 Guessed User
 Creation Time 2013-12-17 11:56:07  Last Accessed Time 2013-12-17
12:01:13  Session
Max Inactive Interval 00:30:00  Used Time 00:05:06  Inactive Time 00:00:02
TTL 00:29:57
  1 attributes  Remove Attribute Attribute name Attribute value

Books [my book!, Some other book]



In our previous POC where all instances were local we had this exact
session replication.
We could see on the manager of instance 2 that a new Backup session is
created (replicated) right after the creation of a new session in instance
1..

1) is it possible to get some more logging info from anywhere?
2) How come when i create a new session in an instance we dont see in the
catalina.log another message being fired to update?

Thanks again,



On Tue, Dec 17, 2013 at 11:54 AM, Keiichi Fujino kfuj...@apache.org wrote:

 It seems that there is no problem.
 Initialization of AbstractReplicatedMap seems to work correctly.



 
  We have 3 sessions currently: one on node-1 and 2 on node-2 but there are
  only primary sessions on each (3) and not backup sessions at all. what
  could be the problem?
 
 
 How did you confirm this?
 please show more detail.



  On Tue, Dec 17, 2013 at 10:25 AM, Keiichi Fujino kfuj...@apache.org
  wrote:
 
   DeltaManager starts session sync phase by sending a SESSION-GET-ALL
  message
   at startup.
   DeltaManager that has received the SESSION-GET-ALL message sends all
   session data by sending a ALL-SESSION-DATA message.
   Then sends a SESSION-STATE-TRANSFERED message in order to notify the
   transmission completion.
   DeltaManager that has received the SESSION-STATE-TRANSFERED message
   completes session sync phase.
  
  
   According to this log,
  
  
  
Dec 16, 2013 6:43:29 PM org.apache.catalina.ha.session.DeltaManager
waitForSendAllSessions
SEVERE: Manager [/HATest]: No session state send at 12/16/13 6:42 PM
received, timing out after 60,102 ms.
   
  
   This log means that time-out occurred in session sync phase. (Default
 60
   seconds)
  
   and
  
  
  
Dec 16, 2013 6:43:29 PM org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions
WARNING: Manager [/HATest]: Drop message SESSION-GET-ALL inside
GET_ALL_SESSIONS sync phase start date 12/16/13 6:42 PM message date
   1/1/70
2:00 AM
   
  
   This log means that SESSION-GET-ALL message that received during
 session
   sync phase is dropped.
  
   Thus, It seems that two nodes were started at the same time.
   If SESSION-GET-ALL message is dropped, SESSION-STATE-TRANSFERED message
  can
   not be received.
   As a result, will be time-out  in session sync phase.
  
   You should start Tomcat in proper order (rather than simultaneously).
  
   Another problem.
   In warning log, time stamp of the SESSION-GET-ALL messages that were
   dropped has become to 1/1/70.
   This is just a trivial bug.
   I will fix this later.
   That way, the correct time stamp will be output.
  
  
  
  
Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/docs
Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/host-manager
Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/ROOT
Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/examples
Dec 16, 2013 6:43:30 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/manager
Dec 16, 2013 6:43:30 PM org.apache.catalina.ha.session.DeltaManager
startInternal
INFO: Register manager /manager to cluster element Host with name
   localhost
Dec 16, 2013 6:43:30 PM org.apache.catalina.ha.session.DeltaManager
startInternal
INFO: Starting clustering manager at /manager
Dec 16, 2013 6:43:30 PM org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions
INFO: Manager [/manager], requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{127, 0, 1,
1}:5000,{127, 0, 1, 1},5000, alive=65057, securePort=-1, UDP Port=-1,
id={-90 41 -113 110 96 -50 78 -88 -79 -103 1 61 -60 -125 75 44 },
payload={}, command={}, domain={}, 

Re: Tomcat Clustering - when the tomcat instances are on different machines

2013-12-17 Thread Keiichi Fujino
2013/12/17 Nir A n...@netomedia.com

 In the tomcat manager We can see that our web application called HATest
 is having the sessions.
 Its a small demo of a shopping cart that keeps the items in the session.

 here is an example of a session we created in on of the tomcats nodes:

 Details for Session 33265A9C6318C014ADA92220A76F566C  Session Id
 33265A9C6318C014ADA92220A76F566C  Guessed Locale
  Guessed User
  Creation Time 2013-12-17 11:56:07  Last Accessed Time 2013-12-17
 12:01:13  Session
 Max Inactive Interval 00:30:00  Used Time 00:05:06  Inactive Time 00:00:02
 TTL 00:29:57
   1 attributes  Remove Attribute Attribute name Attribute value

 Books [my book!, Some other book]



Does this say that there is only one session?
You said We have 3 sessions currently: one on node-1 and 2 on node-2 on
previous mail.
In other words, do you say that manager app should display 3 sessions (both
primary and backup) ?



 In our previous POC where all instances were local we had this exact
 session replication.
 We could see on the manager of instance 2 that a new Backup session is
 created (replicated) right after the creation of a new session in instance
 1..

 1) is it possible to get some more logging info from anywhere?
 2) How come when i create a new session in an instance we dont see in the
 catalina.log another message being fired to update?


If you change log level of AbstractReplicatedMap, you can trace the session
replication of BackupManager.

e.g. logging.propertie
java.util.logging.ConsoleHandler.level = FINEST
org.apache.catalina.tribes.tipis.AbstractReplicatedMap.level = FINEST





 Thanks again,



 On Tue, Dec 17, 2013 at 11:54 AM, Keiichi Fujino kfuj...@apache.org
 wrote:

  It seems that there is no problem.
  Initialization of AbstractReplicatedMap seems to work correctly.
 
 
 
  
   We have 3 sessions currently: one on node-1 and 2 on node-2 but there
 are
   only primary sessions on each (3) and not backup sessions at all. what
   could be the problem?
  
  
  How did you confirm this?
  please show more detail.
 
 
 
   On Tue, Dec 17, 2013 at 10:25 AM, Keiichi Fujino kfuj...@apache.org
   wrote:
  
DeltaManager starts session sync phase by sending a SESSION-GET-ALL
   message
at startup.
DeltaManager that has received the SESSION-GET-ALL message sends all
session data by sending a ALL-SESSION-DATA message.
Then sends a SESSION-STATE-TRANSFERED message in order to notify the
transmission completion.
DeltaManager that has received the SESSION-STATE-TRANSFERED message
completes session sync phase.
   
   
According to this log,
   
   
   
 Dec 16, 2013 6:43:29 PM org.apache.catalina.ha.session.DeltaManager
 waitForSendAllSessions
 SEVERE: Manager [/HATest]: No session state send at 12/16/13 6:42
 PM
 received, timing out after 60,102 ms.

   
This log means that time-out occurred in session sync phase. (Default
  60
seconds)
   
and
   
   
   
 Dec 16, 2013 6:43:29 PM org.apache.catalina.ha.session.DeltaManager
 getAllClusterSessions
 WARNING: Manager [/HATest]: Drop message SESSION-GET-ALL inside
 GET_ALL_SESSIONS sync phase start date 12/16/13 6:42 PM message
 date
1/1/70
 2:00 AM

   
This log means that SESSION-GET-ALL message that received during
  session
sync phase is dropped.
   
Thus, It seems that two nodes were started at the same time.
If SESSION-GET-ALL message is dropped, SESSION-STATE-TRANSFERED
 message
   can
not be received.
As a result, will be time-out  in session sync phase.
   
You should start Tomcat in proper order (rather than simultaneously).
   
Another problem.
In warning log, time stamp of the SESSION-GET-ALL messages that were
dropped has become to 1/1/70.
This is just a trivial bug.
I will fix this later.
That way, the correct time stamp will be output.
   
   
   
   
 Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
 deployDirectory
 INFO: Deploying web application directory
 /usr/local/tomcat7/apache-tomcat-7.0.47/webapps/docs
 Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
 deployDirectory
 INFO: Deploying web application directory
 /usr/local/tomcat7/apache-tomcat-7.0.47/webapps/host-manager
 Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
 deployDirectory
 INFO: Deploying web application directory
 /usr/local/tomcat7/apache-tomcat-7.0.47/webapps/ROOT
 Dec 16, 2013 6:43:29 PM org.apache.catalina.startup.HostConfig
 deployDirectory
 INFO: Deploying web application directory
 /usr/local/tomcat7/apache-tomcat-7.0.47/webapps/examples
 Dec 16, 2013 6:43:30 PM org.apache.catalina.startup.HostConfig
 deployDirectory
 INFO: Deploying web application directory
 /usr/local/tomcat7/apache-tomcat-7.0.47/webapps/manager
 Dec 16, 2013 6:43:30 PM org.apache.catalina.ha.session.DeltaManager
   

Re: Tomcat Clustering - when the tomcat instances are on different machines

2013-12-17 Thread Nir A
Here is a full scenario:

1) Both tomcats are down

2) starting up tc1:

Dec 17, 2013 1:49:31 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: /usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib
Dec 17, 2013 1:49:31 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler [http-bio-8080]
Dec 17, 2013 1:49:31 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler [ajp-bio-8009]
Dec 17, 2013 1:49:31 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 782 ms
Dec 17, 2013 1:49:31 PM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
Dec 17, 2013 1:49:31 PM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Dec 17, 2013 1:49:31 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
startInternal
INFO: Cluster is about to start
Dec 17, 2013 1:49:31 PM org.apache.catalina.tribes.transport.ReceiverBase
bind
INFO: Receiver Server Socket bound to:/127.0.1.1:5000
Dec 17, 2013 1:49:31 PM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Setting cluster mcast soTimeout to 500
Dec 17, 2013 1:49:31 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start
level:4
Dec 17, 2013 1:49:32 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:4
Dec 17, 2013 1:49:32 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start
level:8
Dec 17, 2013 1:49:33 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:8
Dec 17, 2013 1:49:33 PM org.apache.catalina.ha.deploy.FarmWarDeployer start
INFO: Cluster FarmWarDeployer started.
Dec 17, 2013 1:49:33 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/HATest.war
Dec 17, 2013 1:49:34 PM
org.apache.catalina.tribes.tipis.AbstractReplicatedMap init
INFO: Initializing AbstractReplicatedMap with context name:/HATest-map
Dec 17, 2013 1:49:34 PM
org.apache.catalina.tribes.tipis.AbstractReplicatedMap init
FINER: Created Lazy Map with name:/HATest-map, bytes:{47, 72, 65, 84, 101,
115, 116, 45, 109, 97, 112}
Dec 17, 2013 1:49:34 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/docs
Dec 17, 2013 1:49:34 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/host-manager
Dec 17, 2013 1:49:34 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/ROOT
Dec 17, 2013 1:49:34 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/examples
Dec 17, 2013 1:49:35 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/apache-tomcat-7.0.47/webapps/manager
Dec 17, 2013 1:49:35 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [http-bio-8080]
Dec 17, 2013 1:49:35 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [ajp-bio-8009]
Dec 17, 2013 1:49:35 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3608 ms


3) Starting up tc2:

tc2 log:

Dec 17, 2013 1:50:59 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: /usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib
Dec 17, 2013 1:51:00 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler [http-bio-8080]
Dec 17, 2013 1:51:00 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler [ajp-bio-8009]
Dec 17, 2013 1:51:00 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 777 ms
Dec 17, 2013 1:51:00 PM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
Dec 17, 2013 1:51:00 PM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Dec 17, 2013 1:51:00 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
startInternal
INFO: Cluster is about to start
Dec 17, 2013 1:51:00 PM org.apache.catalina.tribes.transport.ReceiverBase
bind
INFO: Receiver Server Socket bound to:/127.0.1.1:5000
Dec 17, 2013 1:51:00 PM

Re: Tomcat Clustering - when the tomcat instances are on different machines

2013-12-17 Thread Keiichi Fujino
In order to trace create session completely, it was necessary that changing
log level of LazyReplicatedMap. (sorry about that.)

However this log indicates that session replication works.

For example.

Dec 17, 2013 1:52:21 PM
 org.apache.catalina.tribes.tipis.AbstractReplicatedMap messageReceived
 FINER: Map message received from:tcp://{127, 0, 1, 1}:5000
 msg:MapMessage[context=/HATest-map; type=MSG_BACKUP;
 key=69713914F61869565FF52E909EDB7C1C;
 value=DeltaSession[69713914F61869565FF52E909EDB7C1C]


This log means that  tc1 received session replication
message(type=MSG_BACKUP) from tc2.
session Id is 69713914F61869565FF52E909EDB7C1C.


 Dec 17, 2013 1:52:21 PM
 org.apache.catalina.tribes.tipis.AbstractReplicatedMap replicate
 FINER: Replicate invoked on key:69713914F61869565FF52E909EDB7C1C


This log means that tc1 replicate session attribute to tc2.
sesison Id is 69713914F61869565FF52E909EDB7C1C.



-- 
Keiichi.Fujino


RE: Tomcat clustering session attribute is changed without request

2011-10-27 Thread Hodchenkov, Paul
Hi all,
So I was not able to call cluster valve from the application, but I believe a 
http call to localhost with the same session id can do a trick(yeah, not an 
elegant solution :) ).

However, it would be fine is somebody can clarify my another questions about 
tomcatssessions:

1) When using clustering with DeltaManager tomcat fires 
onSessionCreated,onSessionDestroyed on every node and when node joins the 
cluster(for every session). However, when single tomcat is configured with 
default session persistence then onSessionCreated event is fired only when this 
session is accessed after restart(all session attributes are restored 
correctly). Is there any way to force to restore all sessions after restart? 
One solution is to put sessions info to database, but :
a) it will not work when 'clustering with DeltaManager' will be used later 
(database is not required in such case)
b) there is no access to HttpSession object and it is not possible to 
invalidate user sessions
2) What will happen with HttpSession reference which is hold in application 
memory (ConcurrentMapString, HttpSession) when tomcat decides to serialize it 
to FS without stopping the tomcat (for example running out of memory). Will 
call to HttpSession.getAttribute fail or tomcat will deserialize the session 
behind the scenes?

Thanks!

-Original Message-
From: Ronald Klop (Mailing List) [mailto:ronald-mailingl...@base.nl] 
Sent: Tuesday, October 25, 2011 1:04 PM
To: Tomcat Users List
Subject: RE: Tomcat clustering session attribute is changed without request

Hi,

 Replication of the attributes is done by the cluster valve.
 http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-valve.html

 If you manage to call that code from your own application, than you can do 
what you want. But that is not default functionality of Tomcat. You have to 
make it yourself.

 Ronald.

Op dinsdag, 25 oktober 2011 09:44 schreef Hodchenkov, Paul 
paul.hodchen...@oxagile.com:
 
   
  Hi All,
  I have used http://code.google.com/p/psi-probe/ to debug session replication.
  So HttpSession attribute is NOT replicated when it is changed without http 
 request. It's value is changed only on the local tomcat.
  However, when attribute is changed with http request - everything works fine.
  So, is there any way to force the replication of HttpSession?
  -Original Message-
  From: Pid [mailto:p...@pidster.com]
  Sent: Monday, October 24, 2011 4:08 PM
  To: Tomcat Users List
  Subject: Re: Tomcat clustering session attribute is changed without request
  
  On 24/10/2011 14:05, Hodchenkov, Paul wrote:
   Hi,
   Thanks for the reply!
   - What does 'stores session map in memory' actually mean?
   It's ConcurrentMapString, HttpSession map which is filled by 
 HttpListener. I can access session attributes of any user using this approach.
   Does changes to attributes in HttpSession cause a replication in this case?
  
  Don't know, probably.
  
   What is the benefit of using JMX connection to access the session instead 
 of HttpListener in this case?
  
  It means you don't have to jump through hoops to access something that is 
 already accessible elsewhere.
  
  
  p
  
   -Original Message-
   From: Pid [mailto:p...@pidster.com]
   Sent: Monday, October 24, 2011 3:59 PM
   To: Tomcat Users List
   Subject: Re: Tomcat clustering session attribute is changed without
   request
  
   On 24/10/2011 11:55, Hodchenkov, Paul wrote:
   Hi all,
   I have configured tomcat 7 cluster by using [1] with DeltaManager and it 
 works fine.
   However I have the following 2 questions:
  
   1)  My application stores session map in memory(admin can force 
 logout of any user and change some session attribute). Will this session 
 attribute be replicated if it is changed without tomcat http request (changed 
 by backend task for example)?
  
   What does 'stores session map in memory' actually mean?
  
   Instead of copying session objects around the place, why not just use the 
 JMX API and the operations on the Manager MBean?
  
Catalina:type=Manager,context=/myapp,host=localhost
  
  
   p
  
   2)  It's seems that expireSessionsOnShutdown=false in DeltaManager 
 can solve the problem with 
 http://old.nabble.com/sessionListener.sessionDestroyed-is-called-on-shutdown-of-a-node-in-the-cluster-td16178701.html?
   [1] http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html
  
   Best Regards,
   Paul Hodchenkov
   Senior Java developer, Oxagile
   Skype: paul.hodchenkov
   Email: mailto:paul.hodchen...@oxagile.com
  
  
  
  
  
   -
   To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
   For additional commands, e-mail: users-h...@tomcat.apache.org
  
  
  
  
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org

Re: Tomcat clustering session attribute is changed without request

2011-10-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paul,

On 10/24/2011 7:28 AM, Hodchenkov, Paul wrote:
 2) AFAIK tomcat fires onSessionDestroyed event when some node in 
 cluster is stopped gracefully. However, in my environment I don't 
 observe such behavior.

Is that really what you want? Taking a server out of the cluster will
expire every session in the cluster, which is usually NOT what you want
to do.

 Does expireSessionsOnShutdown parameter in Delta Manager, has 
 something with it?

If you set that to true, then you'll get the (probably unwanted)
behavior described above.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6pe+oACgkQ9CaO5/Lv0PBhZACgrjrDtl8U1D8F9aCZGYWCSosh
uIAAnA23e4+VgG0slBbubjaRWA/u1SMi
=8LdW
-END PGP SIGNATURE-

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



Re: Tomcat clustering session attribute is changed without request

2011-10-27 Thread Hodchenkov, Paul
Hi, thx for the response.
Yes, it's ok for me that sessions are not expired(session continue to live on 
another node) and onsessiondestroyed is not called when one node is stopped. 
The actual reason why i asked this question was that many folks complained that 
tomcat always fired onsessiondestroyed on stop and there were no an easy way to 
disable such behavior.

P.S somebody please answer to my questions in my previous mail:) thanks!
Sent from my iPad

On 27.10.2011, at 18:43, Christopher Schultz ch...@christopherschultz.net 
wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Paul,
 
 On 10/24/2011 7:28 AM, Hodchenkov, Paul wrote:
 2) AFAIK tomcat fires onSessionDestroyed event when some node in 
 cluster is stopped gracefully. However, in my environment I don't 
 observe such behavior.
 
 Is that really what you want? Taking a server out of the cluster will
 expire every session in the cluster, which is usually NOT what you want
 to do.
 
 Does expireSessionsOnShutdown parameter in Delta Manager, has 
 something with it?
 
 If you set that to true, then you'll get the (probably unwanted)
 behavior described above.
 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAk6pe+oACgkQ9CaO5/Lv0PBhZACgrjrDtl8U1D8F9aCZGYWCSosh
 uIAAnA23e4+VgG0slBbubjaRWA/u1SMi
 =8LdW
 -END PGP SIGNATURE-
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

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



RE: Tomcat clustering session attribute is changed without request

2011-10-25 Thread Hodchenkov, Paul
Hi All,
I have used http://code.google.com/p/psi-probe/ to debug session replication. 
So HttpSession attribute is NOT replicated when it is changed without http 
request. It's value is changed only on the local tomcat.
However, when attribute is changed with http request - everything works fine.
So, is there any way to force the replication of HttpSession?
-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Monday, October 24, 2011 4:08 PM
To: Tomcat Users List
Subject: Re: Tomcat clustering session attribute is changed without request

On 24/10/2011 14:05, Hodchenkov, Paul wrote:
 Hi,
 Thanks for the reply!
 - What does 'stores session map in memory' actually mean?
 It's ConcurrentMapString, HttpSession map which is filled by HttpListener. 
 I can access session attributes of any user using this approach.
 Does changes to attributes in HttpSession cause a replication in this case?

Don't know, probably.

 What is the benefit of using JMX connection to access the session instead of 
 HttpListener in this case?

It means you don't have to jump through hoops to access something that is 
already accessible elsewhere.


p

 -Original Message-
 From: Pid [mailto:p...@pidster.com]
 Sent: Monday, October 24, 2011 3:59 PM
 To: Tomcat Users List
 Subject: Re: Tomcat clustering session attribute is changed without 
 request
 
 On 24/10/2011 11:55, Hodchenkov, Paul wrote:
 Hi all,
 I have configured tomcat 7 cluster by using [1] with DeltaManager and it 
 works fine.
 However I have the following 2 questions:

 1)  My application stores session map in memory(admin can force logout 
 of any user and change some session attribute). Will this session attribute 
 be replicated if it is changed without tomcat http request (changed by 
 backend task for example)?
 
 What does 'stores session map in memory' actually mean?
 
 Instead of copying session objects around the place, why not just use the JMX 
 API and the operations on the Manager MBean?
 
  Catalina:type=Manager,context=/myapp,host=localhost
 
 
 p
 
 2)  It's seems that expireSessionsOnShutdown=false in DeltaManager can 
 solve the problem with 
 http://old.nabble.com/sessionListener.sessionDestroyed-is-called-on-shutdown-of-a-node-in-the-cluster-td16178701.html?
 [1] http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html

 Best Regards,
 Paul Hodchenkov
 Senior Java developer, Oxagile
 Skype: paul.hodchenkov
 Email: mailto:paul.hodchen...@oxagile.com


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



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



RE: Tomcat clustering session attribute is changed without request

2011-10-25 Thread Ronald Klop (Mailing List)

Hi,

Replication of the attributes is done by the cluster valve.
http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-valve.html

If you manage to call that code from your own application, than you can do what 
you want. But that is not default functionality of Tomcat. You have to make it 
yourself.

Ronald.

Op dinsdag, 25 oktober 2011 09:44 schreef Hodchenkov, Paul 
paul.hodchen...@oxagile.com:


  
 Hi All,

 I have used http://code.google.com/p/psi-probe/ to debug session replication.
 So HttpSession attribute is NOT replicated when it is changed without http 
request. It's value is changed only on the local tomcat.
 However, when attribute is changed with http request - everything works fine.
 So, is there any way to force the replication of HttpSession?
 -Original Message-
 From: Pid [mailto:p...@pidster.com]
 Sent: Monday, October 24, 2011 4:08 PM
 To: Tomcat Users List
 Subject: Re: Tomcat clustering session attribute is changed without request
 
 On 24/10/2011 14:05, Hodchenkov, Paul wrote:

  Hi,
  Thanks for the reply!
  - What does 'stores session map in memory' actually mean?
  It's ConcurrentMapString, HttpSession map which is filled by HttpListener. 
I can access session attributes of any user using this approach.
  Does changes to attributes in HttpSession cause a replication in this case?
 
 Don't know, probably.
 
  What is the benefit of using JMX connection to access the session instead of HttpListener in this case?
 
 It means you don't have to jump through hoops to access something that is already accessible elsewhere.
 
 
 p
 
  -Original Message-

  From: Pid [mailto:p...@pidster.com]
  Sent: Monday, October 24, 2011 3:59 PM
  To: Tomcat Users List
  Subject: Re: Tomcat clustering session attribute is changed without
  request
 
  On 24/10/2011 11:55, Hodchenkov, Paul wrote:
  Hi all,
  I have configured tomcat 7 cluster by using [1] with DeltaManager and it 
works fine.
  However I have the following 2 questions:
 
  1)  My application stores session map in memory(admin can force logout 
of any user and change some session attribute). Will this session attribute be 
replicated if it is changed without tomcat http request (changed by backend task for 
example)?
 
  What does 'stores session map in memory' actually mean?
 
  Instead of copying session objects around the place, why not just use the 
JMX API and the operations on the Manager MBean?
 
   Catalina:type=Manager,context=/myapp,host=localhost
 
 
  p
 
  2)  It's seems that expireSessionsOnShutdown=false in DeltaManager can 
solve the problem with 
http://old.nabble.com/sessionListener.sessionDestroyed-is-called-on-shutdown-of-a-node-in-the-cluster-td16178701.html?
  [1] http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html
 
  Best Regards,
  Paul Hodchenkov
  Senior Java developer, Oxagile
  Skype: paul.hodchenkov
  Email: mailto:paul.hodchen...@oxagile.com
 
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
 -

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





Re: Tomcat clustering session attribute is changed without request

2011-10-24 Thread Ronald Klop (Mailing List)




Op maandag, 24 oktober 2011 12:55 schreef Hodchenkov, Paul 
paul.hodchen...@oxagile.com:


  
 
 Hi all,

 I have configured tomcat 7 cluster by using [1] with DeltaManager and it works 
fine.
 However I have the following 2 questions:
 
 1)  My application stores session map in memory(admin can force logout of any user and change some session attribute). Will this session attribute be replicated if it is changed without tomcat http request (changed by backend task for example)?
 
 2)  It's seems that expireSessionsOnShutdown=false in DeltaManager can solve the problem with http://old.nabble.com/sessionListener.sessionDestroyed-is-called-on-shutdown-of-a-node-in-the-cluster-td16178701.html?

 [1] http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html
 
 Best Regards,

 Paul Hodchenkov
 Senior Java developer, Oxagile
 Skype: paul.hodchenkov
 Email: mailto:paul.hodchen...@oxagile.com
  
 



 
  

Hi,

1. Changes in the session are only replicated at the end of a request. BTW: My 
experience with holding references to Sessions in your own map is that it is 
harder than you think. It is more easy to create a map with blocked userids and 
block those users with a filter.

2. I don't understand your question.

Ronald.

RE: Tomcat clustering session attribute is changed without request

2011-10-24 Thread Hodchenkov, Paul
Hi,
-- Changes in the session are only replicated at the end of a request.
1)So is there any way to 'force' replication if HttpSession was changed without 
http request?
--2. I don't understand your question.
2) AFAIK tomcat fires onSessionDestroyed event when some node in cluster is 
stopped gracefully. However, in my environment I don't observe such behavior.
Does expireSessionsOnShutdown parameter in Delta Manager, has something with it?

-Original Message-
From: Ronald Klop (Mailing List) [mailto:ronald-mailingl...@base.nl] 
Sent: Monday, October 24, 2011 2:20 PM
To: Tomcat Users List
Subject: Re: Tomcat clustering session attribute is changed without request




Op maandag, 24 oktober 2011 12:55 schreef Hodchenkov, Paul 
paul.hodchen...@oxagile.com:
 
   
  
  Hi all,
  I have configured tomcat 7 cluster by using [1] with DeltaManager and it 
 works fine.
  However I have the following 2 questions:
  
  1)  My application stores session map in memory(admin can force logout 
 of any user and change some session attribute). Will this session attribute 
 be replicated if it is changed without tomcat http request (changed by 
 backend task for example)?
  
  2)  It's seems that expireSessionsOnShutdown=false in DeltaManager can 
 solve the problem with 
 http://old.nabble.com/sessionListener.sessionDestroyed-is-called-on-shutdown-of-a-node-in-the-cluster-td16178701.html?
  [1] http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html
  
  Best Regards,
  Paul Hodchenkov
  Senior Java developer, Oxagile
  Skype: paul.hodchenkov
  Email: mailto:paul.hodchen...@oxagile.com
   
  
 
 
  
   
 Hi,

 1. Changes in the session are only replicated at the end of a request. BTW: My 
experience with holding references to Sessions in your own map is that it is 
harder than you think. It is more easy to create a map with blocked userids and 
block those users with a filter.

 2. I don't understand your question.

 Ronald.

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



Re: Tomcat clustering session attribute is changed without request

2011-10-24 Thread Pid
On 24/10/2011 11:55, Hodchenkov, Paul wrote:
 Hi all,
 I have configured tomcat 7 cluster by using [1] with DeltaManager and it 
 works fine.
 However I have the following 2 questions:
 
 1)  My application stores session map in memory(admin can force logout of 
 any user and change some session attribute). Will this session attribute be 
 replicated if it is changed without tomcat http request (changed by backend 
 task for example)?

What does 'stores session map in memory' actually mean?

Instead of copying session objects around the place, why not just use
the JMX API and the operations on the Manager MBean?

 Catalina:type=Manager,context=/myapp,host=localhost


p

 2)  It's seems that expireSessionsOnShutdown=false in DeltaManager can 
 solve the problem with 
 http://old.nabble.com/sessionListener.sessionDestroyed-is-called-on-shutdown-of-a-node-in-the-cluster-td16178701.html?
 [1] http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html
 
 Best Regards,
 Paul Hodchenkov
 Senior Java developer, Oxagile
 Skype: paul.hodchenkov
 Email: mailto:paul.hodchen...@oxagile.com
 
 




signature.asc
Description: OpenPGP digital signature


RE: Tomcat clustering session attribute is changed without request

2011-10-24 Thread Hodchenkov, Paul
Hi,
Thanks for the reply!
- What does 'stores session map in memory' actually mean?
It's ConcurrentMapString, HttpSession map which is filled by HttpListener. I 
can access session attributes of any user using this approach.
Does changes to attributes in HttpSession cause a replication in this case? 
What is the benefit of using JMX connection to access the session instead of 
HttpListener in this case?


-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Monday, October 24, 2011 3:59 PM
To: Tomcat Users List
Subject: Re: Tomcat clustering session attribute is changed without request

On 24/10/2011 11:55, Hodchenkov, Paul wrote:
 Hi all,
 I have configured tomcat 7 cluster by using [1] with DeltaManager and it 
 works fine.
 However I have the following 2 questions:
 
 1)  My application stores session map in memory(admin can force logout of 
 any user and change some session attribute). Will this session attribute be 
 replicated if it is changed without tomcat http request (changed by backend 
 task for example)?

What does 'stores session map in memory' actually mean?

Instead of copying session objects around the place, why not just use the JMX 
API and the operations on the Manager MBean?

 Catalina:type=Manager,context=/myapp,host=localhost


p

 2)  It's seems that expireSessionsOnShutdown=false in DeltaManager can 
 solve the problem with 
 http://old.nabble.com/sessionListener.sessionDestroyed-is-called-on-shutdown-of-a-node-in-the-cluster-td16178701.html?
 [1] http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html
 
 Best Regards,
 Paul Hodchenkov
 Senior Java developer, Oxagile
 Skype: paul.hodchenkov
 Email: mailto:paul.hodchen...@oxagile.com
 
 



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



Re: Tomcat clustering session attribute is changed without request

2011-10-24 Thread Pid
On 24/10/2011 14:05, Hodchenkov, Paul wrote:
 Hi,
 Thanks for the reply!
 - What does 'stores session map in memory' actually mean?
 It's ConcurrentMapString, HttpSession map which is filled by HttpListener. 
 I can access session attributes of any user using this approach.
 Does changes to attributes in HttpSession cause a replication in this case?

Don't know, probably.

 What is the benefit of using JMX connection to access the session instead of 
 HttpListener in this case?

It means you don't have to jump through hoops to access something that
is already accessible elsewhere.


p

 -Original Message-
 From: Pid [mailto:p...@pidster.com] 
 Sent: Monday, October 24, 2011 3:59 PM
 To: Tomcat Users List
 Subject: Re: Tomcat clustering session attribute is changed without request
 
 On 24/10/2011 11:55, Hodchenkov, Paul wrote:
 Hi all,
 I have configured tomcat 7 cluster by using [1] with DeltaManager and it 
 works fine.
 However I have the following 2 questions:

 1)  My application stores session map in memory(admin can force logout 
 of any user and change some session attribute). Will this session attribute 
 be replicated if it is changed without tomcat http request (changed by 
 backend task for example)?
 
 What does 'stores session map in memory' actually mean?
 
 Instead of copying session objects around the place, why not just use the JMX 
 API and the operations on the Manager MBean?
 
  Catalina:type=Manager,context=/myapp,host=localhost
 
 
 p
 
 2)  It's seems that expireSessionsOnShutdown=false in DeltaManager can 
 solve the problem with 
 http://old.nabble.com/sessionListener.sessionDestroyed-is-called-on-shutdown-of-a-node-in-the-cluster-td16178701.html?
 [1] http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html

 Best Regards,
 Paul Hodchenkov
 Senior Java developer, Oxagile
 Skype: paul.hodchenkov
 Email: mailto:paul.hodchen...@oxagile.com


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




signature.asc
Description: OpenPGP digital signature


Re: tomcat clustering

2011-04-28 Thread Seth
Mark Thomas markt at apache.org writes:
  I checked  Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer
  on tomcat site
  
   http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-deployer.html
  
  This goober is currently pretty broken, but we are
  working hard to fix it
 
 It is no longer broken (I fixed it in 6.0.20) but the docs still haven't
 been written. Going from memory:
 
 Mark



I'm trying to use the FarWarDeployer with Tomcat 6.0.20 and 6.0.32 but am 
getting the following error.

Application [app war name] in used. touch war file [app war name] again!

The app deploys to all my Tomcats in the cluster but then immediately 
un-deploys 
from one of them and throws that error..

Any suggestions?

Seth


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



Re: Tomcat clustering in a server with SSL

2010-11-21 Thread rujin raj
Dear mario,

You mean, you have configured your single Tomcat to use SSL? Right?
Yes.

What exactly do you mean with SSL is installed in that machine. Machine =
Tomcat or Machine = windows Server 2008?
 windows 2008 machine
Can i install multiple tomcat instance in same system and configure
clustering like tomcat1,2,3,4 etc in single server. How to do that ?

--rujin


On 21 November 2010 13:14, Mario Kleinsasser 
mario.kleinsasser+tom...@gmail.com mario.kleinsasser%2btom...@gmail.comwrote:

 Hi,

 On Sun, Nov 21, 2010 at 7:02 AM, rujin raj rujin...@gmail.com wrote:

  Hi,
 
 
  I am having a windows 2008 ent server and tomcat 6.0.29 64 bit,JVM 1.6.0
 64
  bit installed and SSL is configured in my server.
 

 You mean, you have configured your single Tomcat to use SSL? Right?


 
  I need to configure tomcat clustering  in same machine, because SSL
  certificate is installed in that machine.
 

 What exactly do you mean with SSL is installed in that machine. Machine =
 Tomcat or Machine = windows Server 2008?


 
  Give some idea to install tomcat clustering in a server.
 

 Without more information, I would install three Linux servers based upon
 HyperV (if you really have win 2008 ent).
 One virtual Linux Server for Apache httpd (offloading SSL, Backend Cluster
 configuration (mod_jk)).
 Two or maybe one virtual Linux Server with one or two Tomcats installed
 into.

 Benefits:
 You have an Apache for SSL offloading and cluster Backend communication.
 You have one or two separated server for your tomcat.
 If you like, you could do it also with windows.
 Through the vitalization, you could quickly move to another hardware box,
 in
 case of an HW error.

 Mario

 http://www.n0r1sk.com



 
  --rujin
 



Re: Tomcat clustering in a server with SSL

2010-11-21 Thread André Warnier

rujin raj wrote:

Hi,


I am having a windows 2008 ent server and tomcat 6.0.29 64 bit,JVM 1.6.0 64
bit installed and SSL is configured in my server.

I need to configure tomcat clustering  in same machine, because SSL
certificate is installed in that machine.

Give some idea to install tomcat clustering in a server.


Tip #1 : http://www.catb.org/~esr/faqs/smart-questions.html
Tip #2 : http://tomcat.apache.org/tomcat-6.0-doc/
Tip #3 : http://wiki.apache.org/tomcat/
Tip #4 : http://wiki.apache.org/tomcat/SupportAndTraining



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



Re: Tomcat clustering in a server with SSL

2010-11-21 Thread Mario Kleinsasser
As André wrote, there is a lot of documentation around.

But for a starting point, some informations:

1. You can install multiple Tomcats in a single OS by defining the uses
TCP/IP ports through the server.xml
2. To make this clear to the outside world (your users), use an Apache with
mod_jk and AJP13 protocol for load balancing.

Example configuration server.xml:
Server1:
 Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /
Server2:
 Connector port=9009 protocol=AJP/1.3 redirectPort=8443 /

Example configuration Apache:
worker.properties:
workers.tomcat_home=/usr/local/apache-tomcat-6.0.18
workers.java_home=/usr/local/jdk1.6.0_07

worker.list=lb, server1, server2,

worker.lb.type=lb
worker.lb.balance_workers=server1, server2
worker.lb.sticky_session=true
worker.lb.method=S

worker.server1.port=8009
worker.server1.host=10.0.0.1
worker.server1.type=ajp13
worker.server1.lbfactor=1

worker.server2.port=9009
worker.server2.host=10.0.02
worker.server2.type=ajp13
worker.server2.lbfactor=1

virtualhost config (eg. httpd.conf)
JkMount /* lb
JkMount / lb
Location / 
Order Deny,Allow
Allow from ALL
/Location

Please notice, this is a brain dump! No claim to completeness!!!

Mario


-- 
http://www.n0r1sk.com


On Sun, Nov 21, 2010 at 1:10 PM, André Warnier a...@ice-sa.com wrote:

 rujin raj wrote:

 Hi,


 I am having a windows 2008 ent server and tomcat 6.0.29 64 bit,JVM 1.6.0
 64
 bit installed and SSL is configured in my server.

 I need to configure tomcat clustering  in same machine, because SSL
 certificate is installed in that machine.

 Give some idea to install tomcat clustering in a server.

  Tip #1 : http://www.catb.org/~esr/faqs/smart-questions.html
 Tip #2 : http://tomcat.apache.org/tomcat-6.0-doc/
 Tip #3 : http://wiki.apache.org/tomcat/
 Tip #4 : http://wiki.apache.org/tomcat/SupportAndTraining



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




Re: Tomcat clustering in a server with SSL

2010-11-21 Thread Pid *
On 21 Nov 2010, at 07:44, Mario Kleinsasser
mario.kleinsasser+tom...@gmail.com wrote:

 Hi,

 On Sun, Nov 21, 2010 at 7:02 AM, rujin raj rujin...@gmail.com wrote:

 Hi,


 I am having a windows 2008 ent server and tomcat 6.0.29 64 bit,JVM 1.6.0 64
 bit installed and SSL is configured in my server.


 You mean, you have configured your single Tomcat to use SSL? Right?



 I need to configure tomcat clustering  in same machine, because SSL
 certificate is installed in that machine.


 What exactly do you mean with SSL is installed in that machine. Machine =
 Tomcat or Machine = windows Server 2008?



 Give some idea to install tomcat clustering in a server.


 Without more information, I would install three Linux servers based upon
 HyperV (if you really have win 2008 ent).
 One virtual Linux Server for Apache httpd (offloading SSL, Backend Cluster
 configuration (mod_jk)).
 Two or maybe one virtual Linux Server with one or two Tomcats installed
 into.

 Benefits:
 You have an Apache for SSL offloading and cluster Backend communication.
 You have one or two separated server for your tomcat.
 If you like, you could do it also with windows.
 Through the vitalization, you could quickly move to another hardware box, in
 case of an HW error.

This isn't a good idea. You can run multiple HTTPD and Tomcat
instances on a Windows server.

Installing linux virtual machines is just adding unnecessary overhead.


p


 Mario

 http://www.n0r1sk.com




 --rujin


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



Re: Tomcat clustering in a server with SSL

2010-11-21 Thread Mario Kleinsasser



 This isn't a good idea. You can run multiple HTTPD and Tomcat
 instances on a Windows server.

 Installing linux virtual machines is just adding unnecessary overhead.



To quote myself:

 If you like, you could do it also with windows.


Therefore I wrote that line

Mario



-- 
http://www.n0r1sk.com


Re: Tomcat clustering in a server with SSL

2010-11-20 Thread Mario Kleinsasser
Hi,

On Sun, Nov 21, 2010 at 7:02 AM, rujin raj rujin...@gmail.com wrote:

 Hi,


 I am having a windows 2008 ent server and tomcat 6.0.29 64 bit,JVM 1.6.0 64
 bit installed and SSL is configured in my server.


You mean, you have configured your single Tomcat to use SSL? Right?



 I need to configure tomcat clustering  in same machine, because SSL
 certificate is installed in that machine.


What exactly do you mean with SSL is installed in that machine. Machine =
Tomcat or Machine = windows Server 2008?



 Give some idea to install tomcat clustering in a server.


Without more information, I would install three Linux servers based upon
HyperV (if you really have win 2008 ent).
One virtual Linux Server for Apache httpd (offloading SSL, Backend Cluster
configuration (mod_jk)).
Two or maybe one virtual Linux Server with one or two Tomcats installed
into.

Benefits:
You have an Apache for SSL offloading and cluster Backend communication.
You have one or two separated server for your tomcat.
If you like, you could do it also with windows.
Through the vitalization, you could quickly move to another hardware box, in
case of an HW error.

Mario

http://www.n0r1sk.com




 --rujin



Re: tomcat clustering

2010-05-31 Thread Mark Thomas
On 31/05/2010 06:37, John Smith wrote:
 deployed my war file deployDir=/usr/local/tomcat/webapps after restarting
 the tomcat  my war file is not exploded and in log i am getting
 
   SEVERE: FarmWarDeployer can only work as host cluster subelement!

This means that your top-level Cluster .../ element is is nested
inside an Engine .../ element. The FarmWarDeployer only works if the
top-level Cluster .../ element is is nested inside an Host.../ element.

 I checked  Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer
 on tomcat site
 
  http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-deployer.html
 
This goober is currently pretty broken, but we are
 working hard to fix it

It is no longer broken (I fixed it in 6.0.20) but the docs still haven't
been written. Going from memory:

1. Move your Cluster .../ element from Engine.../ to Host.../
2. The watchDir is where you put WAR files you want copied to the
cluster (should be outside the host's appBase)
3. The tempDir gets used to write WARs as they are received from the
cluster.
4. The deplorDir is where apps get deployed from. If I recall correctly,
this should not be the webapps directory although it may work if
autoDeploy is disabled.

Mark

 search on google but couldn't find required info.
 
 My question, is where  I can deploy my war file so that all three nodes can
 see and work in cluster.
 
 Any help will be appreciated
 
 Regards
 
 John
 




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



Re: Tomcat Clustering

2009-11-13 Thread Filip Hanik - Dev Lists

you running into this?
https://issues.apache.org/bugzilla/show_bug.cgi?id=47308

On 11/13/2009 03:42 PM, Mate1 Subscription wrote:

Hi,

I have been trying to configure clustering between 2 instances of Tomcat on
the same physical server.  Unfortunately it is not working.  Would someone
be able to help me to figure out what is the problem (assuming it is
possible to cluster 2 instances of tomcat on the same server)?

Here is my setup:

SETUP 1: (This Setup is working)

Server 1 --  Has one instance of Tomcat
Server 2 --  Has one instance of Tomcat

All those servers have exactly the same configuration files ... The only
thing that is different between them is each server.xml file has its own IP
address of each server (xxx.yyy.zzz.[11-12]) and its own jvmroute
(server[1-2])

Here is a sample config in server.xml

 Engine name=Catalina defaultHost=localhost jvmRoute=server1

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

 Manager className=org.apache.catalina.ha.session.DeltaManager
 expireSessionsOnShutdown=false
 notifyListenersOnReplication=true/

 Channel className=org.apache.catalina.tribes.group.GroupChannel
 Membership
className=org.apache.catalina.tribes.membership.McastService
 address=228.0.0.4
 port=45664
 frequency=500
 dropTime=3000/
 Receiver
className=org.apache.catalina.tribes.transport.nio.NioReceiver
 address=xxx.yyy.zzz.11
 port=4001
 autoBind=100
 selectorTimeout=5000
 maxThreads=6/


Clustering is working perfectly in that setup.  So this is not my problem.


SETUP 2: (This Setup is not working)
--
Server 11 --  Has 2 instances of Tomcat

Here is a sample configuration in server.xml

FIRST INSTANCE

Engine name=Catalina defaultHost=localhost jvmRoute=server11a

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

 Manager className=org.apache.catalina.ha.session.DeltaManager
 expireSessionsOnShutdown=false
 notifyListenersOnReplication=true/

 Channel className=org.apache.catalina.tribes.group.GroupChannel
 Membership
className=org.apache.catalina.tribes.membership.McastService
 address=228.0.0.4
 port=45674
 frequency=500
 dropTime=3000/
 Receiver
className=org.apache.catalina.tribes.transport.nio.NioReceiver
 address=xxx.yyy.zzz.21
 port=4001
 autoBind=100
 selectorTimeout=5000
 maxThreads=6/

SECOND INSTANCE

Engine name=Catalina defaultHost=localhost jvmRoute=server11b

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

 Manager className=org.apache.catalina.ha.session.DeltaManager
 expireSessionsOnShutdown=false
 notifyListenersOnReplication=true/

 Channel className=org.apache.catalina.tribes.group.GroupChannel
 Membership
className=org.apache.catalina.tribes.membership.McastService
 address=228.0.0.4
 port=45674
 frequency=500
 dropTime=3000/
 Receiver
className=org.apache.catalina.tribes.transport.nio.NioReceiver
 address=xxx.yyy.zzz.21
 port=4002
 autoBind=100
 selectorTimeout=5000
 maxThreads=6/

When I try to start those 2 instances, they start with no problem except
that clustering is not working at all.
If I change the port from 45674 to 45664, Both tomcat instances start and
they are able to cluster with the remaining 2 servers (listed in SETUP 1).
Server11a clusters with Server1  Server 2
Server11b clusters with Server1  Server 2
Server11a cannot have a direct cluster link with Server11b (and vice
versa).  But as seen from the last 2 lines, they are in the cluster via
either Server1 or Server2

Why those 2 instances are able to cluster properly when they are using the
same port as Server1  Server2 ... But when we try to cluster them between
each others, they do not cluster at all?

Thanks for your help.

Richard

   



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



Re: Tomcat Clustering trouble when starting up under high load

2009-03-11 Thread Mikel Ibiricu
Hi Rainer, thanks for your response.

I tried the config you suggested. It suppose the way of configuring those
parameters is as you said, but skipping manager. from the begining, as
when I tried as you said, I got this in the catalina. log:

10-mar-2009 15:58:19 org.apache.tomcat.util.digester.SetPropertiesRule begin
ADVERTENCIA: [SetPropertiesRule]{Server/Service/Engine/Cluster/Manager}
Setting property 'manager.sendAllSessions' to 'false' did not find a
matching property.
10-mar-2009 15:58:19 org.apache.tomcat.util.digester.SetPropertiesRule begin
ADVERTENCIA: [SetPropertiesRule]{Server/Service/Engine/Cluster/Manager}
Setting property 'manager.sendAllSessionsSize' to '200' did not find a
matching property.
10-mar-2009 15:58:19 org.apache.tomcat.util.digester.SetPropertiesRule begin
ADVERTENCIA: [SetPropertiesRule]{Server/Service/Engine/Cluster/Manager}
Setting property 'manager.sendAllSessionsWaitTime' to '0' did not find a
matching property.
10-mar-2009 15:58:19 org.apache.tomcat.util.digester.SetPropertiesRule begin

Maybe without the manager prefix? sendAllSessions=false,
sendAllSessionSize=200 and sendAllSessionsWaitTime=?

Filip, we consider taking thead dumps, but we are using jdk 1.5 under
windows. I heard it is not supported in Windows until jdk 1.6. Is it true?

Best regards
Mikel



2009/3/9 Rainer Jung rainer.j...@kippdata.de

 On 09.03.2009 09:24, Mikel Ibiricu wrote:

 So, It works OK but when starting up one of the nodes with over 500
 sessions
 alive in the other, it doesn't replicate anything. We assume that it would
 not be able to replicate everything... but why it does either replicate
 everything or nothing? If it's not able replicate all the sessions, we
 would
 assume it, but we would like to replicate at least something... Maybe some
 trouble with the config we are trying? We tried to limit the
 keepAliveCount
 of the senders, without improvement with this.

 Reading the DeltaManager code, I have seen the sendAlllSessions parameter.
 According to in-line javadoc and the implementation,

 /**
  * handle receive that other node want all sessions ( restart )
  * a) send all sessions with one message
  * b) send session at blocks
  * After sending send state is complete transfered
  * @param msg
  * @param sender
  * @throws IOException
  */
 protected void handleGET_ALL_SESSIONS(SessionMessage msg, Member
 sender)
 throws IOException {

 [...]

 if (isSendAllSessions()) {
 sendSessions(sender, currentSessions, findSessionTimestamp);
 } else {
 // send session at blocks
 int len = currentSessions.length  getSendAllSessionsSize() ?
 currentSessions.length : getSendAllSessionsSize();
 Session[] sendSessions = new Session[len];
 for (int i = 0; i  currentSessions.length; i +=
 getSendAllSessionsSize()) {
 len = i + getSendAllSessionsSize()
  currentSessions.length
 ? currentSessions.length - i : getSendAllSessionsSize();
 System.arraycopy(currentSessions, i, sendSessions, 0,
 len);
 sendSessions(sender, sendSessions,findSessionTimestamp);
 if (getSendAllSessionsWaitTime()  0) {
 try {
 Thread.sleep(getSendAllSessionsWaitTime());
 } catch (Exception sleep) {
 }
 }//end if
 }//for
 }//end if

 SessionMessage newmsg = new
 SessionMessageImpl(name,SessionMessage.EVT_ALL_SESSION_TRANSFERCOMPLETE,
 null,SESSION-STATE-TRANSFERED, SESSION-STATE-TRANSFERED+ getName());
 newmsg.setTimestamp(findSessionTimestamp);
 if (log.isDebugEnabled())

 log.debug(sm.getString(deltaManager.createMessage.allSessionTransfered,getName()));
 counterSend_EVT_ALL_SESSION_TRANSFERCOMPLETE++;
 cluster.send(newmsg, sender);
 }

 it may cover our expectatives, so I tried to include
 sendAllSessions=false
 in the cluster manager configuration

 Manager className=org.apache.catalina.ha.session.DeltaManager
name=clusterPruebas6
stateTransferTimeout=180
expireSessionsOnShutdown=false
notifyListenersOnReplication=false
sendAllSessions=false/

 But it seems like this parameter is not configurable from the server.xml
 file. So, what can I do to force that if it's not posible to replicate all
 the sessions, at least replicate something in the startup?


 If you want to test with sendAllSessions set to false, then add

 manager.sendAllSessions=false

 to the Manager element of the cluster configuration.

 You might then also want to configure:

 manager.sendAllSessionsSize: the number of session which will be serialized
 and send in one chunk (default if sendAllSessions=false: 1000)

 manager.sendAllSessionsWaitTime: the time in milliseconds between sending
 out consecutive session chunks 

Re: Tomcat Clustering trouble when starting up under high load

2009-03-11 Thread Filip Hanik - Dev Lists

hi Mikel,
when setting a property on the Manager you omit the manager. prefix, 
just as you stated.
To do thread dumps with JDK 1.5 under windows, you can use the tanuki 
service wrapper

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

The tomcat team might have added that feature to the Tomcat wrapper too, 
you'd have to check


Filip




Mikel Ibiricu wrote:

Hi Rainer, thanks for your response.

I tried the config you suggested. It suppose the way of configuring those
parameters is as you said, but skipping manager. from the begining, as
when I tried as you said, I got this in the catalina. log:

10-mar-2009 15:58:19 org.apache.tomcat.util.digester.SetPropertiesRule begin
ADVERTENCIA: [SetPropertiesRule]{Server/Service/Engine/Cluster/Manager}
Setting property 'manager.sendAllSessions' to 'false' did not find a
matching property.
10-mar-2009 15:58:19 org.apache.tomcat.util.digester.SetPropertiesRule begin
ADVERTENCIA: [SetPropertiesRule]{Server/Service/Engine/Cluster/Manager}
Setting property 'manager.sendAllSessionsSize' to '200' did not find a
matching property.
10-mar-2009 15:58:19 org.apache.tomcat.util.digester.SetPropertiesRule begin
ADVERTENCIA: [SetPropertiesRule]{Server/Service/Engine/Cluster/Manager}
Setting property 'manager.sendAllSessionsWaitTime' to '0' did not find a
matching property.
10-mar-2009 15:58:19 org.apache.tomcat.util.digester.SetPropertiesRule begin

Maybe without the manager prefix? sendAllSessions=false,
sendAllSessionSize=200 and sendAllSessionsWaitTime=?

Filip, we consider taking thead dumps, but we are using jdk 1.5 under
windows. I heard it is not supported in Windows until jdk 1.6. Is it true?

Best regards
Mikel



2009/3/9 Rainer Jung rainer.j...@kippdata.de

  

On 09.03.2009 09:24, Mikel Ibiricu wrote:



So, It works OK but when starting up one of the nodes with over 500
sessions
alive in the other, it doesn't replicate anything. We assume that it would
not be able to replicate everything... but why it does either replicate
everything or nothing? If it's not able replicate all the sessions, we
would
assume it, but we would like to replicate at least something... Maybe some
trouble with the config we are trying? We tried to limit the
keepAliveCount
of the senders, without improvement with this.

Reading the DeltaManager code, I have seen the sendAlllSessions parameter.
According to in-line javadoc and the implementation,

/**
 * handle receive that other node want all sessions ( restart )
 * a) send all sessions with one message
 * b) send session at blocks
 * After sending send state is complete transfered
 * @param msg
 * @param sender
 * @throws IOException
 */
protected void handleGET_ALL_SESSIONS(SessionMessage msg, Member
sender)
throws IOException {

[...]

if (isSendAllSessions()) {
sendSessions(sender, currentSessions, findSessionTimestamp);
} else {
// send session at blocks
int len = currentSessions.length  getSendAllSessionsSize() ?
currentSessions.length : getSendAllSessionsSize();
Session[] sendSessions = new Session[len];
for (int i = 0; i  currentSessions.length; i +=
getSendAllSessionsSize()) {
len = i + getSendAllSessionsSize()
 currentSessions.length
? currentSessions.length - i : getSendAllSessionsSize();
System.arraycopy(currentSessions, i, sendSessions, 0,
len);
sendSessions(sender, sendSessions,findSessionTimestamp);
if (getSendAllSessionsWaitTime()  0) {
try {
Thread.sleep(getSendAllSessionsWaitTime());
} catch (Exception sleep) {
}
}//end if
}//for
}//end if

SessionMessage newmsg = new
SessionMessageImpl(name,SessionMessage.EVT_ALL_SESSION_TRANSFERCOMPLETE,
null,SESSION-STATE-TRANSFERED, SESSION-STATE-TRANSFERED+ getName());
newmsg.setTimestamp(findSessionTimestamp);
if (log.isDebugEnabled())

log.debug(sm.getString(deltaManager.createMessage.allSessionTransfered,getName()));
counterSend_EVT_ALL_SESSION_TRANSFERCOMPLETE++;
cluster.send(newmsg, sender);
}

it may cover our expectatives, so I tried to include
sendAllSessions=false
in the cluster manager configuration

Manager className=org.apache.catalina.ha.session.DeltaManager
   name=clusterPruebas6
   stateTransferTimeout=180
   expireSessionsOnShutdown=false
   notifyListenersOnReplication=false
   sendAllSessions=false/

But it seems like this parameter is not configurable from the server.xml
file. So, what can I do to force that if it's not posible to replicate all
the sessions, at least replicate something in the startup?

  

If you want to test with sendAllSessions set to false, then add

manager.sendAllSessions=false

to the Manager element of the 

Re: Tomcat Clustering trouble when starting up under high load

2009-03-09 Thread Mikel Ibiricu
Hi Filip

Thanks for your response. We have been testing some modifications on our
config, specially focusing in what you told us about limiting
stateTransferTimeout, which we have limited to 180 seconds now. Actually, it
does not get stuck, in the worst case, it only starts without replicating
anything

I have been trying some fine modifications, specially in the sender and
receiver config. Our actual config is like that:

Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
   Manager className=org.apache.catalina.ha.session.DeltaManager
   name=clusterPruebas6
   stateTransferTimeout=180
   expireSessionsOnShutdown=false
   notifyListenersOnReplication=false/

   Channel className=org.apache.catalina.tribes.group.GroupChannel
  Membership
className=org.apache.catalina.tribes.membership.McastService
address=228.0.0.9
bind=172.26.102.233
port=45569
frequency=500
dropTime=15000
soTimeout=1/
Receiver
className=org.apache.catalina.tribes.transport.nio.NioReceiver
  address=172.26.102.233
  port=4009
  autoBind=100
  selectorTimeout=5000
  maxThreads=25
  timeout=3000/

Sender
className=org.apache.catalina.tribes.transport.ReplicationTransmitter
  Transport
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender
  keepAliveCount=50
  soLingerOn=false
  direct=false
  poolSize=25
  soReuseAddress=true
  ooBInline=true
  maxRetryAttempts=0
  throwOnFailedAck=false/
 /Sender
 Interceptor
className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/
 !--Interceptor
className=org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor
Member
className=org.apache.catalina.tribes.membership.StaticMember
   port=45569
   securePort=-1
   host=172.26.102.233
   domain=cluster
   uniqueId={0,1,2,3,4,5,6,7,8,10}/
  /Interceptor--
  Interceptor
className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/
  Interceptor
className=org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor/

  Valve
className=org.apache.catalina.cluster.tcp.ReplicationValve

filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

  ClusterListener
className=org.apache.catalina.ha.session.ClusterSessionListener/

   /Channel

/Cluster

We tried static membsership, without apparent performance changes over the
mcast membership.

So, It works OK but when starting up one of the nodes with over 500 sessions
alive in the other, it doesn't replicate anything. We assume that it would
not be able to replicate everything... but why it does either replicate
everything or nothing? If it's not able replicate all the sessions, we would
assume it, but we would like to replicate at least something... Maybe some
trouble with the config we are trying? We tried to limit the keepAliveCount
of the senders, without improvement with this.

Reading the DeltaManager code, I have seen the sendAlllSessions parameter.
According to in-line javadoc and the implementation,

/**
 * handle receive that other node want all sessions ( restart )
 * a) send all sessions with one message
 * b) send session at blocks
 * After sending send state is complete transfered
 * @param msg
 * @param sender
 * @throws IOException
 */
protected void handleGET_ALL_SESSIONS(SessionMessage msg, Member sender)
throws IOException {

[...]

if (isSendAllSessions()) {
sendSessions(sender, currentSessions, findSessionTimestamp);
} else {
// send session at blocks
int len = currentSessions.length  getSendAllSessionsSize() ?
currentSessions.length : getSendAllSessionsSize();
Session[] sendSessions = new Session[len];
for (int i = 0; i  currentSessions.length; i +=
getSendAllSessionsSize()) {
len = i + getSendAllSessionsSize()  currentSessions.length
? currentSessions.length - i : getSendAllSessionsSize();
System.arraycopy(currentSessions, i, sendSessions, 

Re: Tomcat Clustering trouble when starting up under high load

2009-03-09 Thread Rainer Jung

On 09.03.2009 09:24, Mikel Ibiricu wrote:

So, It works OK but when starting up one of the nodes with over 500 sessions
alive in the other, it doesn't replicate anything. We assume that it would
not be able to replicate everything... but why it does either replicate
everything or nothing? If it's not able replicate all the sessions, we would
assume it, but we would like to replicate at least something... Maybe some
trouble with the config we are trying? We tried to limit the keepAliveCount
of the senders, without improvement with this.

Reading the DeltaManager code, I have seen the sendAlllSessions parameter.
According to in-line javadoc and the implementation,

/**
  * handle receive that other node want all sessions ( restart )
  * a) send all sessions with one message
  * b) send session at blocks
  * After sending send state is complete transfered
  * @param msg
  * @param sender
  * @throws IOException
  */
 protected void handleGET_ALL_SESSIONS(SessionMessage msg, Member sender)
throws IOException {

 [...]

 if (isSendAllSessions()) {
 sendSessions(sender, currentSessions, findSessionTimestamp);
 } else {
 // send session at blocks
 int len = currentSessions.length  getSendAllSessionsSize() ?
currentSessions.length : getSendAllSessionsSize();
 Session[] sendSessions = new Session[len];
 for (int i = 0; i  currentSessions.length; i +=
getSendAllSessionsSize()) {
 len = i + getSendAllSessionsSize()  currentSessions.length
? currentSessions.length - i : getSendAllSessionsSize();
 System.arraycopy(currentSessions, i, sendSessions, 0, len);
 sendSessions(sender, sendSessions,findSessionTimestamp);
 if (getSendAllSessionsWaitTime()  0) {
 try {
 Thread.sleep(getSendAllSessionsWaitTime());
 } catch (Exception sleep) {
 }
 }//end if
 }//for
 }//end if

 SessionMessage newmsg = new
SessionMessageImpl(name,SessionMessage.EVT_ALL_SESSION_TRANSFERCOMPLETE,
null,SESSION-STATE-TRANSFERED, SESSION-STATE-TRANSFERED+ getName());
 newmsg.setTimestamp(findSessionTimestamp);
 if (log.isDebugEnabled())
log.debug(sm.getString(deltaManager.createMessage.allSessionTransfered,getName()));
 counterSend_EVT_ALL_SESSION_TRANSFERCOMPLETE++;
 cluster.send(newmsg, sender);
 }

it may cover our expectatives, so I tried to include sendAllSessions=false
in the cluster manager configuration

Manager className=org.apache.catalina.ha.session.DeltaManager
name=clusterPruebas6
stateTransferTimeout=180
expireSessionsOnShutdown=false
notifyListenersOnReplication=false
sendAllSessions=false/

But it seems like this parameter is not configurable from the server.xml
file. So, what can I do to force that if it's not posible to replicate all
the sessions, at least replicate something in the startup?


If you want to test with sendAllSessions set to false, then add

manager.sendAllSessions=false

to the Manager element of the cluster configuration.

You might then also want to configure:

manager.sendAllSessionsSize: the number of session which will be 
serialized and send in one chunk (default if sendAllSessions=false: 1000)


manager.sendAllSessionsWaitTime: the time in milliseconds between 
sending out consecutive session chunks (default if 
sendAllSessions=false: 2000)


Regards,

Rainer

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



Re: Tomcat Clustering trouble when starting up under high load

2009-01-30 Thread Filip Hanik - Dev Lists
state transfer timeout -1 is not a good setting. one should prefer to 
timeout rather than getting stuck, even if the timeout means we didn't 
get everything


you may also try the backup manager, which does the state transfer in a 
bit smarter manner.


when your system is stuck, then thread dumps are crucial to resolving 
your actual issue


Filip

Mikel Ibiricu wrote:

Hello all

I´m Mikel, and me and my workmates have already been a while testing our
environment in order to  establish a in memory session replication cluster
for our servers. The thing is that our servers are often loaded with up to a
thousand (1000) and more sessions (and now, we have three tomcat nodes in
different machines working in a load balancer). In hot moments, I have
counted up to 4500 sessions distributed between the three servers.

So, I'll tell you the main configuration our production environment. Web
servers:

Two windows server 2003 with IIS and isapi_redirect.dll conector.

App servers

node 1  2: IBM Xseries_3550 Intel Xeon CPU 5150 @2,66GHz, 2,00 GB RAM,
Windows 2003 Server R2
node3: IBM XSeries_366 Intel Xeon CPU 3,20Ghz, 3,00 GB RAM, Windows Server
2003 R2

In our development environment, where we have been making our tests, we have
2 tomcats in two different machines

node 1: Intel Xeon CPU E5440 @ 2,83GHz, 1,00 GB RAM, Windows Server 2003 R2
node 2: IBM XSeries_3550 Intel Xeon CPU E5440 @ 2,83 GHz, 2GB RAM, Windows
Server 2003 R2

We have been testing the Tomcat 5.5.9 that we are using in production,
finding some trouble, even after aplying the clustering fix pack from
https://issues.apache.org/bugzilla/show_bug.cgi?id=34389 . Finally, we took
the decission to upgrade to last Tomcat 6 available, version 6.0.18, to see
if the announced refactoring of cluster subsystem could solve our trouble.

After all this prety long intro, I'll tell you the reason of my request.
When we test the cluster (in development environment) with both nodes
running, we create up to a thousand sessions, keeping alive and modificating
about 500. So, we can see that all of them get replicated to the other node
 quickly . The trouble comes when, after shutting down one of the instances,
we start it again (while the half of the alive sessions are still beeing
 modified by the JMeter test). In our tests, the starting tomcat instance
finally gets hunged when receiving sessions from the alive node.

Theese are the traces seen in the catalina.log of node 1 when starting it:

Jan 26, 2009 6:51:56 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
C:\tomcat-6.0.18\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program
Files\Serena\Dimensions
10.1\CM\prog;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Program
Files\IBM\Director\bin;C:\Program Files\Common
Files\IBM\ICC\cimom\bin;C:\Program Files\System Center Operations Manager
2007\
Jan 26, 2009 6:51:56 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-9080
Jan 26, 2009 6:51:56 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-9081
Jan 26, 2009 6:51:56 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1928 ms
Jan 26, 2009 6:51:56 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 26, 2009 6:51:56 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Jan 26, 2009 6:51:56 PM org.apache.catalina.ha.tcp.SimpleTcpCluster start
INFO: Cluster is about to start
Jan 26, 2009 6:51:56 PM org.apache.catalina.tribes.transport.ReceiverBase
bind
INFO: Receiver Server Socket bound to:/172.26.102.233:4009
Jan 26, 2009 6:51:56 PM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Attempting to bind the multicast socket to /228.0.0.9:45569
Jan 26, 2009 6:51:56 PM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Binding to multicast address, failed. Binding to port only.
Jan 26, 2009 6:51:56 PM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Setting multihome multicast interface to:/172.26.102.233
Jan 26, 2009 6:51:56 PM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Setting cluster mcast soTimeout to 1000
Jan 26, 2009 6:51:56 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 2000 milliseconds to establish cluster membership, start
level:4
Jan 26, 2009 6:51:57 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
memberAdded
INFO: Replication member
added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{-84, 26, 102,
-60}:4009,{-84, 26, 102, -60},4009, alive=1938953,id={-57 67 34 -23 -38 83
74 68 -67 -87 -112 -94 13 102 -78 -20 }, payload={}, command={}, domain={},
]
Jan 26, 2009 6:51:58 PM

Re: Tomcat clustering

2008-11-07 Thread Anupam Beri

Hello All ,
   I am a newbie to the Tomcat and Tomcat clustering
environment .I was just going through some posts on this forum for reference
.
I wish to deploy the classic JPetStore application which comes with the
Spring framework in the clustered environment involving 2 machines

For this, I installed Apache 2.2 , Tomcat 6.0.18 and mod_jk on each of these
machines . I configured mod_jk load balancer for sticky session and deployed
JPetStore on either of them .
But once I start tomcat and apache on either machine and try to do some
transactions , I cannot see any sessions being exchanged between the two
members of the cluster.

The JPetStore application also uses a database (hsqldb) and its necessary to
start one on either machine (it is not a shared one).

I was reading some documentation regarding if the session attributes are to
be implemented from serializable interface...but I see they already have
been in the source code .

I will be greateful if anyone could help me out and give a  good insight on
where I am going wrong ?
I have attached the server.xml , workers.properties and catalina.out for the
two nodes in the attached file.
Any help is deeply appreciated ! 

Best Regards !!
Anupam http://www.nabble.com/file/p20382167/clustering_files.rar
clustering_files.rar 

Christopher Schultz-2 wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Enrique,
 
 Enrique Arizón wrote:
 | | Mysql makes a great help since it use in memory
 | (RAM) storage for
 | | clustered tables
 |
 | What are you talking about? The closest thing to
 | clustered tables that
 | MySQL supports is the FEDERATED storage engine, and
 | there are no
 | guarantees about RAM usage for it.
 |
 | Guess we are not speaking about the same thing. I
 | refer to NDB Cluster engine:
 |
 | http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster.html
 |
 |  I read time ago that Google improved such engine for
 | its own purposes and the next Mysql will show improved
 | clustering stuff. Also, since Mysql is now part of Sun
 | I guess also it will get a boost from Solaris
 | engineering (I mean, Dtrace).
 
 Aah, yes... the NDB storage engine. This is great if you don't require
 durability of your data :) At least MySQL 5.1 has that nice write it to
 the disk, too feature.
 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.8 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iEYEARECAAYFAkf6lecACgkQ9CaO5/Lv0PD8TgCgt5X0jagI6WH+Rh91wSW3CC+h
 agQAoIPoJJGJaJktjw6e/vQv3mLIT3vY
 =/g66
 -END PGP SIGNATURE-
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Tomcat-clustering-tp16249049p20382167.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat clustering

2008-10-29 Thread Dwayne
Andrew,

Sharing state between web apps in Tomcat is possible with solutions like
Terracotta or a customized messaging system.

D.

On Mon, Oct 27, 2008 at 2:49 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED]
 wrote:

 but you are saying they are different applications, so what data could they
 possible share?

 ie, if you have appA.war and appB.war, and they are totally different apps,
 then they shouldn't be sharing session data

 only appA.war on one tomcat instance can share session data with appA.war
 on another tomcat instance

 Filip


 Andrew Hole wrote:

 Well,

 I would like in the future to have application A and B in different
 machines, and for that i need to use some way to share session data.

 Thanks

 On Mon, Oct 27, 2008 at 8:19 PM, Filip Hanik - Dev Lists 
 [EMAIL PROTECTED]


 wrote:





 nothing like that is built in, you'd have to write that code for the
 object
 sharing yourself
 you could use the tomcat internals to achieve what you want, but you'd
 have
 to do a bit of legwork.
 Filip


 Andrew Hole wrote:



 Yes.

 Machine1
  TomcatA
  ApplicationA1
  TomcatB
  ApplicationB1

 But both applications have been developed by me and I want to share an
 object between applications. If the object have been created in
 application
 A, I would like to replicate information to application B.

 Thanks


 On Mon, Oct 27, 2008 at 6:18 PM, Filip Hanik - Dev Lists 
 [EMAIL PROTECTED]




 wrote:







 not sure I understand

 Is this your layout then?

 Machine1
  TomcatA
  ApplicationA1
  TomcatB
  ApplicationB1

 since ApplicationA1 and ApplicationB1 are different, there is nothing
 to
 cluster, there is no state to share

 Filip


 Andrew Hole wrote:





 I would like to cluster two different applications in same machine
 (each
 in
 different Tomcat instance).
 Is it possible?







 On Mon, Oct 27, 2008 at 5:39 PM, Filip Hanik - Dev Lists 
 [EMAIL PROTECTED]






 wrote:









 It means that the application that it is trying to request data from
 is
 not
 deployed on the server.

 for example, if you have applicate /test installed on server A, then
 it
 will have to be installed on server B as well, if it isn't, you'll
 get
 a
 message like the one below

 Filip


 Andrew Hole wrote:







 Hi Guys!

 What means the following error? What I'm doing wrong?

 FINE: Assuming clocks are synched: Replication for GET-ALL- took=47
 ms.
 27/Out/2008 17:12:10
 org.apache.catalina.cluster.session.ClusterSessionListener
 messageReceived
 SEVERE: Context manager doesn't exist:



 Thanks a lot









 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]











 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]









 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]









 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Tomcat clustering

2008-10-27 Thread Filip Hanik - Dev Lists
It means that the application that it is trying to request data from is 
not deployed on the server.


for example, if you have applicate /test installed on server A, then it 
will have to be installed on server B as well, if it isn't, you'll get a 
message like the one below


Filip

Andrew Hole wrote:

Hi Guys!

What means the following error? What I'm doing wrong?

FINE: Assuming clocks are synched: Replication for GET-ALL- took=47 ms.
27/Out/2008 17:12:10
org.apache.catalina.cluster.session.ClusterSessionListener messageReceived
SEVERE: Context manager doesn't exist:



Thanks a lot

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat clustering

2008-10-27 Thread Andrew Hole
I would like to cluster two different applications in same machine (each in
different Tomcat instance).
Is it possible?







On Mon, Oct 27, 2008 at 5:39 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED]
 wrote:

 It means that the application that it is trying to request data from is not
 deployed on the server.

 for example, if you have applicate /test installed on server A, then it
 will have to be installed on server B as well, if it isn't, you'll get a
 message like the one below

 Filip


 Andrew Hole wrote:

 Hi Guys!

 What means the following error? What I'm doing wrong?

 FINE: Assuming clocks are synched: Replication for GET-ALL- took=47 ms.
 27/Out/2008 17:12:10
 org.apache.catalina.cluster.session.ClusterSessionListener messageReceived
 SEVERE: Context manager doesn't exist:



 Thanks a lot





 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




RE: Tomcat clustering

2008-10-27 Thread Caldarale, Charles R
 From: Andrew Hole [mailto:[EMAIL PROTECTED]
 Subject: Re: Tomcat clustering

 I would like to cluster two different applications in same
 machine (each in different Tomcat instance).

That's not clustering - it's just two separate Tomcat installations.  
Clustering is defined as the *same* applications cooperatively deployed on 
multiple Tomcats.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat clustering

2008-10-27 Thread Filip Hanik - Dev Lists

not sure I understand

Is this your layout then?

Machine1
 TomcatA
   ApplicationA1
 TomcatB
   ApplicationB1

since ApplicationA1 and ApplicationB1 are different, there is nothing to 
cluster, there is no state to share


Filip

Andrew Hole wrote:

I would like to cluster two different applications in same machine (each in
different Tomcat instance).
Is it possible?







On Mon, Oct 27, 2008 at 5:39 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED]
  

wrote:



  

It means that the application that it is trying to request data from is not
deployed on the server.

for example, if you have applicate /test installed on server A, then it
will have to be installed on server B as well, if it isn't, you'll get a
message like the one below

Filip


Andrew Hole wrote:



Hi Guys!

What means the following error? What I'm doing wrong?

FINE: Assuming clocks are synched: Replication for GET-ALL- took=47 ms.
27/Out/2008 17:12:10
org.apache.catalina.cluster.session.ClusterSessionListener messageReceived
SEVERE: Context manager doesn't exist:



Thanks a lot



  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Tomcat clustering

2008-10-27 Thread Andrew Hole
Yes.

Machine1
 TomcatA
  ApplicationA1
 TomcatB
  ApplicationB1

But both applications have been developed by me and I want to share an
object between applications. If the object have been created in application
A, I would like to replicate information to application B.

Thanks


On Mon, Oct 27, 2008 at 6:18 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED]
 wrote:

 not sure I understand

 Is this your layout then?

 Machine1
  TomcatA
   ApplicationA1
  TomcatB
   ApplicationB1

 since ApplicationA1 and ApplicationB1 are different, there is nothing to
 cluster, there is no state to share

 Filip


 Andrew Hole wrote:

 I would like to cluster two different applications in same machine (each
 in
 different Tomcat instance).
 Is it possible?







 On Mon, Oct 27, 2008 at 5:39 PM, Filip Hanik - Dev Lists 
 [EMAIL PROTECTED]


 wrote:





 It means that the application that it is trying to request data from is
 not
 deployed on the server.

 for example, if you have applicate /test installed on server A, then it
 will have to be installed on server B as well, if it isn't, you'll get a
 message like the one below

 Filip


 Andrew Hole wrote:



 Hi Guys!

 What means the following error? What I'm doing wrong?

 FINE: Assuming clocks are synched: Replication for GET-ALL- took=47 ms.
 27/Out/2008 17:12:10
 org.apache.catalina.cluster.session.ClusterSessionListener
 messageReceived
 SEVERE: Context manager doesn't exist:



 Thanks a lot





 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]









 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Tomcat clustering

2008-10-27 Thread Filip Hanik - Dev Lists
nothing like that is built in, you'd have to write that code for the 
object sharing yourself
you could use the tomcat internals to achieve what you want, but you'd 
have to do a bit of legwork.

Filip

Andrew Hole wrote:

Yes.

Machine1
 TomcatA
  ApplicationA1
 TomcatB
  ApplicationB1

But both applications have been developed by me and I want to share an
object between applications. If the object have been created in application
A, I would like to replicate information to application B.

Thanks


On Mon, Oct 27, 2008 at 6:18 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED]
  

wrote:



  

not sure I understand

Is this your layout then?

Machine1
 TomcatA
  ApplicationA1
 TomcatB
  ApplicationB1

since ApplicationA1 and ApplicationB1 are different, there is nothing to
cluster, there is no state to share

Filip


Andrew Hole wrote:



I would like to cluster two different applications in same machine (each
in
different Tomcat instance).
Is it possible?







On Mon, Oct 27, 2008 at 5:39 PM, Filip Hanik - Dev Lists 
[EMAIL PROTECTED]


  

wrote:





  

It means that the application that it is trying to request data from is
not
deployed on the server.

for example, if you have applicate /test installed on server A, then it
will have to be installed on server B as well, if it isn't, you'll get a
message like the one below

Filip


Andrew Hole wrote:





Hi Guys!

What means the following error? What I'm doing wrong?

FINE: Assuming clocks are synched: Replication for GET-ALL- took=47 ms.
27/Out/2008 17:12:10
org.apache.catalina.cluster.session.ClusterSessionListener
messageReceived
SEVERE: Context manager doesn't exist:



Thanks a lot





  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat clustering

2008-10-27 Thread Andrew Hole
Well,

I would like in the future to have application A and B in different
machines, and for that i need to use some way to share session data.

Thanks

On Mon, Oct 27, 2008 at 8:19 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED]
 wrote:

 nothing like that is built in, you'd have to write that code for the object
 sharing yourself
 you could use the tomcat internals to achieve what you want, but you'd have
 to do a bit of legwork.
 Filip


 Andrew Hole wrote:

 Yes.

 Machine1
  TomcatA
  ApplicationA1
  TomcatB
  ApplicationB1

 But both applications have been developed by me and I want to share an
 object between applications. If the object have been created in
 application
 A, I would like to replicate information to application B.

 Thanks


 On Mon, Oct 27, 2008 at 6:18 PM, Filip Hanik - Dev Lists 
 [EMAIL PROTECTED]


 wrote:





 not sure I understand

 Is this your layout then?

 Machine1
  TomcatA
  ApplicationA1
  TomcatB
  ApplicationB1

 since ApplicationA1 and ApplicationB1 are different, there is nothing to
 cluster, there is no state to share

 Filip


 Andrew Hole wrote:



 I would like to cluster two different applications in same machine (each
 in
 different Tomcat instance).
 Is it possible?







 On Mon, Oct 27, 2008 at 5:39 PM, Filip Hanik - Dev Lists 
 [EMAIL PROTECTED]




 wrote:







 It means that the application that it is trying to request data from is
 not
 deployed on the server.

 for example, if you have applicate /test installed on server A, then it
 will have to be installed on server B as well, if it isn't, you'll get
 a
 message like the one below

 Filip


 Andrew Hole wrote:





 Hi Guys!

 What means the following error? What I'm doing wrong?

 FINE: Assuming clocks are synched: Replication for GET-ALL- took=47
 ms.
 27/Out/2008 17:12:10
 org.apache.catalina.cluster.session.ClusterSessionListener
 messageReceived
 SEVERE: Context manager doesn't exist:



 Thanks a lot







 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]









 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]









 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Tomcat clustering

2008-10-27 Thread Filip Hanik - Dev Lists
but you are saying they are different applications, so what data could 
they possible share?


ie, if you have appA.war and appB.war, and they are totally different 
apps, then they shouldn't be sharing session data


only appA.war on one tomcat instance can share session data with 
appA.war on another tomcat instance


Filip

Andrew Hole wrote:

Well,

I would like in the future to have application A and B in different
machines, and for that i need to use some way to share session data.

Thanks

On Mon, Oct 27, 2008 at 8:19 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED]
  

wrote:



  

nothing like that is built in, you'd have to write that code for the object
sharing yourself
you could use the tomcat internals to achieve what you want, but you'd have
to do a bit of legwork.
Filip


Andrew Hole wrote:



Yes.

Machine1
 TomcatA
 ApplicationA1
 TomcatB
 ApplicationB1

But both applications have been developed by me and I want to share an
object between applications. If the object have been created in
application
A, I would like to replicate information to application B.

Thanks


On Mon, Oct 27, 2008 at 6:18 PM, Filip Hanik - Dev Lists 
[EMAIL PROTECTED]


  

wrote:





  

not sure I understand

Is this your layout then?

Machine1
 TomcatA
 ApplicationA1
 TomcatB
 ApplicationB1

since ApplicationA1 and ApplicationB1 are different, there is nothing to
cluster, there is no state to share

Filip


Andrew Hole wrote:





I would like to cluster two different applications in same machine (each
in
different Tomcat instance).
Is it possible?







On Mon, Oct 27, 2008 at 5:39 PM, Filip Hanik - Dev Lists 
[EMAIL PROTECTED]




  

wrote:







  

It means that the application that it is trying to request data from is
not
deployed on the server.

for example, if you have applicate /test installed on server A, then it
will have to be installed on server B as well, if it isn't, you'll get
a
message like the one below

Filip


Andrew Hole wrote:







Hi Guys!

What means the following error? What I'm doing wrong?

FINE: Assuming clocks are synched: Replication for GET-ALL- took=47
ms.
27/Out/2008 17:12:10
org.apache.catalina.cluster.session.ClusterSessionListener
messageReceived
SEVERE: Context manager doesn't exist:



Thanks a lot







  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]









  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat clustering: Don't see Cluster MBean

2008-09-19 Thread Mark Thomas
Landry Stephane Zeng Eyindanga wrote:
 Hi all,
 I am trying to use a tomcat6 cluster. I've just set my configuration
 (with two tomcat nodes) just as indicated in the tomcat clustering guide
 (http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html).
 Unfortunately, I see all MBeans that I should see, but the Cluster MBean
 (|type=Cluster,host=${HOST}|).
 I'm in a urge, I'm working on an application that needs this MBean, or a
 cluster dedicated one.
 Is it a bug ? what should I do ?

Please do not hijack threads.

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat clustering: Don't see Cluster MBean

2008-09-19 Thread André Warnier

Hi Landry Stephane.

Hijacking a thread usually means hitting the reply button on a forum 
message, leave the subject as it was, and then ask a totally unrelated 
question in the message.
You should not do that, because it is confusing for people who try to 
help the original poster of the original question, and because it also 
confuses users who try to follow a conversation.


What you did here however was not really hijacking a thread, since you 
also changed the subject of the messsage.
But you left the original message in, and just asked your new unrelated 
question below.

I don't know if there is an official jargon term for that.
But it is totally confusing also, and your chances of getting an answer 
are severely diminished.


So why do you not start a totally new message, with the correct subject 
and content, and let's see from there, yes ?




Landry Stephane Zeng Eyindanga wrote:

Mark Thomas a écrit :

Brendan Martens wrote:
 

Hmmm, here are my jk settings:

JKWorkersFile/etc/libapache2-mod-jk/workers.properties
JkLogFile/var/log/apache2/mod_jk.log
JkLogLevelinfo
JkShmFile/var/log/apache2/mod_jk.shm
JkOptions+ForwardURICompatUnparsed



That value of JkOptions should be OK.

 

The JK connector is the one from the mod_jk debian package. Could that
be an issue if it was not compiled for the write version of tomcat? I'm
not really sure how the jk connector builds work.



If the debian docs don't tell you what version they are using then your
guess is as good as mine.

From what you say this is easy to repeat. Have you tried accessing 
the same

file directly on Tomcat? Another option is to enable access logging in
httpd and Tomcat and turn up the mod_jk log level to debug, run the test
and analyse the results. It should be obvious quite quickly where it id
going wrong.

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  

Hi all,
I am trying to use a tomcat6 cluster. I've just set my configuration 
(with two tomcat nodes) just as indicated in the tomcat clustering guide 
(http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html).
Unfortunately, I see all MBeans that I should see, but the Cluster MBean 
(|type=Cluster,host=${HOST}|).
I'm in a urge, I'm working on an application that needs this MBean, or a 
cluster dedicated one.

Is it a bug ? what should I do ?



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat clustering: Don't see Cluster MBean

2008-09-19 Thread Landry Stephane Zeng Eyindanga

Mark Thomas a écrit :

Landry Stephane Zeng Eyindanga wrote:
  

Hi all,
I am trying to use a tomcat6 cluster. I've just set my configuration
(with two tomcat nodes) just as indicated in the tomcat clustering guide
(http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html).
Unfortunately, I see all MBeans that I should see, but the Cluster MBean
(|type=Cluster,host=${HOST}|).
I'm in a urge, I'm working on an application that needs this MBean, or a
cluster dedicated one.
Is it a bug ? what should I do ?



Please do not hijack threads.

  

sorry

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Clustering (Synchronous configuration)

2008-08-26 Thread Filip Hanik - Dev Lists

hi Nuno, that would be value 0 (or 2 if you want acks involved)

take a look at the channelSendOptions description in

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

Filip

Nuno Manuel Martins wrote:

Hello,

I was reading the Cluster HOWTO at 
http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html and I have already 
implemented it and working. I would just like one piece of information on this 
paragraph:
 Synchronous vs asynchronous is configured using the channelSendOptions flag 
and is an integer value. The default value for the 
SimpleTcpCluster/DeltaManager combo is 8, which is asynchronous.

I would like to know to which value I should set the channelSendOptions to use 
synchronous configuration instead and what might be the main drawbacks and 
advantages of that regarding a small cluster (3-4 nodes). Sorry if it is a very 
basic question but I am quite new to clusters.

Thank you,
Nuno

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TOMCAT CLUSTERING HOWTO

2008-05-09 Thread karthikn

Hi

Sorry for the delay and Thx for reply

ALL i was saying is i have 2 independent TOMCATS  running on a 
windows2000 machine


c:\TOMCAT1 
startup 8080 shutdown = 8090


d:\TOMCAT2
startup 8081 shutdown = 8091

JDK is as below
d:/java/jdk163

I have already done the changes to server.xml for both the tomcats

as per  http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html;

So how to  do  Clustering and test the same.

I am not checking the performance using Load balancer,

Do i need to set up Load balancer to test the clustering ONLY ?


with regards
Karthik






Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

Caldarale, Charles R wrote:
| Clustering does not work without a load balancer. Period.
|
| Not strictly true.  Clustered Tomcats don't care if the requests are
| coming through a load balancer or someone manually changing port or
| IP addresses on each request.

Fair enough. I suppose I consider a cluster to be something that shares
work via a single point of access, not just something that shares data.
I think of clustered sessions as shares sessions within a cluster,
where the cluster handles work as a whole.

Having different clients connect specifically to one node in a cluster
is merely using shared sessions to me. That would kind of be like
calling several servers using the same database a cluster because they
share data.

| Certainly for any practical usage, a front end of some sort is
| required to automatically route requests, but it doesn't have to
| actually do any load balancing.

Agreed.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgjH+MACgkQ9CaO5/Lv0PCIugCgjJ+bAUeEryueVoq9KE47A4RG
wL0An1WBVcTugMOCQyT6aDO9bjkwHI5T
=M8qq
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TOMCAT CLUSTERING HOWTO

2008-05-09 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Karthik,

karthikn wrote:
| ALL i was saying is i have 2 independent TOMCATS  running on a
| windows2000 machine
|
| c:\TOMCAT1 startup 8080 shutdown = 8090

Tomcat does not have startup ports. Do you mean that you have a
connector listening on port 8080? Is this port listening for HTTP or
AJP requests? (It's probably HTTP).

| d:\TOMCAT2 startup 8081 shutdown = 8091

Okay.

| So how to do Clustering and test the same.

Before you worry about clustering, can you even get a single request
handled by Tomcat? If so, what URL are you using to access your webapp?

| I am not checking the performance using Load balancer,

Load balancers are not for testing performance. They are used to
distribute load across your cluster by choosing a server to handle a
particular request.

| Do i need to set up Load balancer to test the clustering ONLY ?

I'm not sure how you would even use your cluster, much less test it,
without a load balancer.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgkYZYACgkQ9CaO5/Lv0PAMzwCfSCjBISky4Q/znfwCYHRg9StQ
oRcAoIsRWr3Nb2O57NlSP2Vzy6uwvzDm
=KWpa
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TOMCAT CLUSTERING HOWTO

2008-05-09 Thread Hassan Schroeder
 | Do i need to set up Load balancer to test the clustering ONLY ?

 I'm not sure how you would even use your cluster, much less test it,
 without a load balancer.

Absolutely.

And the most confidence-inspiring (and pointy-haired-boss-impressing)
test is to access your cluster through a load balancer with only one TC
running, set some session variable, bring up the second TC and stop
the first, and then see that your session variable is still set on the next
request.

Besides, the amount of time spent repeating the OPs question has been
more than what's required to set up an Apache httpd as a balancer ... :-)

-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TOMCAT CLUSTERING HOWTO

2008-05-09 Thread karthikn

Hi

Sorry for the delay and Thx for reply 


Tomcat does not have startup ports.


Yes I have  set  the 2 Independent TOMCAT's at 8080 and 8081

!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --

 Before you worry about clustering, can you even get a single 
request handled by Tomcat?


I would be testing for ROOT web application in TOMCAT as

http://IP:port/

I perfectly get the TC's Home page


Some body on the Form told me , Set up the cluster before applying load 
balancing and Test the cluster's setup  as  following


deploy/undeploy your apps only to one server, and the cluster will 
distribute the  
deployments/undeploy across the entire cluster.

with distributable/ in web.xml


Is this correct or  not ?





with regards
Karthik





Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Karthik,

karthikn wrote:
| ALL i was saying is i have 2 independent TOMCATS  running on a
| windows2000 machine
|
| c:\TOMCAT1 startup 8080 shutdown = 8090

Tomcat does not have startup ports. Do you mean that you have a
connector listening on port 8080? Is this port listening for HTTP or
AJP requests? (It's probably HTTP).

| d:\TOMCAT2 startup 8081 shutdown = 8091

Okay.

| So how to do Clustering and test the same.

Before you worry about clustering, can you even get a single request
handled by Tomcat? If so, what URL are you using to access your webapp?

| I am not checking the performance using Load balancer,

Load balancers are not for testing performance. They are used to
distribute load across your cluster by choosing a server to handle a
particular request.

| Do i need to set up Load balancer to test the clustering ONLY ?

I'm not sure how you would even use your cluster, much less test it,
without a load balancer.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgkYZYACgkQ9CaO5/Lv0PAMzwCfSCjBISky4Q/znfwCYHRg9StQ
oRcAoIsRWr3Nb2O57NlSP2Vzy6uwvzDm
=KWpa
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TOMCAT CLUSTERING HOWTO

2008-05-09 Thread Hassan Schroeder
On Fri, May 9, 2008 at 8:03 AM, karthikn
[EMAIL PROTECTED] wrote:

 Some body on the Form told me , Set up the cluster before applying load
 balancing and Test the cluster's setup  as  following

deploy/undeploy your apps only to one server, and the cluster will
 distribute the  deployments/undeploy across the entire cluster.
with distributable/ in web.xml

 Is this correct or  not ?

That the deployments will be distributed, or that that's the way to test?

I don't know about the first, and from an operations perspective, I don't
think I'd /want/ that to happen. And it's been a while since I worked with
clusters, but I don't recall that being the case. Could be wrong, though.

Session replication was the whole point of clustering for installations
I've been involved in.

FWIW,
-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TOMCAT CLUSTERING HOWTO

2008-05-08 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

karthikn wrote:
| As per TOMCAT CLUSTERING HOWTO documents
| I am trying clustering on 2 TOMCAT 5.5.23  on WINDOWS OS sharing the
| same JVM 1.6

What are you using to split traffic between these two instances? It does
not appear that you have a cluster. It looks like you have two separate
Tomcat instances that have no relationship to one another. I think
that's why everyone is so confused.

I'm certainly confused as to why you would run two Tomcats on the same
JVM. First of all, how did you do that? Are you using Tomcat embedded or
something?

| 80818082
| ShutDown  80078008
| APJ   80098010
| TCP Listener  4001 4002
| tcpListenAddress autoauto
| jvmRoute node01  node02
|
| Will this work ?

Probably, but these two Tomcat instances won't just magically share
traffic with each other. You need some type of load balancer out in
front of the two instances to make the cluster useful.

You continually say it is not working but you never describe what is
happening. I can tell you that you will receive no help from this forum
if you continue to ask the same question and never provide any useful
information.

How does it /not/ work? Are any requests handled? Is only one of the
Tomcat instances handling any traffic? Are they not properly sharing
session information? Unbalanced load? /What/ is not working?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgi/lMACgkQ9CaO5/Lv0PA21QCdH04h3icgp+LASHtziDprG5nU
sqsAoIsQIhMmYQy0kt5BLJeTJuRP0pPE
=dR5k
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TOMCAT CLUSTERING HOWTO

2008-05-08 Thread karthikn

Hi

Sorry for delay and Thx for the reply

I'm certainly confused as to why you would run two Tomcats on the same
JVM. First of all, how did you do that? Are you using Tomcat embedded or 
something?



Yes I have 2 TOMCAT individual  running on same Windows2000
Machine sharing the same JVM with Startup / Shutdown Ports,but not embedded.


Would this setup be not configurable to be cluster ...?

You need some type of load balancer out in front of the two instances 
to make the cluster useful.


To test  clustering setup , do i need a Load balancer ...?


 You continually say it is not working but you never describe what 
is happening.


I have the cluster setup as said in the 
http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html;

And since some body on this form replied 


deploy/undeploy your apps only to one server, and the cluster will

 distribute  the deployments/undeploy across the entire cluster.
 with  distributable/ in web.xml


The O/p of these 2 tomcats is as given below 



Delpoyment of a war file on TOMCAT5523_I  displays in console as

INFO: Starting clustering manager at /DATAGRID
Apr 29, 2008 10:17:59 AM
org.apache.catalina.cluster.session.DeltaManager getAll
ClusterSessions
WARNING: Manager [/DATAGRID], requesting session state from
org.apache.catalina.
cluster.mcast.McastMember[tcp://10.10.16.63:4002,catalina,10.10.16.63,4002,
aliv e=17593]. This operation will timeout if no session state has been
received with
in 60 seconds.
Apr 29, 2008 10:18:59 AM
org.apache.catalina.cluster.session.DeltaManager waitFo
rSendAllSessions
SEVERE: Manager [/DATAGRID]: No session state send at 4/29/08 10:17 AM
received,
 timing out after 60,109 ms.


TOMCAT5523_II displays on console as

INFO: Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp
://10.10.16.63:4001,catalina,10.10.16.63,4001, alive=16]
Apr 29, 2008 10:17:59 AM
org.apache.catalina.cluster.session.ClusterSessionListe
ner messageReceived
SEVERE: Context manager doesn't exist:/DATAGRID



with regards
Karthik



Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

karthikn wrote:
| As per TOMCAT CLUSTERING HOWTO documents
| I am trying clustering on 2 TOMCAT 5.5.23  on WINDOWS OS sharing the
| same JVM 1.6

What are you using to split traffic between these two instances? It does
not appear that you have a cluster. It looks like you have two separate
Tomcat instances that have no relationship to one another. I think
that's why everyone is so confused.

I'm certainly confused as to why you would run two Tomcats on the same
JVM. First of all, how did you do that? Are you using Tomcat embedded or
something?

| 80818082
| ShutDown  80078008
| APJ   80098010
| TCP Listener  4001 4002
| tcpListenAddress autoauto
| jvmRoute node01  node02
|
| Will this work ?

Probably, but these two Tomcat instances won't just magically share
traffic with each other. You need some type of load balancer out in
front of the two instances to make the cluster useful.

You continually say it is not working but you never describe what is
happening. I can tell you that you will receive no help from this forum
if you continue to ask the same question and never provide any useful
information.

How does it /not/ work? Are any requests handled? Is only one of the
Tomcat instances handling any traffic? Are they not properly sharing
session information? Unbalanced load? /What/ is not working?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgi/lMACgkQ9CaO5/Lv0PA21QCdH04h3icgp+LASHtziDprG5nU
sqsAoIsQIhMmYQy0kt5BLJeTJuRP0pPE
=dR5k
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TOMCAT CLUSTERING HOWTO

2008-05-08 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Karthik,

karthikn wrote:
| Yes I have 2 TOMCAT individual  running on same Windows2000
| Machine sharing the same JVM with Startup / Shutdown Ports,but not
| embedded.

Can you explain how to start two Tomcat instances in a single JVM?

| Would this setup be not configurable to be cluster ...?

Er, if they have the same startup port (by which I assume you mean
connector port), then I think what you are doing is impossible.

1 Tomcat = 1 or more connectors

You can't do this the other way around. That is, you can't have one
connector (one port) serving two separate Tomcat instances.

|  You need some type of load balancer out in front of the two instances
| to make the cluster useful.
|
| To test  clustering setup , do i need a Load balancer ...?

Clustering does not work without a load balancer. Period. It's not about
testing. It's about working in the first place. Yes, you can start up
two Tomcat instances as a cluster, but they won't act as a cluster
unless you load balance them.

| I have the cluster setup as said in the
| http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html;
|
| Delpoyment of a war file on TOMCAT5523_I  displays in console as
|
| INFO: Starting clustering manager at /DATAGRID
| Apr 29, 2008 10:17:59 AM
| org.apache.catalina.cluster.session.DeltaManager getAll
| ClusterSessions
| WARNING: Manager [/DATAGRID], requesting session state from
| org.apache.catalina.
|
cluster.mcast.McastMember[tcp://10.10.16.63:4002,catalina,10.10.16.63,4002,
| aliv e=17593]. This operation will timeout if no session state has been
| received with
| in 60 seconds.
| Apr 29, 2008 10:18:59 AM
| org.apache.catalina.cluster.session.DeltaManager waitFo
| rSendAllSessions
| SEVERE: Manager [/DATAGRID]: No session state send at 4/29/08 10:17 AM
| received,
|  timing out after 60,109 ms.
|
|
| TOMCAT5523_II displays on console as
|
|  INFO: Replication member
| added:org.apache.catalina.cluster.mcast.McastMember[tcp
| ://10.10.16.63:4001,catalina,10.10.16.63,4001, alive=16]
| Apr 29, 2008 10:17:59 AM
| org.apache.catalina.cluster.session.ClusterSessionListe
| ner messageReceived
| SEVERE: Context manager doesn't exist:/DATAGRID

Okay, and then what?

Have you tried to make a request to your clustered web application? If
so, what was the result? If not, why not?

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgjF5YACgkQ9CaO5/Lv0PBWdwCgg1MIFimkNBAZ68AVXt2W1tpY
mvUAn0c+OYcLWkWJcpbaM3GRv+0Hu4Lg
=+q3T
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: TOMCAT CLUSTERING HOWTO

2008-05-08 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
 Subject: Re: TOMCAT CLUSTERING HOWTO
 
 Can you explain how to start two Tomcat instances in a single JVM?

I suspect the OP means one JVM installation as opposed to one JVM
instance.  (He seems a bit, shall we say, terminology challenged.)

 Clustering does not work without a load balancer. Period. 

Not strictly true.  Clustered Tomcats don't care if the requests are
coming through a load balancer or someone manually changing port or IP
addresses on each request.  Certainly for any practical usage, a front
end of some sort is required to automatically route requests, but it
doesn't have to actually do any load balancing.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TOMCAT CLUSTERING HOWTO

2008-05-08 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

Caldarale, Charles R wrote:
| Clustering does not work without a load balancer. Period.
|
| Not strictly true.  Clustered Tomcats don't care if the requests are
| coming through a load balancer or someone manually changing port or
| IP addresses on each request.

Fair enough. I suppose I consider a cluster to be something that shares
work via a single point of access, not just something that shares data.
I think of clustered sessions as shares sessions within a cluster,
where the cluster handles work as a whole.

Having different clients connect specifically to one node in a cluster
is merely using shared sessions to me. That would kind of be like
calling several servers using the same database a cluster because they
share data.

| Certainly for any practical usage, a front end of some sort is
| required to automatically route requests, but it doesn't have to
| actually do any load balancing.

Agreed.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgjH+MACgkQ9CaO5/Lv0PCIugCgjJ+bAUeEryueVoq9KE47A4RG
wL0An1WBVcTugMOCQyT6aDO9bjkwHI5T
=M8qq
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TOMCAT CLUSTERING HOWTO

2008-05-07 Thread Landon Fabbricino
Helly Karthikn,

I am confused as to where you are having problems?  

I am not sure what you mean by How to test TOMCAT CLUSTERING with out Load 
balancer?

What exactly are you trying to do with your two tomcat machines?



Landon Fabbricino
IT Applications

Phone: 403.225.7515
Fax: 403.225.7604
[EMAIL PROTECTED]

 karthikn [EMAIL PROTECTED] 5/6/2008 7:55:17 AM 
Hi

How to test TOMCAT CLUSTERING with out Load balancer

As Per the Tomcat 5.5.23 Cluster HowTo Documents

I have only tried to Cluster 2 TOMCATS on SAME Machine , Sharing same JVM.

but not able to SAMPLE TEST the clustering


Am i on doing some thing wrong in here.?



Please Some body suggest me  . :(

with regards
Karthik




karthikn wrote:
 Hi

 How to test TOMCAT CLUSTERING with out Load balancer

 As Per the Tomcat 5.5.23 Cluster HowTo Documents

 I have only tried to Cluster 2 TOMCATS on SAME Machine , Sharing same JVM.

 but not able to test the clustering


 Am i on doing some thing wrong in here.?




 with regards
 Karthik









 Landon Fabbricino wrote:
   
 I honestly have not tried clustering tomcat without Apache before.

 Just recently I set up a server farm with apache on one server and tomcat on 
 two other servers (so 3 physical machines)

 Apache contains the logic to handle the load balancing between the two 
 tomcats:

 jk.conf
 JkWorkersFile   conf/workers.properties
 JkLogFile   logs/jk_conn.log
 JkLogLevel  error

 JkMount /loadbalance-test*  loadbalancer

 workers.properties
 ### Load Balancer Instances 
   worker.tomcat1.type=ajp13
   worker.tomcat1.host=server1.domain.com
   worker.tomcat1.port=8009  #AJP Port
   worker.tomcat1.lbfactor=1

   worker.tomcat4.type=ajp13
   worker.tomcat4.host=server2.domain.com
   worker.tomcat4.port=8010#AJP Port
   worker.tomcat4.lbfactor=1


 ### Define Mount Points 

   # Load Balance #
   worker.loadbalancer.type=lb
   worker.loadbalancer.balance_workers=tomcat1,tomcat2
   worker.loadbalancer.sticky_session=False
   worker.loadbalancer.method=B

 ### Load Mount Points   
   worker.list=loadbalancer






 
 karthikn [EMAIL PROTECTED] 4/30/2008 10:57:51 PM 

   
 Hi

 As Per the Tomcat 5.5.23 Cluster HowTo Documents

 I have only tried to Cluster 2 TOMCATS on SAME Machine , Sharing same JVM.

   Could you provide your apache's worker.properties file?

 I have so far not used any APACHE Http Server for Load Balancing




 with regards
 Karthik





 Landon Fabbricino wrote:

 
 Could you provide your apache's worker.properties file?




   
 karthikn [EMAIL PROTECTED] 4/30/2008 8:05:02 AM 


 
 Hi

 Any more suggestions ?


 with regards
 Karthik

 karthikn wrote:


   
 Hi

  distributable/

 I have already added the same in my application's web.xml,
 but still no improvement.




 with regards
 Karthik



 Landon Fabbricino wrote:



 
 If I am not mistaken, you will need to add the following tag to your 
 web.xml

 CATALINA_HOME/webapps/your_app_name/WEB-INF/web.xml
   !-- Required for session-replication in clustering mode  --
   distributable/



 Landon Fabbricino
 IT Applications

 Phone: 403.225.7515
 Fax: 403.225.7604
 [EMAIL PROTECTED] 





   
 karthikn [EMAIL PROTECTED] 4/28/2008 11:34:43 PM 




 
 Hi

 The Following was done for the Clustering  (2 tomcats )

 Values  TOMCAT5523_ITOMCAT5523_II



 Startup 80818082
 ShutDown80078008



 APJ 80098010
 TCP Listener40014002
 tcpListenAddressautoauto
 jvmRoutenode01  node02



 Delpoyment of a war file on TOMCAT5523_I  displays in console as

INFO: Starting clustering manager at /DATAGRID
 Apr 29, 2008 10:17:59 AM
 org.apache.catalina.cluster.session.DeltaManager getAll
 ClusterSessions
 WARNING: Manager [/DATAGRID], requesting session state from
 org.apache.catalina.
 cluster.mcast.McastMember[tcp://10.10.16.63:4002,catalina,10.10.16.63,4002,
 aliv
 e=17593]. This operation will timeout if no session state has been
 received with
 in 60 seconds.
 Apr 29, 2008 10:18:59 AM
 org.apache.catalina.cluster.session.DeltaManager waitFo
 rSendAllSessions
 SEVERE: Manager [/DATAGRID]: No session state send at 4/29/08 10:17 AM
 received,
  timing out after 60,109 ms.


 TOMCAT5523_II displays on console as

  INFO: Replication member
 added:org.apache.catalina.cluster.mcast.McastMember[tcp
 ://10.10.16.63:4001,catalina,10.10.16.63,4001, alive=16]
 Apr 29, 2008 10:17:59 AM
 org.apache.catalina.cluster.session.ClusterSessionListe
 ner messageReceived
 SEVERE: Context manager doesn't exist:/DATAGRID


 Am i missing something while clustering

 with regards
 Karthik



 karthikn wrote:




   
 Hi

 I have few Questions which i was not able to get TOMCAT CLUSTERING HOWTO
 and 

Re: TOMCAT CLUSTERING HOWTO

2008-05-07 Thread karthikn

Hi

As per TOMCAT CLUSTERING HOWTO documents 


I am trying clustering on 2 TOMCAT 5.5.23  on WINDOWS OS sharing the same JVM 
1.6

with the parameters as below

   TC1  TC2 
Startup  80818082

ShutDown  80078008
APJ   80098010
TCP Listener  4001 4002
tcpListenAddress autoauto
jvmRoute node01  node02

Will this work ?



Somebody on the form said


deploy/undeploy your apps only to one server, and the cluster will

 distribute  the deployments/undeploy across the entire cluster.
 with  distributable/ in web.xml

This i was not working, How would one know the cluster is successfully.




Prerequisite : TOMCAT 5.5.23 (already in production ,we cannot change this 
version) 2 nos
JSDK   : 1.6
O/s : windows 2000



With regards
Karthik

a) Clustering

   1) Do we need to deploy the war files  on each individual Tomcat
when joined the clustering.
deploy your apps only to one server, and the cluster will
distribute  the deployments across the entire cluster.

This does not seems to work, after following the steps for 2
Tomcats (or am i missing some thing in here.)

   2) Is this a must do configuration

  Make sure that all nodes have the same time and sync with
NTP service! 

   for the clusters to start functioning.





Landon Fabbricino wrote:

Helly Karthikn,

I am confused as to where you are having problems?

I am not sure what you mean by How to test TOMCAT CLUSTERING with out Load 
balancer?

What exactly are you trying to do with your two tomcat machines?



Landon Fabbricino
IT Applications

Phone: 403.225.7515
Fax: 403.225.7604
[EMAIL PROTECTED]

  

karthikn [EMAIL PROTECTED] 5/6/2008 7:55:17 AM 


Hi

How to test TOMCAT CLUSTERING with out Load balancer

As Per the Tomcat 5.5.23 Cluster HowTo Documents

I have only tried to Cluster 2 TOMCATS on SAME Machine , Sharing same JVM.

but not able to SAMPLE TEST the clustering


Am i on doing some thing wrong in here.?



Please Some body suggest me  . :(

with regards
Karthik




karthikn wrote:
  

Hi

How to test TOMCAT CLUSTERING with out Load balancer

As Per the Tomcat 5.5.23 Cluster HowTo Documents

I have only tried to Cluster 2 TOMCATS on SAME Machine , Sharing same JVM.

but not able to test the clustering


Am i on doing some thing wrong in here.?




with regards
Karthik









Landon Fabbricino wrote:



I honestly have not tried clustering tomcat without Apache before.

Just recently I set up a server farm with apache on one server and tomcat on 
two other servers (so 3 physical machines)

Apache contains the logic to handle the load balancing between the two 
tomcats:

jk.conf
JkWorkersFile   conf/workers.properties
JkLogFile   logs/jk_conn.log
JkLogLevel  error

JkMount /loadbalance-test*  loadbalancer

workers.properties
### Load Balancer Instances 
  worker.tomcat1.type=ajp13
  worker.tomcat1.host=server1.domain.com
  worker.tomcat1.port=8009  #AJP Port
  worker.tomcat1.lbfactor=1

  worker.tomcat4.type=ajp13
  worker.tomcat4.host=server2.domain.com
  worker.tomcat4.port=8010#AJP Port
  worker.tomcat4.lbfactor=1


### Define Mount Points 

  # Load Balance #
  worker.loadbalancer.type=lb
  worker.loadbalancer.balance_workers=tomcat1,tomcat2
  worker.loadbalancer.sticky_session=False
  worker.loadbalancer.method=B

### Load Mount Points   
  worker.list=loadbalancer







  

karthikn [EMAIL PROTECTED] 4/30/2008 10:57:51 PM 




Hi

As Per the Tomcat 5.5.23 Cluster HowTo Documents

I have only tried to Cluster 2 TOMCATS on SAME Machine , Sharing same JVM.

  Could you provide your apache's worker.properties file?

I have so far not used any APACHE Http Server for Load Balancing




with regards
Karthik





Landon Fabbricino wrote:


  

Could you provide your apache's worker.properties file?







karthikn [EMAIL PROTECTED] 4/30/2008 8:05:02 AM 



  

Hi

Any more suggestions ?


with regards
Karthik

karthikn wrote:





Hi

 distributable/

I have already added the same in my application's web.xml,
but still no improvement.




with regards
Karthik



Landon Fabbricino wrote:




  

If I am not mistaken, you will need to add the following tag to your web.xml

CATALINA_HOME/webapps/your_app_name/WEB-INF/web.xml
  !-- Required for session-replication in clustering mode  --
  distributable/



Landon Fabbricino
IT Applications

Phone: 403.225.7515
Fax: 403.225.7604
[EMAIL PROTECTED]








karthikn [EMAIL PROTECTED] 4/28/2008 11:34:43 PM 





  

Hi

The Following was done for the Clustering  (2 tomcats )

Values  

Re: TOMCAT CLUSTERING HOWTO

2008-05-06 Thread karthikn

Hi

How to test TOMCAT CLUSTERING with out Load balancer

As Per the Tomcat 5.5.23 Cluster HowTo Documents

I have only tried to Cluster 2 TOMCATS on SAME Machine , Sharing same JVM.

but not able to SAMPLE TEST the clustering


Am i on doing some thing wrong in here.?



Please Some body suggest me  . :(

with regards
Karthik




karthikn wrote:

Hi

How to test TOMCAT CLUSTERING with out Load balancer

As Per the Tomcat 5.5.23 Cluster HowTo Documents

I have only tried to Cluster 2 TOMCATS on SAME Machine , Sharing same JVM.

but not able to test the clustering


Am i on doing some thing wrong in here.?




with regards
Karthik









Landon Fabbricino wrote:
  

I honestly have not tried clustering tomcat without Apache before.

Just recently I set up a server farm with apache on one server and tomcat on 
two other servers (so 3 physical machines)

Apache contains the logic to handle the load balancing between the two 
tomcats:

jk.conf
JkWorkersFile   conf/workers.properties
JkLogFile   logs/jk_conn.log
JkLogLevel  error

JkMount /loadbalance-test*  loadbalancer

workers.properties
### Load Balancer Instances 
  worker.tomcat1.type=ajp13
  worker.tomcat1.host=server1.domain.com
  worker.tomcat1.port=8009  #AJP Port
  worker.tomcat1.lbfactor=1

  worker.tomcat4.type=ajp13
  worker.tomcat4.host=server2.domain.com
  worker.tomcat4.port=8010#AJP Port
  worker.tomcat4.lbfactor=1


### Define Mount Points 

  # Load Balance #
  worker.loadbalancer.type=lb
  worker.loadbalancer.balance_workers=tomcat1,tomcat2
  worker.loadbalancer.sticky_session=False
  worker.loadbalancer.method=B

### Load Mount Points   
  worker.list=loadbalancer








karthikn [EMAIL PROTECTED] 4/30/2008 10:57:51 PM 

  

Hi

As Per the Tomcat 5.5.23 Cluster HowTo Documents

I have only tried to Cluster 2 TOMCATS on SAME Machine , Sharing same JVM.

  Could you provide your apache's worker.properties file?

I have so far not used any APACHE Http Server for Load Balancing




with regards
Karthik





Landon Fabbricino wrote:



Could you provide your apache's worker.properties file?




  

karthikn [EMAIL PROTECTED] 4/30/2008 8:05:02 AM 




Hi

Any more suggestions ?


with regards
Karthik

karthikn wrote:


  

Hi

 distributable/

I have already added the same in my application's web.xml,
but still no improvement.




with regards
Karthik



Landon Fabbricino wrote:





If I am not mistaken, you will need to add the following tag to your web.xml

CATALINA_HOME/webapps/your_app_name/WEB-INF/web.xml
  !-- Required for session-replication in clustering mode  --
  distributable/



Landon Fabbricino
IT Applications

Phone: 403.225.7515
Fax: 403.225.7604
[EMAIL PROTECTED]





  

karthikn [EMAIL PROTECTED] 4/28/2008 11:34:43 PM 






Hi

The Following was done for the Clustering  (2 tomcats )

Values  TOMCAT5523_ITOMCAT5523_II



Startup 80818082
ShutDown80078008



APJ 80098010
TCP Listener40014002
tcpListenAddressautoauto
jvmRoutenode01  node02



Delpoyment of a war file on TOMCAT5523_I  displays in console as

   INFO: Starting clustering manager at /DATAGRID
Apr 29, 2008 10:17:59 AM
org.apache.catalina.cluster.session.DeltaManager getAll
ClusterSessions
WARNING: Manager [/DATAGRID], requesting session state from
org.apache.catalina.
cluster.mcast.McastMember[tcp://10.10.16.63:4002,catalina,10.10.16.63,4002,
aliv
e=17593]. This operation will timeout if no session state has been
received with
in 60 seconds.
Apr 29, 2008 10:18:59 AM
org.apache.catalina.cluster.session.DeltaManager waitFo
rSendAllSessions
SEVERE: Manager [/DATAGRID]: No session state send at 4/29/08 10:17 AM
received,
 timing out after 60,109 ms.


TOMCAT5523_II displays on console as

 INFO: Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp
://10.10.16.63:4001,catalina,10.10.16.63,4001, alive=16]
Apr 29, 2008 10:17:59 AM
org.apache.catalina.cluster.session.ClusterSessionListe
ner messageReceived
SEVERE: Context manager doesn't exist:/DATAGRID


Am i missing something while clustering

with regards
Karthik



karthikn wrote:




  

Hi

I have few Questions which i was not able to get TOMCAT CLUSTERING HOWTO
and form.




a) Clustering

1) Do we need to deploy the war files  on each individual Tomcat
when joined the clustering.
   deploy your apps only to one server, and the cluster will
distribute  the deployments across the entire cluster.

This does not seems to work, after following the steps for 2
Tomcats (or am i missing some thing in here.)

2) Is this a must do configuration

  Make sure that all nodes have the same time and sync with
  

Re: TOMCAT CLUSTERING HOWTO

2008-05-05 Thread karthikn

Hi

How to test TOMCAT CLUSTERING with out Load balancer

As Per the Tomcat 5.5.23 Cluster HowTo Documents

I have only tried to Cluster 2 TOMCATS on SAME Machine , Sharing same JVM.

but not able to test the clustering


Am i on doing some thing wrong in here.?




with regards
Karthik









Landon Fabbricino wrote:

I honestly have not tried clustering tomcat without Apache before.

Just recently I set up a server farm with apache on one server and tomcat on 
two other servers (so 3 physical machines)

Apache contains the logic to handle the load balancing between the two 
tomcats:

jk.conf
JkWorkersFile   conf/workers.properties
JkLogFile   logs/jk_conn.log
JkLogLevel  error

JkMount /loadbalance-test*  loadbalancer

workers.properties
### Load Balancer Instances 
  worker.tomcat1.type=ajp13
  worker.tomcat1.host=server1.domain.com
  worker.tomcat1.port=8009  #AJP Port
  worker.tomcat1.lbfactor=1

  worker.tomcat4.type=ajp13
  worker.tomcat4.host=server2.domain.com
  worker.tomcat4.port=8010#AJP Port
  worker.tomcat4.lbfactor=1


### Define Mount Points 

  # Load Balance #
  worker.loadbalancer.type=lb
  worker.loadbalancer.balance_workers=tomcat1,tomcat2
  worker.loadbalancer.sticky_session=False
  worker.loadbalancer.method=B

### Load Mount Points   
  worker.list=loadbalancer





  

karthikn [EMAIL PROTECTED] 4/30/2008 10:57:51 PM 


Hi

As Per the Tomcat 5.5.23 Cluster HowTo Documents

I have only tried to Cluster 2 TOMCATS on SAME Machine , Sharing same JVM.

  Could you provide your apache's worker.properties file?

I have so far not used any APACHE Http Server for Load Balancing




with regards
Karthik





Landon Fabbricino wrote:
  

Could you provide your apache's worker.properties file?





karthikn [EMAIL PROTECTED] 4/30/2008 8:05:02 AM 

  

Hi

Any more suggestions ?


with regards
Karthik

karthikn wrote:



Hi

 distributable/

I have already added the same in my application's web.xml,
but still no improvement.




with regards
Karthik



Landon Fabbricino wrote:


  

If I am not mistaken, you will need to add the following tag to your web.xml

CATALINA_HOME/webapps/your_app_name/WEB-INF/web.xml
  !-- Required for session-replication in clustering mode  --
  distributable/



Landon Fabbricino
IT Applications

Phone: 403.225.7515
Fax: 403.225.7604
[EMAIL PROTECTED]






karthikn [EMAIL PROTECTED] 4/28/2008 11:34:43 PM 



  

Hi

The Following was done for the Clustering  (2 tomcats )

Values  TOMCAT5523_ITOMCAT5523_II



Startup 80818082
ShutDown80078008



APJ 80098010
TCP Listener40014002
tcpListenAddressautoauto
jvmRoutenode01  node02



Delpoyment of a war file on TOMCAT5523_I  displays in console as

   INFO: Starting clustering manager at /DATAGRID
Apr 29, 2008 10:17:59 AM
org.apache.catalina.cluster.session.DeltaManager getAll
ClusterSessions
WARNING: Manager [/DATAGRID], requesting session state from
org.apache.catalina.
cluster.mcast.McastMember[tcp://10.10.16.63:4002,catalina,10.10.16.63,4002,
aliv
e=17593]. This operation will timeout if no session state has been
received with
in 60 seconds.
Apr 29, 2008 10:18:59 AM
org.apache.catalina.cluster.session.DeltaManager waitFo
rSendAllSessions
SEVERE: Manager [/DATAGRID]: No session state send at 4/29/08 10:17 AM
received,
 timing out after 60,109 ms.


TOMCAT5523_II displays on console as

 INFO: Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp
://10.10.16.63:4001,catalina,10.10.16.63,4001, alive=16]
Apr 29, 2008 10:17:59 AM
org.apache.catalina.cluster.session.ClusterSessionListe
ner messageReceived
SEVERE: Context manager doesn't exist:/DATAGRID


Am i missing something while clustering

with regards
Karthik



karthikn wrote:





Hi

I have few Questions which i was not able to get TOMCAT CLUSTERING HOWTO
and form.




a) Clustering

1) Do we need to deploy the war files  on each individual Tomcat
when joined the clustering.
   deploy your apps only to one server, and the cluster will
distribute  the deployments across the entire cluster.

This does not seems to work, after following the steps for 2
Tomcats (or am i missing some thing in here.)

2) Is this a must do configuration

  Make sure that all nodes have the same time and sync with
NTP service! 

   for the clusters to start functioning.


b) Load balancing

 1) Using  Using the balancer webapp , redirects to different
URL's is done,
  Can we use the same to redirect to  the clustered TOMCATs to
do the load
balancing  internally based on


  RoundRobinRule,
  RandomRedirectRule



 Any URL or blog (other then 

Re: TOMCAT CLUSTERING HOWTO

2008-05-02 Thread karthikn

Hi

 Apache contains the logic to handle the load balancing between the 
two tomcats:


As per the Documents tomcat-docs/cluster-howto.html*

*I have only tried to achieve Clustering of 2 TOMCAT's on a single 
MACHINE, JVM


My Primary Objective was to check if the  war  deployed / undeployed
on 1st TOMCAT  would automatically be deployed / undeployed on the 2nd 
TOMCAT*



*I would only use Apache Http server to handle the Load balancing once 
the succeeded in Clustering



but this problem as stated below exists

**

Delpoyment of a war file on TOMCAT5523_I  displays in console as

  INFO: Starting clustering manager at /DATAGRID
Apr 29, 2008 10:17:59 AM
org.apache.catalina.cluster.session.DeltaManager getAll
ClusterSessions
WARNING: Manager [/DATAGRID], requesting session state from
org.apache.catalina.
cluster.mcast.McastMember[tcp://10.10.16.63:4002,catalina,10.10.16.63,4002,
aliv
e=17593]. This operation will timeout if no session state has been
received with
in 60 seconds.
Apr 29, 2008 10:18:59 AM
org.apache.catalina.cluster.session.DeltaManager waitFo
rSendAllSessions
SEVERE: Manager [/DATAGRID]: No session state send at 4/29/08 10:17 AM
received,
timing out after 60,109 ms.


TOMCAT5523_II displays on console as

INFO: Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp
://10.10.16.63:4001,catalina,10.10.16.63,4001, alive=16]
Apr 29, 2008 10:17:59 AM
org.apache.catalina.cluster.session.ClusterSessionListe
ner messageReceived
SEVERE: Context manager doesn't exist:/DATAGRID


*
*Any suggestions


with regards
KaRTHIK*
*






Landon Fabbricino wrote:

I honestly have not tried clustering tomcat without Apache before.

Just recently I set up a server farm with apache on one server and tomcat on 
two other servers (so 3 physical machines)

Apache contains the logic to handle the load balancing between the two 
tomcats:

jk.conf
JkWorkersFile   conf/workers.properties
JkLogFile   logs/jk_conn.log
JkLogLevel  error

JkMount /loadbalance-test*  loadbalancer

workers.properties
### Load Balancer Instances 
  worker.tomcat1.type=ajp13
  worker.tomcat1.host=server1.domain.com
  worker.tomcat1.port=8009  #AJP Port
  worker.tomcat1.lbfactor=1

  worker.tomcat4.type=ajp13
  worker.tomcat4.host=server2.domain.com
  worker.tomcat4.port=8010#AJP Port
  worker.tomcat4.lbfactor=1


### Define Mount Points 

  # Load Balance #
  worker.loadbalancer.type=lb
  worker.loadbalancer.balance_workers=tomcat1,tomcat2
  worker.loadbalancer.sticky_session=False
  worker.loadbalancer.method=B

### Load Mount Points   
  worker.list=loadbalancer





  

karthikn [EMAIL PROTECTED] 4/30/2008 10:57:51 PM 


Hi

As Per the Tomcat 5.5.23 Cluster HowTo Documents

I have only tried to Cluster 2 TOMCATS on SAME Machine , Sharing same JVM.

  Could you provide your apache's worker.properties file?

I have so far not used any APACHE Http Server for Load Balancing




with regards
Karthik





Landon Fabbricino wrote:
  

Could you provide your apache's worker.properties file?





karthikn [EMAIL PROTECTED] 4/30/2008 8:05:02 AM 

  

Hi

Any more suggestions ?


with regards
Karthik

karthikn wrote:



Hi

 distributable/

I have already added the same in my application's web.xml,
but still no improvement.




with regards
Karthik



Landon Fabbricino wrote:


  

If I am not mistaken, you will need to add the following tag to your web.xml

CATALINA_HOME/webapps/your_app_name/WEB-INF/web.xml
  !-- Required for session-replication in clustering mode  --
  distributable/



Landon Fabbricino
IT Applications

Phone: 403.225.7515
Fax: 403.225.7604
[EMAIL PROTECTED]






karthikn [EMAIL PROTECTED] 4/28/2008 11:34:43 PM 



  

Hi

The Following was done for the Clustering  (2 tomcats )

Values  TOMCAT5523_ITOMCAT5523_II



Startup 80818082
ShutDown80078008



APJ 80098010
TCP Listener40014002
tcpListenAddressautoauto
jvmRoutenode01  node02



Delpoyment of a war file on TOMCAT5523_I  displays in console as

   INFO: Starting clustering manager at /DATAGRID
Apr 29, 2008 10:17:59 AM
org.apache.catalina.cluster.session.DeltaManager getAll
ClusterSessions
WARNING: Manager [/DATAGRID], requesting session state from
org.apache.catalina.
cluster.mcast.McastMember[tcp://10.10.16.63:4002,catalina,10.10.16.63,4002,
aliv
e=17593]. This operation will timeout if no session state has been
received with
in 60 seconds.
Apr 29, 2008 10:18:59 AM
org.apache.catalina.cluster.session.DeltaManager waitFo
rSendAllSessions
SEVERE: Manager [/DATAGRID]: No session state send at 4/29/08 10:17 AM
received,
 timing out after 60,109 ms.


TOMCAT5523_II displays on console as

 INFO: Replication member

Re: TOMCAT CLUSTERING HOWTO

2008-05-01 Thread Landon Fabbricino
I honestly have not tried clustering tomcat without Apache before.

Just recently I set up a server farm with apache on one server and tomcat on 
two other servers (so 3 physical machines)

Apache contains the logic to handle the load balancing between the two 
tomcats:

jk.conf
JkWorkersFile   conf/workers.properties
JkLogFile   logs/jk_conn.log
JkLogLevel  error

JkMount /loadbalance-test*  loadbalancer

workers.properties
### Load Balancer Instances 
  worker.tomcat1.type=ajp13
  worker.tomcat1.host=server1.domain.com
  worker.tomcat1.port=8009  #AJP Port
  worker.tomcat1.lbfactor=1

  worker.tomcat4.type=ajp13
  worker.tomcat4.host=server2.domain.com
  worker.tomcat4.port=8010#AJP Port
  worker.tomcat4.lbfactor=1


### Define Mount Points 

  # Load Balance #
  worker.loadbalancer.type=lb
  worker.loadbalancer.balance_workers=tomcat1,tomcat2
  worker.loadbalancer.sticky_session=False
  worker.loadbalancer.method=B

### Load Mount Points   
  worker.list=loadbalancer





 karthikn [EMAIL PROTECTED] 4/30/2008 10:57:51 PM 
Hi

As Per the Tomcat 5.5.23 Cluster HowTo Documents

I have only tried to Cluster 2 TOMCATS on SAME Machine , Sharing same JVM.

  Could you provide your apache's worker.properties file?

I have so far not used any APACHE Http Server for Load Balancing




with regards
Karthik





Landon Fabbricino wrote:
 Could you provide your apache's worker.properties file?


   
 karthikn [EMAIL PROTECTED] 4/30/2008 8:05:02 AM 
 
 Hi

 Any more suggestions ?


 with regards
 Karthik

 karthikn wrote:
   
 Hi

  distributable/

 I have already added the same in my application's web.xml,
 but still no improvement.




 with regards
 Karthik



 Landon Fabbricino wrote:

 
 If I am not mistaken, you will need to add the following tag to your web.xml

 CATALINA_HOME/webapps/your_app_name/WEB-INF/web.xml
   !-- Required for session-replication in clustering mode  --
   distributable/



 Landon Fabbricino
 IT Applications

 Phone: 403.225.7515
 Fax: 403.225.7604
 [EMAIL PROTECTED] 



   
 karthikn [EMAIL PROTECTED] 4/28/2008 11:34:43 PM 


 
 Hi

 The Following was done for the Clustering  (2 tomcats )

 Values  TOMCAT5523_ITOMCAT5523_II



 Startup 80818082
 ShutDown80078008



 APJ 80098010
 TCP Listener40014002
 tcpListenAddressautoauto
 jvmRoutenode01  node02



 Delpoyment of a war file on TOMCAT5523_I  displays in console as

INFO: Starting clustering manager at /DATAGRID
 Apr 29, 2008 10:17:59 AM
 org.apache.catalina.cluster.session.DeltaManager getAll
 ClusterSessions
 WARNING: Manager [/DATAGRID], requesting session state from
 org.apache.catalina.
 cluster.mcast.McastMember[tcp://10.10.16.63:4002,catalina,10.10.16.63,4002,
 aliv
 e=17593]. This operation will timeout if no session state has been
 received with
 in 60 seconds.
 Apr 29, 2008 10:18:59 AM
 org.apache.catalina.cluster.session.DeltaManager waitFo
 rSendAllSessions
 SEVERE: Manager [/DATAGRID]: No session state send at 4/29/08 10:17 AM
 received,
  timing out after 60,109 ms.


 TOMCAT5523_II displays on console as

  INFO: Replication member
 added:org.apache.catalina.cluster.mcast.McastMember[tcp
 ://10.10.16.63:4001,catalina,10.10.16.63,4001, alive=16]
 Apr 29, 2008 10:17:59 AM
 org.apache.catalina.cluster.session.ClusterSessionListe
 ner messageReceived
 SEVERE: Context manager doesn't exist:/DATAGRID


 Am i missing something while clustering

 with regards
 Karthik



 karthikn wrote:


   
 Hi

 I have few Questions which i was not able to get TOMCAT CLUSTERING HOWTO
 and form.




 a) Clustering

 1) Do we need to deploy the war files  on each individual Tomcat
 when joined the clustering.
deploy your apps only to one server, and the cluster will
 distribute  the deployments across the entire cluster.

 This does not seems to work, after following the steps for 2
 Tomcats (or am i missing some thing in here.)

 2) Is this a must do configuration

   Make sure that all nodes have the same time and sync with
 NTP service! 

for the clusters to start functioning.


 b) Load balancing

  1) Using  Using the balancer webapp , redirects to different
 URL's is done,
   Can we use the same to redirect to  the clustered TOMCATs to
 do the load
 balancing  internally based on


   RoundRobinRule,
   RandomRedirectRule



  Any URL or blog (other then cluster-howto.html)
  which explains the clustering /load balancing in simple steps would be
 of wery much help to us.



 Prerequisite : TOMCAT 5.5.23 (already in production ,we cannot change
 this version) 2 nos
 JSDK  : 1.6
 O/s: UNIX 11


 with regards
 Karthik

 

Re: TOMCAT CLUSTERING HOWTO

2008-04-30 Thread karthikn

Hi

distributable/

I have already added the same in my application's web.xml,
but still no improvement.




with regards
Karthik



Landon Fabbricino wrote:

If I am not mistaken, you will need to add the following tag to your web.xml

CATALINA_HOME/webapps/your_app_name/WEB-INF/web.xml
  !-- Required for session-replication in clustering mode  --
  distributable/



Landon Fabbricino
IT Applications

Phone: 403.225.7515
Fax: 403.225.7604
[EMAIL PROTECTED]

  

karthikn [EMAIL PROTECTED] 4/28/2008 11:34:43 PM 


Hi

The Following was done for the Clustering  (2 tomcats )

Values  TOMCAT5523_ITOMCAT5523_II



Startup 80818082
ShutDown80078008



APJ 80098010
TCP Listener40014002
tcpListenAddressautoauto
jvmRoutenode01  node02



Delpoyment of a war file on TOMCAT5523_I  displays in console as

   INFO: Starting clustering manager at /DATAGRID
Apr 29, 2008 10:17:59 AM
org.apache.catalina.cluster.session.DeltaManager getAll
ClusterSessions
WARNING: Manager [/DATAGRID], requesting session state from
org.apache.catalina.
cluster.mcast.McastMember[tcp://10.10.16.63:4002,catalina,10.10.16.63,4002,
aliv
e=17593]. This operation will timeout if no session state has been
received with
in 60 seconds.
Apr 29, 2008 10:18:59 AM
org.apache.catalina.cluster.session.DeltaManager waitFo
rSendAllSessions
SEVERE: Manager [/DATAGRID]: No session state send at 4/29/08 10:17 AM
received,
 timing out after 60,109 ms.


TOMCAT5523_II displays on console as

 INFO: Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp
://10.10.16.63:4001,catalina,10.10.16.63,4001, alive=16]
Apr 29, 2008 10:17:59 AM
org.apache.catalina.cluster.session.ClusterSessionListe
ner messageReceived
SEVERE: Context manager doesn't exist:/DATAGRID


Am i missing something while clustering

with regards
Karthik



karthikn wrote:
  

Hi

I have few Questions which i was not able to get TOMCAT CLUSTERING HOWTO
and form.




a) Clustering

1) Do we need to deploy the war files  on each individual Tomcat
when joined the clustering.
   deploy your apps only to one server, and the cluster will
distribute  the deployments across the entire cluster.

This does not seems to work, after following the steps for 2
Tomcats (or am i missing some thing in here.)

2) Is this a must do configuration

  Make sure that all nodes have the same time and sync with
NTP service! 

   for the clusters to start functioning.


b) Load balancing

 1) Using  Using the balancer webapp , redirects to different
URL's is done,
  Can we use the same to redirect to  the clustered TOMCATs to
do the load
balancing  internally based on


  RoundRobinRule,
  RandomRedirectRule



 Any URL or blog (other then cluster-howto.html)
 which explains the clustering /load balancing in simple steps would be
of wery much help to us.



Prerequisite : TOMCAT 5.5.23 (already in production ,we cannot change
this version) 2 nos
JSDK  : 1.6
O/s: UNIX 11


with regards
Karthik

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

.






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


IMPORTANT NOTICE !
This E-Mail transmission and any accompanying attachments may contain 
confidential information intended only for the use of the individual or entity 
named above. Any dissemination, distribution, copying or action taken in 
reliance on the contents of this E-Mail by anyone other than the intended 
recipient is strictly prohibited and is not intended to, in anyway, waive 
privilege or confidentiality. If you have received this E-Mail in error please 
immediately delete it and notify sender at the above E-Mail address.
Agrium uses state of the art anti-virus technology on all incoming and outgoing 
E-Mail. We encourage and promote the use of safe E-Mail management practices 
and recommend you check this, and all other E-Mail and attachments you receive 
for the presence of viruses. The sender and Agrium accept no liability for any 
damage caused by a virus or otherwise by the transmittal of this E-Mail.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

.

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TOMCAT CLUSTERING HOWTO

2008-04-30 Thread karthikn

Hi

Any more suggestions ?


with regards
Karthik

karthikn wrote:

Hi

 distributable/

I have already added the same in my application's web.xml,
but still no improvement.




with regards
Karthik



Landon Fabbricino wrote:
  

If I am not mistaken, you will need to add the following tag to your web.xml

CATALINA_HOME/webapps/your_app_name/WEB-INF/web.xml
  !-- Required for session-replication in clustering mode  --
  distributable/



Landon Fabbricino
IT Applications

Phone: 403.225.7515
Fax: 403.225.7604
[EMAIL PROTECTED]




karthikn [EMAIL PROTECTED] 4/28/2008 11:34:43 PM 

  

Hi

The Following was done for the Clustering  (2 tomcats )

Values  TOMCAT5523_ITOMCAT5523_II



Startup 80818082
ShutDown80078008



APJ 80098010
TCP Listener40014002
tcpListenAddressautoauto
jvmRoutenode01  node02



Delpoyment of a war file on TOMCAT5523_I  displays in console as

   INFO: Starting clustering manager at /DATAGRID
Apr 29, 2008 10:17:59 AM
org.apache.catalina.cluster.session.DeltaManager getAll
ClusterSessions
WARNING: Manager [/DATAGRID], requesting session state from
org.apache.catalina.
cluster.mcast.McastMember[tcp://10.10.16.63:4002,catalina,10.10.16.63,4002,
aliv
e=17593]. This operation will timeout if no session state has been
received with
in 60 seconds.
Apr 29, 2008 10:18:59 AM
org.apache.catalina.cluster.session.DeltaManager waitFo
rSendAllSessions
SEVERE: Manager [/DATAGRID]: No session state send at 4/29/08 10:17 AM
received,
 timing out after 60,109 ms.


TOMCAT5523_II displays on console as

 INFO: Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp
://10.10.16.63:4001,catalina,10.10.16.63,4001, alive=16]
Apr 29, 2008 10:17:59 AM
org.apache.catalina.cluster.session.ClusterSessionListe
ner messageReceived
SEVERE: Context manager doesn't exist:/DATAGRID


Am i missing something while clustering

with regards
Karthik



karthikn wrote:



Hi

I have few Questions which i was not able to get TOMCAT CLUSTERING HOWTO
and form.




a) Clustering

1) Do we need to deploy the war files  on each individual Tomcat
when joined the clustering.
   deploy your apps only to one server, and the cluster will
distribute  the deployments across the entire cluster.

This does not seems to work, after following the steps for 2
Tomcats (or am i missing some thing in here.)

2) Is this a must do configuration

  Make sure that all nodes have the same time and sync with
NTP service! 

   for the clusters to start functioning.


b) Load balancing

 1) Using  Using the balancer webapp , redirects to different
URL's is done,
  Can we use the same to redirect to  the clustered TOMCATs to
do the load
balancing  internally based on


  RoundRobinRule,
  RandomRedirectRule



 Any URL or blog (other then cluster-howto.html)
 which explains the clustering /load balancing in simple steps would be
of wery much help to us.



Prerequisite : TOMCAT 5.5.23 (already in production ,we cannot change
this version) 2 nos
JSDK  : 1.6
O/s: UNIX 11


with regards
Karthik

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

.



  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


IMPORTANT NOTICE !
This E-Mail transmission and any accompanying attachments may contain 
confidential information intended only for the use of the individual or entity 
named above. Any dissemination, distribution, copying or action taken in 
reliance on the contents of this E-Mail by anyone other than the intended 
recipient is strictly prohibited and is not intended to, in anyway, waive 
privilege or confidentiality. If you have received this E-Mail in error please 
immediately delete it and notify sender at the above E-Mail address.
Agrium uses state of the art anti-virus technology on all incoming and outgoing 
E-Mail. We encourage and promote the use of safe E-Mail management practices 
and recommend you check this, and all other E-Mail and attachments you receive 
for the presence of viruses. The sender and Agrium accept no liability for any 
damage caused by a virus or otherwise by the transmittal of this E-Mail.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

.






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For 

Re: TOMCAT CLUSTERING HOWTO

2008-04-30 Thread Landon Fabbricino
Could you provide your apache's worker.properties file?


 karthikn [EMAIL PROTECTED] 4/30/2008 8:05:02 AM 
Hi

Any more suggestions ?


with regards
Karthik

karthikn wrote:
 Hi

  distributable/

 I have already added the same in my application's web.xml,
 but still no improvement.




 with regards
 Karthik



 Landon Fabbricino wrote:
   
 If I am not mistaken, you will need to add the following tag to your web.xml

 CATALINA_HOME/webapps/your_app_name/WEB-INF/web.xml
   !-- Required for session-replication in clustering mode  --
   distributable/



 Landon Fabbricino
 IT Applications

 Phone: 403.225.7515
 Fax: 403.225.7604
 [EMAIL PROTECTED] 


 
 karthikn [EMAIL PROTECTED] 4/28/2008 11:34:43 PM 

   
 Hi

 The Following was done for the Clustering  (2 tomcats )

 Values  TOMCAT5523_ITOMCAT5523_II



 Startup 80818082
 ShutDown80078008



 APJ 80098010
 TCP Listener40014002
 tcpListenAddressautoauto
 jvmRoutenode01  node02



 Delpoyment of a war file on TOMCAT5523_I  displays in console as

INFO: Starting clustering manager at /DATAGRID
 Apr 29, 2008 10:17:59 AM
 org.apache.catalina.cluster.session.DeltaManager getAll
 ClusterSessions
 WARNING: Manager [/DATAGRID], requesting session state from
 org.apache.catalina.
 cluster.mcast.McastMember[tcp://10.10.16.63:4002,catalina,10.10.16.63,4002,
 aliv
 e=17593]. This operation will timeout if no session state has been
 received with
 in 60 seconds.
 Apr 29, 2008 10:18:59 AM
 org.apache.catalina.cluster.session.DeltaManager waitFo
 rSendAllSessions
 SEVERE: Manager [/DATAGRID]: No session state send at 4/29/08 10:17 AM
 received,
  timing out after 60,109 ms.


 TOMCAT5523_II displays on console as

  INFO: Replication member
 added:org.apache.catalina.cluster.mcast.McastMember[tcp
 ://10.10.16.63:4001,catalina,10.10.16.63,4001, alive=16]
 Apr 29, 2008 10:17:59 AM
 org.apache.catalina.cluster.session.ClusterSessionListe
 ner messageReceived
 SEVERE: Context manager doesn't exist:/DATAGRID


 Am i missing something while clustering

 with regards
 Karthik



 karthikn wrote:

 
 Hi

 I have few Questions which i was not able to get TOMCAT CLUSTERING HOWTO
 and form.




 a) Clustering

 1) Do we need to deploy the war files  on each individual Tomcat
 when joined the clustering.
deploy your apps only to one server, and the cluster will
 distribute  the deployments across the entire cluster.

 This does not seems to work, after following the steps for 2
 Tomcats (or am i missing some thing in here.)

 2) Is this a must do configuration

   Make sure that all nodes have the same time and sync with
 NTP service! 

for the clusters to start functioning.


 b) Load balancing

  1) Using  Using the balancer webapp , redirects to different
 URL's is done,
   Can we use the same to redirect to  the clustered TOMCATs to
 do the load
 balancing  internally based on


   RoundRobinRule,
   RandomRedirectRule



  Any URL or blog (other then cluster-howto.html)
  which explains the clustering /load balancing in simple steps would be
 of wery much help to us.



 Prerequisite : TOMCAT 5.5.23 (already in production ,we cannot change
 this version) 2 nos
 JSDK  : 1.6
 O/s: UNIX 11


 with regards
 Karthik

 -
 To start a new topic, e-mail: users@tomcat.apache.org 
 To unsubscribe, e-mail: [EMAIL PROTECTED] 
 For additional commands, e-mail: [EMAIL PROTECTED] 

 .



   
 -
 To start a new topic, e-mail: users@tomcat.apache.org 
 To unsubscribe, e-mail: [EMAIL PROTECTED] 
 For additional commands, e-mail: [EMAIL PROTECTED] 


 IMPORTANT NOTICE !
 This E-Mail transmission and any accompanying attachments may contain 
 confidential information intended only for the use of the individual or 
 entity named above. Any dissemination, distribution, copying or action taken 
 in reliance on the contents of this E-Mail by anyone other than the intended 
 recipient is strictly prohibited and is not intended to, in anyway, waive 
 privilege or confidentiality. If you have received this E-Mail in error 
 please immediately delete it and notify sender at the above E-Mail address.
 Agrium uses state of the art anti-virus technology on all incoming and 
 outgoing E-Mail. We encourage and promote the use of safe E-Mail management 
 practices and recommend you check this, and all other E-Mail and attachments 
 you receive for the presence of viruses. The sender and Agrium accept no 
 liability for any damage caused by a virus or otherwise by the transmittal 
 of this E-Mail.


 -
 To start a new topic, e-mail: users@tomcat.apache.org 
 To unsubscribe, e-mail: [EMAIL PROTECTED] 
 For 

Re: TOMCAT CLUSTERING HOWTO

2008-04-30 Thread karthikn

Hi

As Per the Tomcat 5.5.23 Cluster HowTo Documents

I have only tried to Cluster 2 TOMCATS on SAME Machine , Sharing same JVM.

 Could you provide your apache's worker.properties file?

I have so far not used any APACHE Http Server for Load Balancing




with regards
Karthik





Landon Fabbricino wrote:

Could you provide your apache's worker.properties file?


  

karthikn [EMAIL PROTECTED] 4/30/2008 8:05:02 AM 


Hi

Any more suggestions ?


with regards
Karthik

karthikn wrote:
  

Hi

 distributable/

I have already added the same in my application's web.xml,
but still no improvement.




with regards
Karthik



Landon Fabbricino wrote:



If I am not mistaken, you will need to add the following tag to your web.xml

CATALINA_HOME/webapps/your_app_name/WEB-INF/web.xml
  !-- Required for session-replication in clustering mode  --
  distributable/



Landon Fabbricino
IT Applications

Phone: 403.225.7515
Fax: 403.225.7604
[EMAIL PROTECTED]



  

karthikn [EMAIL PROTECTED] 4/28/2008 11:34:43 PM 




Hi

The Following was done for the Clustering  (2 tomcats )

Values  TOMCAT5523_ITOMCAT5523_II



Startup 80818082
ShutDown80078008



APJ 80098010
TCP Listener40014002
tcpListenAddressautoauto
jvmRoutenode01  node02



Delpoyment of a war file on TOMCAT5523_I  displays in console as

   INFO: Starting clustering manager at /DATAGRID
Apr 29, 2008 10:17:59 AM
org.apache.catalina.cluster.session.DeltaManager getAll
ClusterSessions
WARNING: Manager [/DATAGRID], requesting session state from
org.apache.catalina.
cluster.mcast.McastMember[tcp://10.10.16.63:4002,catalina,10.10.16.63,4002,
aliv
e=17593]. This operation will timeout if no session state has been
received with
in 60 seconds.
Apr 29, 2008 10:18:59 AM
org.apache.catalina.cluster.session.DeltaManager waitFo
rSendAllSessions
SEVERE: Manager [/DATAGRID]: No session state send at 4/29/08 10:17 AM
received,
 timing out after 60,109 ms.


TOMCAT5523_II displays on console as

 INFO: Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp
://10.10.16.63:4001,catalina,10.10.16.63,4001, alive=16]
Apr 29, 2008 10:17:59 AM
org.apache.catalina.cluster.session.ClusterSessionListe
ner messageReceived
SEVERE: Context manager doesn't exist:/DATAGRID


Am i missing something while clustering

with regards
Karthik



karthikn wrote:


  

Hi

I have few Questions which i was not able to get TOMCAT CLUSTERING HOWTO
and form.




a) Clustering

1) Do we need to deploy the war files  on each individual Tomcat
when joined the clustering.
   deploy your apps only to one server, and the cluster will
distribute  the deployments across the entire cluster.

This does not seems to work, after following the steps for 2
Tomcats (or am i missing some thing in here.)

2) Is this a must do configuration

  Make sure that all nodes have the same time and sync with
NTP service! 

   for the clusters to start functioning.


b) Load balancing

 1) Using  Using the balancer webapp , redirects to different
URL's is done,
  Can we use the same to redirect to  the clustered TOMCATs to
do the load
balancing  internally based on


  RoundRobinRule,
  RandomRedirectRule



 Any URL or blog (other then cluster-howto.html)
 which explains the clustering /load balancing in simple steps would be
of wery much help to us.



Prerequisite : TOMCAT 5.5.23 (already in production ,we cannot change
this version) 2 nos
JSDK  : 1.6
O/s: UNIX 11


with regards
Karthik

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

.






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


IMPORTANT NOTICE !
This E-Mail transmission and any accompanying attachments may contain 
confidential information intended only for the use of the individual or entity 
named above. Any dissemination, distribution, copying or action taken in 
reliance on the contents of this E-Mail by anyone other than the intended 
recipient is strictly prohibited and is not intended to, in anyway, waive 
privilege or confidentiality. If you have received this E-Mail in error please 
immediately delete it and notify sender at the above E-Mail address.
Agrium uses state of the art anti-virus technology on all incoming and outgoing 
E-Mail. We encourage and promote the use of safe E-Mail management practices 
and recommend you check this, and all other E-Mail and attachments you receive 
for the presence of viruses. The sender and Agrium accept no liability for any 
damage caused by a virus or 

Re: TOMCAT CLUSTERING HOWTO

2008-04-29 Thread Landon Fabbricino
If I am not mistaken, you will need to add the following tag to your web.xml

CATALINA_HOME/webapps/your_app_name/WEB-INF/web.xml
  !-- Required for session-replication in clustering mode  --
  distributable/



Landon Fabbricino
IT Applications

Phone: 403.225.7515
Fax: 403.225.7604
[EMAIL PROTECTED]

 karthikn [EMAIL PROTECTED] 4/28/2008 11:34:43 PM 
Hi

The Following was done for the Clustering  (2 tomcats )

Values  TOMCAT5523_ITOMCAT5523_II



Startup 80818082
ShutDown80078008



APJ 80098010
TCP Listener40014002
tcpListenAddressautoauto
jvmRoutenode01  node02



Delpoyment of a war file on TOMCAT5523_I  displays in console as

   INFO: Starting clustering manager at /DATAGRID
Apr 29, 2008 10:17:59 AM 
org.apache.catalina.cluster.session.DeltaManager getAll
ClusterSessions
WARNING: Manager [/DATAGRID], requesting session state from 
org.apache.catalina.
cluster.mcast.McastMember[tcp://10.10.16.63:4002,catalina,10.10.16.63,4002, 
aliv
e=17593]. This operation will timeout if no session state has been 
received with
in 60 seconds.
Apr 29, 2008 10:18:59 AM 
org.apache.catalina.cluster.session.DeltaManager waitFo
rSendAllSessions
SEVERE: Manager [/DATAGRID]: No session state send at 4/29/08 10:17 AM 
received,
 timing out after 60,109 ms.


TOMCAT5523_II displays on console as

 INFO: Replication member 
added:org.apache.catalina.cluster.mcast.McastMember[tcp
://10.10.16.63:4001,catalina,10.10.16.63,4001, alive=16]
Apr 29, 2008 10:17:59 AM 
org.apache.catalina.cluster.session.ClusterSessionListe
ner messageReceived
SEVERE: Context manager doesn't exist:/DATAGRID


Am i missing something while clustering

with regards
Karthik



karthikn wrote:
 Hi

 I have few Questions which i was not able to get TOMCAT CLUSTERING HOWTO
 and form.




 a) Clustering

 1) Do we need to deploy the war files  on each individual Tomcat
 when joined the clustering.
deploy your apps only to one server, and the cluster will
 distribute  the deployments across the entire cluster.

 This does not seems to work, after following the steps for 2
 Tomcats (or am i missing some thing in here.)

 2) Is this a must do configuration

   Make sure that all nodes have the same time and sync with
 NTP service! 

for the clusters to start functioning.


 b) Load balancing

  1) Using  Using the balancer webapp , redirects to different
 URL's is done,
   Can we use the same to redirect to  the clustered TOMCATs to
 do the load
 balancing  internally based on


   RoundRobinRule,
   RandomRedirectRule



  Any URL or blog (other then cluster-howto.html)
  which explains the clustering /load balancing in simple steps would be
 of wery much help to us.



 Prerequisite : TOMCAT 5.5.23 (already in production ,we cannot change
 this version) 2 nos
 JSDK  : 1.6
 O/s: UNIX 11


 with regards
 Karthik

 -
 To start a new topic, e-mail: users@tomcat.apache.org 
 To unsubscribe, e-mail: [EMAIL PROTECTED] 
 For additional commands, e-mail: [EMAIL PROTECTED] 

 .

   


-
To start a new topic, e-mail: users@tomcat.apache.org 
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 


IMPORTANT NOTICE ! 
This E-Mail transmission and any accompanying attachments may contain 
confidential information intended only for the use of the individual or entity 
named above. Any dissemination, distribution, copying or action taken in 
reliance on the contents of this E-Mail by anyone other than the intended 
recipient is strictly prohibited and is not intended to, in anyway, waive 
privilege or confidentiality. If you have received this E-Mail in error please 
immediately delete it and notify sender at the above E-Mail address.  
Agrium uses state of the art anti-virus technology on all incoming and outgoing 
E-Mail. We encourage and promote the use of safe E-Mail management practices 
and recommend you check this, and all other E-Mail and attachments you receive 
for the presence of viruses. The sender and Agrium accept no liability for any 
damage caused by a virus or otherwise by the transmittal of this E-Mail. 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TOMCAT CLUSTERING HOWTO

2008-04-28 Thread karthikn

Hi

Somebody Please Help me with this form




with regards
Karthik



karthikn wrote:

Hi

I have few Questions which i was not able to get TOMCAT CLUSTERING HOWTO
and form.




a) Clustering

1) Do we need to deploy the war files  on each individual Tomcat
when joined the clustering.
   deploy your apps only to one server, and the cluster will
distribute  the deployments across the entire cluster.

This does not seems to work, after following the steps for 2
Tomcats (or am i missing some thing in here.)

2) Is this a must do configuration

  Make sure that all nodes have the same time and sync with
NTP service! 

   for the clusters to start functioning.


b) Load balancing

 1) Using  Using the balancer webapp , redirects to different
URL's is done,
  Can we use the same to redirect to  the clustered TOMCATs to
do the load
balancing  internally based on


  RoundRobinRule,
  RandomRedirectRule



 Any URL or blog (other then cluster-howto.html)
 which explains the clustering /load balancing in simple steps would be
of wery much help to us.



Prerequisite : TOMCAT 5.5.23 (already in production ,we cannot change
this version) 2 nos
JSDK  : 1.6
O/s: UNIX 11


with regards
Karthik

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

.

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TOMCAT CLUSTERING HOWTO

2008-04-28 Thread Mark Thomas

karthikn wrote:

Hi

Somebody Please Help me with this form


http://wiki.apache.org/tomcat/FAQ/Tomcat_User#Q2

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TOMCAT CLUSTERING HOWTO

2008-04-28 Thread karthikn

Hi

The Following was done for the Clustering  (2 tomcats )

Values  TOMCAT5523_ITOMCAT5523_II



Startup 80818082
ShutDown80078008



APJ 80098010
TCP Listener40014002
tcpListenAddressautoauto
jvmRoutenode01  node02



Delpoyment of a war file on TOMCAT5523_I  displays in console as

  INFO: Starting clustering manager at /DATAGRID
Apr 29, 2008 10:17:59 AM 
org.apache.catalina.cluster.session.DeltaManager getAll

ClusterSessions
WARNING: Manager [/DATAGRID], requesting session state from 
org.apache.catalina.
cluster.mcast.McastMember[tcp://10.10.16.63:4002,catalina,10.10.16.63,4002, 
aliv
e=17593]. This operation will timeout if no session state has been 
received with

in 60 seconds.
Apr 29, 2008 10:18:59 AM 
org.apache.catalina.cluster.session.DeltaManager waitFo

rSendAllSessions
SEVERE: Manager [/DATAGRID]: No session state send at 4/29/08 10:17 AM 
received,

timing out after 60,109 ms.


TOMCAT5523_II displays on console as

INFO: Replication member 
added:org.apache.catalina.cluster.mcast.McastMember[tcp

://10.10.16.63:4001,catalina,10.10.16.63,4001, alive=16]
Apr 29, 2008 10:17:59 AM 
org.apache.catalina.cluster.session.ClusterSessionListe

ner messageReceived
SEVERE: Context manager doesn't exist:/DATAGRID


Am i missing something while clustering

with regards
Karthik



karthikn wrote:

Hi

I have few Questions which i was not able to get TOMCAT CLUSTERING HOWTO
and form.




a) Clustering

1) Do we need to deploy the war files  on each individual Tomcat
when joined the clustering.
   deploy your apps only to one server, and the cluster will
distribute  the deployments across the entire cluster.

This does not seems to work, after following the steps for 2
Tomcats (or am i missing some thing in here.)

2) Is this a must do configuration

  Make sure that all nodes have the same time and sync with
NTP service! 

   for the clusters to start functioning.


b) Load balancing

 1) Using  Using the balancer webapp , redirects to different
URL's is done,
  Can we use the same to redirect to  the clustered TOMCATs to
do the load
balancing  internally based on


  RoundRobinRule,
  RandomRedirectRule



 Any URL or blog (other then cluster-howto.html)
 which explains the clustering /load balancing in simple steps would be
of wery much help to us.



Prerequisite : TOMCAT 5.5.23 (already in production ,we cannot change
this version) 2 nos
JSDK  : 1.6
O/s: UNIX 11


with regards
Karthik

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

.

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: TOMCAT CLUSTERING ONJAVA

2008-04-21 Thread Caldarale, Charles R
 From: karthikn [mailto:[EMAIL PROTECTED] 
 Subject: TOMCAT CLUSTERING ONJAVA
 
 Reffered to URL 
 http://www.onjava.com/pub/a/onjava/2004/04/14/clustering.html?page=1;
 
 The Load balancing  using Cluster Techique for 3+ TC's,

Rather than looking at doc that's over four years old (and was sadly out
of date even then), why don't you use the real Tomcat documentation?
http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >