Ok I need some info here.
I've been trying to use the HttpServletRequest.getRequestURL in tomcat 5
to return the user's original URL. I need to extract the scheme, port,
servername that the client used on his side.
From the specs, that method should do it. I first tried getServerName
and
For the basic on loadbalancing and architecture check out this article
from Filip:
http://www.theserverside.com/articles/article.jsp?l=Tomcat
It's nicely done. A little out of date as for the tomcat configuration.
Since tc 5.x has a whole new clustering engine.
But it should be good enough for
As of now I don' think the Tomcat clustering code of Filip supports any
of what you ask. The only thing replicated is the session and the date
within.
The principal is not replicated as of yet. (I think Filip is working on
that)
You will have to find another centralized spot to store those
Just installed the tomcat 5.0.16 with cvs for clustering on my 2nd
server cluster.
The first one is running pretty well without any bug whatsoever. But
that new cluster seams to have some problem with the replication with
it`s going a specific way.
From web1 to web2 it works fine. but if I hit
Ok I really have no idea why this ain't working.
Same clustering version on both cluster. The first one works A1.. the
second invalidates all my sessions
Only difference between the two clusters are that the 2nd one is a
multi-ip server (3 adresses on the same eth). But the hostname is
YOU'RE KIDDING ME!
sorry for the caps but I just lost a day of work for a stupid server out
of time! :P
Thanks btw!
Jean-Philippe Bélanger
CGI
Apu Shah wrote:
check the dates on both machines. i think (filip please clarify if i'm
wrong) if one machine is out of sync with the other by an
Ok here is what is going on.
Seams like the problem is not with the tomcat replication but with the
damned JK balancer. :(
When the 2nd tomcat node is shutdown, the balancer resend all the
request pending to the other node. (BUT, without the parameter.)
I sent 50 request to each node (or so)
Already ahead of you on this one! :) Pen is great indeed.
I kinda love the load-balancing AND failover feature that
balance.sourceforge doesn`t have.
Jean-Philippe Bélanger
CGI
Filip Hanik wrote:
I just either http://siag.nu/pen/ (my favorite, works on both windows and
unix)
or balance
Still checking to make sure it ain't on my side (MVC or such)
Jean-Philippe Bélanger
CGI
Filip Hanik wrote:
interesting, never seen that, let me take a look. I have an automated test
that I run to check replication integrity.
since you get this everytime, it shouldn't be a problem for me to do
And your reply is better?
I'm trying to get that replication thing working with Filip. If there is
something imcompatible with his code that make this behavior happens. I
will try and find it before giving him the job. He's not the only one
that has to work with this. I'm offering my help. I'm
Well then... Sorry about misunderstanding.
I'll try to remove my thousand of quotes now! :P and keep only the last one
Jean-Philippe Bélanger
CGI
Ralph Einfeldt wrote:
He didn't critique that you posted, just how.
He doesn't like posts with quotes that are not
needed. (That's the attitude of
I've tried to replicate the problem with a simple servlet. outside of
our MVC architecture (controller). and seams like I can't.
I've put traces in our controller on the doPost method writing the
request parameter to the console.
When the 2nd node is shutdown, they request params become nulls!
That's the catch. Everything is A ok. no error what soever before I get
a null params.
Would an invalidated request still had the getRemoteAddr() and
getRequestURI() set?
And if so... how can I know if a REQUEST gets invalidated??
Jean-Philippe Bélanger
CGI
Filip Hanik wrote:
hmm, could it
I think the jsp cache can do the trick of you set it off
check the jsp directive
Jean-Philippe Bélanger
CGI
Rogerio Baldini das Neves wrote:
Hi,
I have a problem that's getting me crazy.
A code in jsp file like this:
**
*%
for(int i=0; i10; i++)
{
out.println(i:+i+br);
Thread.sleep(1000);
sorry... I kinda forgot the right directive and param. it's @page
buffer=none%
Jean-Philippe Bélanger
CGI
Rogerio Baldini das Neves wrote:
Hi,
I have a problem that's getting me crazy.
A code in jsp file like this:
**
*%
for(int i=0; i10; i++)
{
out.println(i:+i+br);
Thread.sleep(1000);
Use the magic word include! :)
something like [EMAIL PROTECTED] file=defaults.jsp% in each of your pages.
Then you just have one place to put it. But I don't know if there is a
way to set it at the Jasper level.
Jean-Philippe Bélanger
CGI
Rogerio Baldini das Neves wrote:
Thanks Jean-Philippe,
That sounds good.
I'll get the CVS head and check this out. We won't really put much
stress on those server for a while, but as long as the behavior is the
same. I buy! :)
btw: is there a pool config or is it hardcoded for now?
Thanks again Filip.
Jean-Philippe Belanger
Filip Hanik wrote
You can either use the dirtyFlag=false to automaticly replicate the
WHOLE session after each access.
Or if the dirtyFlag is true, only if at least one setAttribute (or
removeAttribute) was done on the session that it will get replicated.
use whichever is the easiest and more flexible for you
Been working on testing the new modules and came across something weird.
Wondering if you got any idea on the cause/problem while I continue
investigating
Scenario:
- one web page login in a user. receive 3 parameters (user, password and
community)
- To be able to replicate the problem I had to
I understand that. Here more info...
I make a servlet request that does this:
while ( i 25 ) {
if ( request.getParameters(xxx) == null ) {
System.out.println(param is null);
}
Thread.currentThread().sleep(1000);
i++
}
I then send a couple of request with param xxx=123 at 1 secs
Hurray for Fillip! :)
I'll get the CVS head for the module today and test this out.
Happy to see that it got fixed that quickly!
Thanks again and I'll let you know how it goes
Jean-Philippe
Filip Hanik wrote:
Jean-Philippe and Steve,
I fixed the bug, and tried replication on RH9. Immediately
Just tried the CVS head and everything works with any CPU going crazy!
only if ld_assume_kernel is set to 2.4
One more question for you Filip, is the useDirtyFlag working at all? It
seams like even if it's set to true, the whole session gets replicated
after each request. :(
Jean-Philippe
A... I see.
So no way to have only the value which setAttribute was called on to be
replicated (yet...) ?
Thanks
Jean-Philippe Bélanger
Filip Hanik wrote:
useDirtyFlag=true
means that session (yes the whole) only gets replicated when setAttribute
and removeAttribute is called
The replication message ACK never get back to the sender.
So my webpages never loads without that flag.
I think it is only needed under REDHAT 9.
Jean-Philippe Bélanger
Steve Nelson wrote:
I don't seem to need the ld_assume_kernel thing. What are the symptoms when
it is required?
-Original
uname -a reports:
2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686 i386 GNU/Linux
Filip Hanik wrote:
interesting, mine doesn't work at all unless I set the LD_ASSUME_KERNEL
what VM (version and name) are you using?
Filip
-Original Message-
From: Steve Nelson [mailto:[EMAIL PROTECTED]
Hi Filip.
I did some profiling of 40mins of tomcat with and without a 2nd node up.
here are the results with
-Xrunhprof:cpu=samples,thread=y,file=/u01/portal/java.hprof.txt,depth=10:
Those number are cpu=times and not samples since the later one freezes
on my systems.
So that list shows the
More content for you Filip.
I've checked and followed the code of the listen event in
ReplicationListener.java
Here's what happening:
selector.select(timeout) - return immediatly with one SelectorKey available
That key is not Acceptable and not Readable so it immediatly skip those
IFs and
The only changes in the ReplicationListener class is the try catch that
was added.
the code logic is the same. Weird enough. So it's probably elsewhere
that something changed in the state of the SelectionKey.
Jean-Philippe Bélanger
Steve Nelson wrote:
I was just about to try this actually. I
Currently running tomcat 5.0.16 with the CVS HEAD of the replication module.
This is under redhat 9. So far so good.
What kind of problem did you encounter under rh9?
Jean-Philippe Bélanger
Filip Hanik wrote:
my only experience with Redhat 9 is that it doesn't play well with NIO.
I have not
Well just to make sure that I wasn't saying something untrue. I went to
check my redhats.
Everything DOES work fine but it's true that there is some loop
somewhere because both my tomcat are having abnormal loadavg. ie: 1.15
even with the server are idle.
Jean-Philippe Bélanger
Filip Hanik
Loadrunner is one nice tool for creating script for web load testing.
You can do absolutly anything with that tool.
I tried lots of other load testing suite opensource or not and I`m still
having a hard time finding a tool as complet as LR. You can try openSTA.
Havn't worked much with it but
I built the latest CVS branch for the clustering module and replaced my
catalina-cluster.jar.
Seams like everything is synchronous as stated.
I had another unrelated problem with a IFRAME that IE seams to load before
the server (tomcat) ends the request. So even if everything was synchronous
the
The new tomcat 5.0.16 replication seams to work odly.
From what I've read from the documentation and the mailing list, the clustering is
supposed to be done synchronously.
Right?
Well that's not what's happening on my end, the client receives the response before
the whole replication thing is
I just tried changing to tomcat-replication
and well, that didn't go as well as I wished! :)
Seams like the setAttribute, getAttribute and sessionCreation does work.
Both my server gets the replication messages.
My problem is that the browse never gets the request back! Everything looks
done on
Hi,
I'm running Tomcat 4.1.18 in production and needing session replication. I've been
able to get tomcat-jg up and running. But after reading some mail on the tomcat user
mailling list, fillip seam to say that this version won't work with tomcat 4.1.x and
that we should use the
35 matches
Mail list logo