You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by LukeK <lu...@sce.net> on 2009/02/03 17:08:43 UTC

Re: Apache/mod_jk serves random files from tomcat


yuvalperlov wrote:
> 
> I am having the exact same symptoms with the latest versions of
> everything:
> Fedora 10
> Tomcat 6.0.18
> Apache Apache/2.2.10
> mod_jk-1.2.27 (and the same problem with the built-in mod_proxy_ajp).
> 
> It takes a day or so for the problem to start but once it does it happens
> more frequently - resources get mixed up. Tomcat logs show that the right
> resources are loaded in response to each call but on the browser end you
> can see images loaded in the wrong place. Restarting apache resets the
> problem for another day or so.

This describes my issue as well. SuSE 10.3 64-bit, running Apache 2.2.11,
Tomcat 6.0.16, APR 1.3.4 and mod_jk/1.2.27. I have downgraded mod_jk to
1.2.24 to see if this makes a difference.

Cheers!

Luke
-- 
View this message in context: http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p21812944.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Apache/mod_jk serves random files from tomcat

Posted by Pid <pi...@pidster.com>.
On 08/10/2010 04:40, domiguo wrote:
> 
> Has this thread has a clear answer now?

You resurrected a thread which is over a year old.  If you have a
problem, please start a new email and describe the details and your
environment.


p

Re: Apache/mod_jk serves random files from tomcat

Posted by domiguo <zj...@163.com>.
Has this thread has a clear answer now?




-- 
View this message in context: http://old.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p29912221.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Apache/mod_jk serves random files from tomcat

Posted by Jakob Ericsson <ja...@gmail.com>.
Problem found in mod_proxy_ajp too,

https://issues.apache.org/bugzilla/show_bug.cgi?id=46949

/Jakob

On Fri, Mar 27, 2009 at 10:33 PM, LukeK <lu...@sce.net> wrote:
>
>
> Rainer Jung-3 wrote:
>>
>> Thanks very much for the feedback. Considering the severity of the
>> problem, if you could give us another update at a time you think is
>> appropriate (depending on how often the problem happened before).
>
> It's been about a month now since we dropped libtcnative, and the problem
> has not been reported again. Right now, I've seen enough to suggest it was
> tcnative.
>
>
> Would you please be so kind to also tell us, which tcnative version you
>> were using?
>
> 1.14 though 1.16; perhaps a version or two before that, I cannot say for
> sure.
>
> Cheers!
>
> Luke
> --
> View this message in context: http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p22746664.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>



-- 
Jakob Ericsson, JAKERI AB
Tel. +46 704 533 627

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


Re: Apache/mod_jk serves random files from tomcat

Posted by Yuval Perlov <yu...@r-u-on.com>.
We were not using APR.
Since this was a live project I had no choice but switch to regular  
http proxy which doesn't work as well as AJP (speed/functionality) but  
is consistent.
Alas, as much as I'd like to help with solving this issue, I wasn't  
able to reproduce in a test environment and the production environment  
is now live so I can't mess with it.

Cheers!

Yuval Perlov
www.r-u-on.com



On Mar 10, 2009, at 6:27 PM, Rainer Jung wrote:

> Hi Yuval,
>
> did you find out in the meantime, whether you were using the  
> tcnative (aka APR) connector?
>
> Regards,
>
> Rainer
>
> On 19.02.2009 11:34, Yuval Perlov wrote:
>> Just the swapping responses has me concerned.
>>
>> Thank you so much for the rest of your responses we will put them to
>> good use once we give up on AJP completely.
>>
>> Yuval
>>
>> On Feb 18, 2009, at 8:45 PM, Christopher Schultz wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Yuval,
>>
>> On 2/17/2009 1:48 PM, Yuval Perlov wrote:
>>> Is APR part of tomcat or apache [httpd]?
>>
>> APR is the Apache Portable Runtime. Technically, it's its own beast  
>> and
>> is used by both httpd and Tomcat (optionally).
>>
>>> If I am running on linux and have no
>>> .so files in my tomcat directory does that mean I have no APR  
>>> installed?
>>
>> The Tomcat directory isn't the only place .so files could be located.
>> Anywhere in the java.library.path is possible.
>>
>> If you have an AprLifecycleListener configured in your server.xml,  
>> then
>> you are attempting to use APR. If you get a message in catalina.out  
>> on
>> startup that says something like "APR Configured" or "APR library not
>> found" then you have your answer.
>>
>>> On a more positive note, we switched to proxy_http (after making the
>>> necessary code changes) and everything works now - no more mixed  
>>> content.
>>>
>>> Of course we lost a lot of necessary functionality:
>>> 1. request.isSecure() doesn't work
>>
>> You can always use https :)
>>
>>> 2. we don't know the server name we are hit with (since it is "hard
>>> coded" in httpd.conf)
>>
>> This should be an option in mod_proxy. Is it not? ProxyPreserveHost?
>>
>>> 3. we have no access to the source IP (for geo location)
>>
>> Why not use mod_headers to convert the original IP address into an
>> X-Original-IP header. Better yet, use the X-Forwarded-For header that
>> should be set by default by mod_proxy.
>>
>>> BTW - Am I the only one that is seriously worried that this kind of
>>> problem can even exist on a platform of this maturity?
>>
>> Which problem? The "swapping-responses" problem or everything else
>> you've outlined about your inadequate configuration?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


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


Re: Apache/mod_jk serves random files from tomcat

Posted by LukeK <lu...@sce.net>.

Rainer Jung-3 wrote:
> 
> Thanks very much for the feedback. Considering the severity of the 
> problem, if you could give us another update at a time you think is 
> appropriate (depending on how often the problem happened before).

It's been about a month now since we dropped libtcnative, and the problem
has not been reported again. Right now, I've seen enough to suggest it was
tcnative.


Would you please be so kind to also tell us, which tcnative version you 
> were using?

1.14 though 1.16; perhaps a version or two before that, I cannot say for
sure.

Cheers!

Luke
-- 
View this message in context: http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p22746664.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Apache/mod_jk serves random files from tomcat

Posted by SQ <se...@compusystems.com>.
Rainer,


Rainer Jung-3 wrote:
> 
> I guess you mean the lines with the 503 are the bad responses? But those 
> do not indicate, that the probe gets back the page requested by someone 
> else, it shows that the web server or Tomcat throw an HTTP error, namely 
> 503. In this case I would guess, that mod_jk detected an error and put 
> th enode into error status. You should check your mod_jk log file. It 
> might also be good to temporarily activate the access log of Tomcat too, 
> in order to check, whether the 503 already came from there or not.
> 
> I would expect the develop observation and this one are two different 
> things.
> 

Actually I was trying to draw comparison to the original poster, Tim
Redding's comments about how the file size on a static page would change. 
Unfortunately, I gave you a bad example, which included the 503 error. 
Please ignore that.  Basically, in the access_log we see the file size
change, because it is serving the wrong page.  We had to throw a band aid
up, which monitors the file sizes and if they differ, the script bounces
Apache.  Seems to work ok for now, but its kind of ugly.


Rainer Jung-3 wrote:
> 
> Do both (mod_jk and mod_jk2 show the problems A=develop and B=probes?
> 

Yes, after looking closer, we're having the same problem with both
connectors.  We're currently in the process of upgrading everything-- going
to Apache 2.2.11, mod_jk 1.2.27, and Tomcat 5.5.27.  I'll let you know if
any of these help.
-- 
View this message in context: http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p22628124.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Apache/mod_jk serves random files from tomcat

Posted by Rainer Jung <ra...@kippdata.de>.
On 13.03.2009 18:14, Rainer Jung wrote:
>> Not sure the answer to that. Both were installed by other people, who
>> either don't recall their orgins, or are no longer employed here. I'm
>> working on building the 1.2.27 from source right now. We're x86, not
>> sparc,
>> by the way.
>
> OK. For Solaris x86 we never provided bins (I think)

Oups, correction, we did.

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


Re: Apache/mod_jk serves random files from tomcat

Posted by Rainer Jung <ra...@kippdata.de>.
On 13.03.2009 17:50, SQ wrote:
> Rainer Jung-3 wrote:
>> Just to make sure, we are talking about the same kind of observation:
>> could you please describe independently, how the observed problem looks
>> like in your case?
>>
>
> In development, the developers are getting other people pages.  So user1
> requests pageA and gets user2's pageB.

> In production, we don't get user
> input, but the probe on the load balancer is not getting the response it is
> looking for, so it thinks the machine its checking is down.  The probe is
> called serverlive.jsp.  Here is the accesslog entry during the problem (13
> being the primary LB, 14 the backup):

> xxx.xxx.xxx.14 - - [12/Mar/2009:23:09:53 -0500] "GET  /serverlive.jsp " 200
> 13
> xxx.xxx.xxx.13 - - [12/Mar/2009:23:09:54 -0500] "GET  /serverlive.jsp " 200
> 13
> xxx.xxx.xxx.14 - - [12/Mar/2009:23:09:59 -0500] "GET  /serverlive.jsp " 200
> 13
> xxx.xxx.xxx.13 - - [12/Mar/2009:23:09:59 -0500] "GET  /serverlive.jsp " 200
> 13
> xxx.xxx.xxx.14 - - [12/Mar/2009:23:10:04 -0500] "GET  /serverlive.jsp " 503
> 1070
> xxx.xxx.xxx.13 - - [12/Mar/2009:23:10:05 -0500] "GET  /serverlive.jsp " 503
> 1070
> xxx.xxx.xxx.14 - - [12/Mar/2009:23:10:10 -0500] "GET  /serverlive.jsp " 503
> 1070
> xxx.xxx.xxx.13 - - [12/Mar/2009:23:10:10 -0500] "GET  /serverlive.jsp " 503
> 1070
> xxx.xxx.xxx.14 - - [12/Mar/2009:23:11:00 -0500] "GET  /serverlive.jsp " 503
> 1070
> xxx.xxx.xxx.14 - - [12/Mar/2009:23:12:34 -0500] "GET  /serverlive.jsp " 503
> 997
> xxx.xxx.xxx.13 - - [12/Mar/2009:23:11:46 -0500] "GET  /serverlive.jsp " 503
> 997
> xxx.xxx.xxx.13 - - [12/Mar/2009:23:12:31 -0500] "GET  /serverlive.jsp " 503
> 997
> xxx.xxx.xxx.13 - - [12/Mar/2009:23:11:01 -0500] "GET  /serverlive.jsp " 503
> 997

I guess you mean the lines with the 503 are the bad responses? But those 
do not indicate, that the probe gets back the page requested by someone 
else, it shows that the web server or Tomcat throw an HTTP error, namely 
503. In this case I would guess, that mod_jk detected an error and put 
th enode into error status. You should check your mod_jk log file. It 
might also be good to temporarily activate the access log of Tomcat too, 
in order to check, whether the 503 already came from there or not.

I would expect the develop observation and this one are two different 
things.

> I'll try and get some log entries from development.
>
>
> Rainer Jung-3 wrote:
>> Since you see the problem with mod_jk2 and with mod_jk I somehow doubt,
>> that it comes form mod_jk (but hey, I'm involved in mod_jk development,
>> so that might simply be defense.
>>
>
> This is the main reason I posted here.  If I'm indeed seeing the same
> problem as the others here, then my case may disprove the mod_jk theory.  Or
> perhaps the issue resides in both my versions?

Do both (mod_jk and mod_jk2 show the problems A=develop and B=probes?

> Rainer Jung-3 wrote:
>> What is obvious, your Tomcat is *very* outdated. You are using a no
>> longer supported major version (5.0) and with 5.0 you are using a very
>> old minor version.
>>
>> If you have any chance, upgrade your Tomcat.
>>
>
> Yes, I know.  I'll see what I can do.
>
>
> Rainer Jung-3 wrote:
>> Apart from that: what else can you tell about the problem? Are there log
>> entries either from mod_jk, Apache httpd or Tomcat associated with these
>> events? Would you be able to snoop traffic between httpd and Tomcat and
>> between httpd and the clients?

As indicated above: if the system using mod_jk logs status code 503 in 
the access log (and the 503 is not in the Tomcat access log), it is 
*very* likely, that mod_jk writes something to its JkLogFile. Set 
JkLogLevel to info (but info message alone are not relevant; when you 
get a 503 it should log some error and interesting info messages at the 
same time).

> We haven't been seen any errors, in any logs.  I can go through the logs and
> compare them, and then compare those findings between the enviroments.  Not
> sure whats involved in snooping traffic.  I can look into that as well.
>
>
> Rainer Jung-3 wrote:
>> Where did you get your mod_jk from? How was it build?
>>
>
> Not sure the answer to that.  Both were installed by other people, who
> either don't recall their orgins, or are no longer employed here.  I'm
> working on building the 1.2.27 from source right now.  We're x86, not sparc,
> by the way.

OK. For Solaris x86 we never provided bins (I think), so someone might 
have built them. Under Solaris you might run into some build troubles, 
in case you are using a Sun provided httpd. Sun often compiles it with 
the Sun compiler and there is a slight chance, that a gcc compiled 
mod_jk will crash with a Sun compiled httpd. The Sun compiler is free 
though. I'm just mentioning this, so you know that it would be best if 
the compiler used for httpd and used for mod_jk are the same or at least 
close to each other.

> Thanks for your help.  Please let me know of anything else I can provide.  I
> will make updates as new information comes up.

Regards,

Rainer

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


Re: Apache/mod_jk serves random files from tomcat

Posted by SQ <se...@compusystems.com>.
Hi Rainer,
Thanks for the reply.  Answers to your questions below,


Rainer Jung-3 wrote:
> 
> Jus to make sure, we are talking about the same kind of observation: 
> could you please describe independently, how the observed problem looks 
> like in your case?
> 

In development, the developers are getting other people pages.  So user1
requests pageA and gets user2's pageB.  In production, we don't get user
input, but the probe on the load balancer is not getting the response it is
looking for, so it thinks the machine its checking is down.  The probe is
called serverlive.jsp.  Here is the accesslog entry during the problem (13
being the primary LB, 14 the backup):
xxx.xxx.xxx.14 - - [12/Mar/2009:23:09:53 -0500] "GET  /serverlive.jsp " 200
13
xxx.xxx.xxx.13 - - [12/Mar/2009:23:09:54 -0500] "GET  /serverlive.jsp " 200
13
xxx.xxx.xxx.14 - - [12/Mar/2009:23:09:59 -0500] "GET  /serverlive.jsp " 200
13
xxx.xxx.xxx.13 - - [12/Mar/2009:23:09:59 -0500] "GET  /serverlive.jsp " 200
13
xxx.xxx.xxx.14 - - [12/Mar/2009:23:10:04 -0500] "GET  /serverlive.jsp " 503
1070
xxx.xxx.xxx.13 - - [12/Mar/2009:23:10:05 -0500] "GET  /serverlive.jsp " 503
1070
xxx.xxx.xxx.14 - - [12/Mar/2009:23:10:10 -0500] "GET  /serverlive.jsp " 503
1070
xxx.xxx.xxx.13 - - [12/Mar/2009:23:10:10 -0500] "GET  /serverlive.jsp " 503
1070
xxx.xxx.xxx.14 - - [12/Mar/2009:23:11:00 -0500] "GET  /serverlive.jsp " 503
1070
xxx.xxx.xxx.14 - - [12/Mar/2009:23:12:34 -0500] "GET  /serverlive.jsp " 503
997
xxx.xxx.xxx.13 - - [12/Mar/2009:23:11:46 -0500] "GET  /serverlive.jsp " 503
997
xxx.xxx.xxx.13 - - [12/Mar/2009:23:12:31 -0500] "GET  /serverlive.jsp " 503
997
xxx.xxx.xxx.13 - - [12/Mar/2009:23:11:01 -0500] "GET  /serverlive.jsp " 503
997

I'll try and get some log entries from development.


Rainer Jung-3 wrote:
> 
> Since you see the problem with mod_jk2 and with mod_jk I somehow doubt, 
> that it comes form mod_jk (but hey, I'm involved in mod_jk development, 
> so that might simply be defense.
> 

This is the main reason I posted here.  If I'm indeed seeing the same
problem as the others here, then my case may disprove the mod_jk theory.  Or
perhaps the issue resides in both my versions?


Rainer Jung-3 wrote:
> 
> What is obvious, your Tomcat is *very* outdated. You are using a no 
> longer supported major version (5.0) and with 5.0 you are using a very 
> old minor version.
> 
> If you have any chance, upgrade your Tomcat.
> 

Yes, I know.  I'll see what I can do.


Rainer Jung-3 wrote:
> 
> Apart from that: what else can you tell about the problem? Are there log 
> entries either from mod_jk, Apache httpd or Tomcat associated with these 
> events? Would you be able to snoop traffic between httpd and Tomcat and 
> between httpd and the clients?
> 

We haven't been seen any errors, in any logs.  I can go through the logs and
compare them, and then compare those findings between the enviroments.  Not
sure whats involved in snooping traffic.  I can look into that as well.


Rainer Jung-3 wrote:
> 
> Where did you get your mod_jk from? How was it build?
> 

Not sure the answer to that.  Both were installed by other people, who
either don't recall their orgins, or are no longer employed here.  I'm
working on building the 1.2.27 from source right now.  We're x86, not sparc,
by the way.

Thanks for your help.  Please let me know of anything else I can provide.  I
will make updates as new information comes up.
-- 
View this message in context: http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p22500565.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Apache/mod_jk serves random files from tomcat

Posted by Rainer Jung <ra...@kippdata.de>.
On 12.03.2009 16:42, SQ wrote:
> Good to see others are seeing the same problem that’s been driving us crazy
> and is slowly become a very serious issue.  Admittedly, my knowledge on this
> whole area is limited, but I’ll try my best to provide as much info as
> possible to help solve the problem.
>
> Here are some specifics:
> Tomcat serves most of the pages, excluding html pages, which there are very
> few.  We have tried extensively to reproduce the problem, but cannot.
> Restarting either apache or tomcat clears the problem.  We have two
> different environments that are exhibiting the same problem.
>
> In both environments, tomcat and apache are on the same machines.
>
> Development
> Solaris 10
> Tomcat 5.0.19
> Apache 2.0.49
> mod_jk2/2.0.4
>
> Web
> Solaris 10
> Tomcat 5.0.19
> Apache 2.2.6
> mod_jk/1.2.25
>
> Web servers are load balanced using separate machines.  These machines have
> a probe that runs, checking the health of the web servers.  The servers are
> constantly going up and down depending on the random responses.  This is
> normally how we are alerted of the problem, or user input.  Problem happens
> daily on the web servers, maybe once a week in development.
>
> I looked for any signs of APR and found none; I don’t think we’re using it.
>
> After glancing over past responses, it appears upgrading mod_jk should be
> the first step, but it doesn’t seem like that was a guaranteed fix for all.
> Interestingly enough, we’re using two different versions and getting the
> same problem on both.  Any other suggestions?  Any additional info I can
> provide?

Jus to make sure, we are talking about the same kind of observation: 
could you please describe independently, how the observed problem looks 
like in your case?

Since you see the problem with mod_jk2 and with mod_jk I somehow doubt, 
that it comes form mod_jk (but hey, I'm involved in mod_jk development, 
so that might simply be defense.

What is obvious, your Tomcat is *very* outdated. You are using a no 
longer supported major version (5.0) and with 5.0 you are using a very 
old minor version.

If you have any chance, upgrade your Tomcat.

Apart from that: what else can you tell about the problem? Are there log 
entries either from mod_jk, Apache httpd or Tomcat associated with these 
events? Would you be able to snoop traffic between httpd and Tomcat and 
between httpd and the clients?

Where did you get your mod_jk from? How was it build?

Regards,

Rainer

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


Re: Apache/mod_jk serves random files from tomcat

Posted by SQ <se...@compusystems.com>.
Good to see others are seeing the same problem that’s been driving us crazy
and is slowly become a very serious issue.  Admittedly, my knowledge on this
whole area is limited, but I’ll try my best to provide as much info as
possible to help solve the problem.

Here are some specifics:
Tomcat serves most of the pages, excluding html pages, which there are very
few.  We have tried extensively to reproduce the problem, but cannot. 
Restarting either apache or tomcat clears the problem.  We have two
different environments that are exhibiting the same problem.  

In both environments, tomcat and apache are on the same machines.

Development 
Solaris 10
Tomcat 5.0.19
Apache 2.0.49
mod_jk2/2.0.4

Web
Solaris 10
Tomcat 5.0.19
Apache 2.2.6
mod_jk/1.2.25

Web servers are load balanced using separate machines.  These machines have
a probe that runs, checking the health of the web servers.  The servers are
constantly going up and down depending on the random responses.  This is
normally how we are alerted of the problem, or user input.  Problem happens
daily on the web servers, maybe once a week in development.

I looked for any signs of APR and found none; I don’t think we’re using it.

After glancing over past responses, it appears upgrading mod_jk should be
the first step, but it doesn’t seem like that was a guaranteed fix for all. 
Interestingly enough, we’re using two different versions and getting the
same problem on both.  Any other suggestions?  Any additional info I can
provide?

-- 
View this message in context: http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p22478781.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Apache/mod_jk serves random files from tomcat

Posted by Rainer Jung <ra...@kippdata.de>.
On 11.03.2009 20:19, LukeK wrote:
>
> Rainer Jung-3 wrote:
>> did you find out in the meantime, whether you were using the tcnative (aka
>> APR) connector?
>>
>
> I was certainly using libtcnative, and removed it at the start of the month.
> I haven't seen enough to definitively say that it solved the problem, but my
> experience thus far is certainly consistent with such a hypothesis.

Thanks very much for the feedback. Considering the severity of the 
problem, if you could give us another update at a time you think is 
appropriate (depending on how often the problem happened before).

Would you please be so kind to also tell us, which tcnative version you 
were using?

Thanks again,

Rainer

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


Re: Apache/mod_jk serves random files from tomcat

Posted by LukeK <lu...@sce.net>.

Rainer Jung-3 wrote:
> 
> did you find out in the meantime, whether you were using the tcnative (aka
> APR) connector?
> 

I was certainly using libtcnative, and removed it at the start of the month.
I haven't seen enough to definitively say that it solved the problem, but my
experience thus far is certainly consistent with such a hypothesis.

Cheers!

Luke
-- 
View this message in context: http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p22462521.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Apache/mod_jk serves random files from tomcat

Posted by Rainer Jung <ra...@kippdata.de>.
Hi Yuval,

did you find out in the meantime, whether you were using the tcnative 
(aka APR) connector?

Regards,

Rainer

On 19.02.2009 11:34, Yuval Perlov wrote:
> Just the swapping responses has me concerned.
>
> Thank you so much for the rest of your responses we will put them to
> good use once we give up on AJP completely.
>
> Yuval
>
> On Feb 18, 2009, at 8:45 PM, Christopher Schultz wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Yuval,
>
> On 2/17/2009 1:48 PM, Yuval Perlov wrote:
>> Is APR part of tomcat or apache [httpd]?
>
> APR is the Apache Portable Runtime. Technically, it's its own beast and
> is used by both httpd and Tomcat (optionally).
>
>> If I am running on linux and have no
>> .so files in my tomcat directory does that mean I have no APR installed?
>
> The Tomcat directory isn't the only place .so files could be located.
> Anywhere in the java.library.path is possible.
>
> If you have an AprLifecycleListener configured in your server.xml, then
> you are attempting to use APR. If you get a message in catalina.out on
> startup that says something like "APR Configured" or "APR library not
> found" then you have your answer.
>
>> On a more positive note, we switched to proxy_http (after making the
>> necessary code changes) and everything works now - no more mixed content.
>>
>> Of course we lost a lot of necessary functionality:
>> 1. request.isSecure() doesn't work
>
> You can always use https :)
>
>> 2. we don't know the server name we are hit with (since it is "hard
>> coded" in httpd.conf)
>
> This should be an option in mod_proxy. Is it not? ProxyPreserveHost?
>
>> 3. we have no access to the source IP (for geo location)
>
> Why not use mod_headers to convert the original IP address into an
> X-Original-IP header. Better yet, use the X-Forwarded-For header that
> should be set by default by mod_proxy.
>
>> BTW - Am I the only one that is seriously worried that this kind of
>> problem can even exist on a platform of this maturity?
>
> Which problem? The "swapping-responses" problem or everything else
> you've outlined about your inadequate configuration?

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


Re: Apache/mod_jk serves random files from tomcat

Posted by Yuval Perlov <yu...@r-u-on.com>.
Just the swapping responses has me concerned.

Thank you so much for the rest of your responses we will put them to  
good use once we give up on AJP completely.

Yuval

On Feb 18, 2009, at 8:45 PM, Christopher Schultz wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yuval,

On 2/17/2009 1:48 PM, Yuval Perlov wrote:
> Is APR part of tomcat or apache [httpd]?

APR is the Apache Portable Runtime. Technically, it's its own beast and
is used by both httpd and Tomcat (optionally).

> If I am running on linux and have no
> .so files in my tomcat directory does that mean I have no APR  
> installed?

The Tomcat directory isn't the only place .so files could be located.
Anywhere in the java.library.path is possible.

If you have an AprLifecycleListener configured in your server.xml, then
you are attempting to use APR. If you get a message in catalina.out on
startup that says something like "APR Configured" or "APR library not
found" then you have your answer.

> On a more positive note, we switched to proxy_http (after making the
> necessary code changes) and everything works now - no more mixed  
> content.
>
> Of course we lost a lot of necessary functionality:
> 1. request.isSecure() doesn't work

You can always use https :)

> 2. we don't know the server name we are hit with (since it is "hard
> coded" in httpd.conf)

This should be an option in mod_proxy. Is it not? ProxyPreserveHost?

> 3. we have no access to the source IP (for geo location)

Why not use mod_headers to convert the original IP address into an
X-Original-IP header. Better yet, use the X-Forwarded-For header that
should be set by default by mod_proxy.

> BTW - Am I the only one that is seriously worried that this kind of
> problem can even exist on a platform of this maturity?

Which problem? The "swapping-responses" problem or everything else
you've outlined about your inadequate configuration?

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

iEYEARECAAYFAkmcV0AACgkQ9CaO5/Lv0PBw4wCgtvTgf5Jy6z30u9Z3z/8M9ViN
stwAn1urDcjts1xtPvSMiSuL00jEMYPV
=/Ge+
-----END PGP SIGNATURE-----

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




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


Re: Apache/mod_jk serves random files from tomcat

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yuval,

On 2/17/2009 1:48 PM, Yuval Perlov wrote:
> Is APR part of tomcat or apache [httpd]?

APR is the Apache Portable Runtime. Technically, it's its own beast and
is used by both httpd and Tomcat (optionally).

> If I am running on linux and have no
> .so files in my tomcat directory does that mean I have no APR installed?

The Tomcat directory isn't the only place .so files could be located.
Anywhere in the java.library.path is possible.

If you have an AprLifecycleListener configured in your server.xml, then
you are attempting to use APR. If you get a message in catalina.out on
startup that says something like "APR Configured" or "APR library not
found" then you have your answer.

> On a more positive note, we switched to proxy_http (after making the
> necessary code changes) and everything works now - no more mixed content.
> 
> Of course we lost a lot of necessary functionality:
> 1. request.isSecure() doesn't work

You can always use https :)

> 2. we don't know the server name we are hit with (since it is "hard
> coded" in httpd.conf)

This should be an option in mod_proxy. Is it not? ProxyPreserveHost?

> 3. we have no access to the source IP (for geo location)

Why not use mod_headers to convert the original IP address into an
X-Original-IP header. Better yet, use the X-Forwarded-For header that
should be set by default by mod_proxy.

> BTW - Am I the only one that is seriously worried that this kind of
> problem can even exist on a platform of this maturity?

Which problem? The "swapping-responses" problem or everything else
you've outlined about your inadequate configuration?

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

iEYEARECAAYFAkmcV0AACgkQ9CaO5/Lv0PBw4wCgtvTgf5Jy6z30u9Z3z/8M9ViN
stwAn1urDcjts1xtPvSMiSuL00jEMYPV
=/Ge+
-----END PGP SIGNATURE-----

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


Re: Apache/mod_jk serves random files from tomcat

Posted by Yuval Perlov <yu...@r-u-on.com>.
Is APR part of tomcat or apache? If I am running on linux and have  
no .so files in my tomcat directory does that mean I have no APR  
installed?

On a more positive note, we switched to proxy_http (after making the  
necessary code changes) and everything works now - no more mixed  
content.

Of course we lost a lot of necessary functionality:
1. request.isSecure() doesn't work
2. we don't know the server name we are hit with (since it is "hard  
coded" in httpd.conf)
3. we have no access to the source IP (for geo location)
4. We had to some make all  client redirection code use the full URL  
with the server name - turns out client redirect uses the server name  
from the request so it tries to hit the 8080 port (tomcat) instead of  
80 (httpd).

BTW - Am I the only one that is seriously worried that this kind of  
problem can even exist on a platform of this maturity?

Yuval Perlov
www.r-u-on.com



On Feb 17, 2009, at 1:38 AM, dave smith wrote:

Sorry for not providing an update sooner.  I disabled the APR and the
problem went away.

On 2/12/09, Christopher Schultz <ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Yuval,
>
> On 2/12/2009 3:12 AM, Yuval Perlov wrote:
>> I actually upgraded from mod_jk 1.2.26 to 27 to try and make the  
>> problem
>> go away.
>
> Ha! Okay. Sorry for a bad tip. ;)
>
> So, I'm definitely not going to be able to help you from here on out,
> but I know that folks like Rainer and Mladen could use some more
> information, so I'll go ahead and ask for some.
>
>> The mixup occurs only in tomcat originated data - the static stuff
>> coming from httpd stays fine.
>
> Good to know.
>
>> Moreover, in the past I had it setup so the static stuff came from
>> tomcat as well. This naturally resulted in significantly more hits
>> between apache and tomcat which made the problem appear much faster
>> (hence my theory that some resource is being depleted over time).
>
> Is this something you can reproduce reliably in a test environment?  
> Does
> it require heavy load in order for this behavior to manifest  
> itself? Or,
> is it just after 5M requests everything goes to hell? I'm wondering if
> concurrency is the problem or maybe something silly like logging or
> maintaining worker status that somehow corrupts something.
>
> It's very odd that responses would be crossed. I don't think any of  
> that
> stuff is shared between threads/processes in mod_jk/httpd, but I  
> suppose
> when you overwrite memory (which is the only explanation I can think
> of), you can't really expect the program to operate properly.
>
> Oh, are you using worker or prefork MPM?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkmUplsACgkQ9CaO5/Lv0PANwQCeM7IEsDUu+o8cKjZP3kxAZgXP
> 7g4AoLyLW2cvmLC7AGGJnEf8jHBzNBvM
> =E4BT
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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




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


Re: Apache/mod_jk serves random files from tomcat

Posted by dave smith <ge...@gmail.com>.
Sorry for not providing an update sooner.  I disabled the APR and the
problem went away.

On 2/12/09, Christopher Schultz <ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Yuval,
>
> On 2/12/2009 3:12 AM, Yuval Perlov wrote:
>> I actually upgraded from mod_jk 1.2.26 to 27 to try and make the problem
>> go away.
>
> Ha! Okay. Sorry for a bad tip. ;)
>
> So, I'm definitely not going to be able to help you from here on out,
> but I know that folks like Rainer and Mladen could use some more
> information, so I'll go ahead and ask for some.
>
>> The mixup occurs only in tomcat originated data - the static stuff
>> coming from httpd stays fine.
>
> Good to know.
>
>> Moreover, in the past I had it setup so the static stuff came from
>> tomcat as well. This naturally resulted in significantly more hits
>> between apache and tomcat which made the problem appear much faster
>> (hence my theory that some resource is being depleted over time).
>
> Is this something you can reproduce reliably in a test environment? Does
> it require heavy load in order for this behavior to manifest itself? Or,
> is it just after 5M requests everything goes to hell? I'm wondering if
> concurrency is the problem or maybe something silly like logging or
> maintaining worker status that somehow corrupts something.
>
> It's very odd that responses would be crossed. I don't think any of that
> stuff is shared between threads/processes in mod_jk/httpd, but I suppose
> when you overwrite memory (which is the only explanation I can think
> of), you can't really expect the program to operate properly.
>
> Oh, are you using worker or prefork MPM?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkmUplsACgkQ9CaO5/Lv0PANwQCeM7IEsDUu+o8cKjZP3kxAZgXP
> 7g4AoLyLW2cvmLC7AGGJnEf8jHBzNBvM
> =E4BT
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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


Re: Apache/mod_jk serves random files from tomcat

Posted by rnilsen <rn...@sfjbb.net>.
Hi,
We had similar behaviour on our server, apache in the front serving tomcat
on SSL, mostly servlets. First off, this is what we installed: Tomcat 5.5.27
and Apache 2.2.11 with mod_jk 1.2.26. The server is a 64 bit version of
Windows Server 2008 (2 CPUs). We got some strange problems with constant
high CPU usage. A thread suggested to change the tcnative.dll to an older
version since there was a bug in that, so we did and changed to version
1.1.6.0 (somewhere in the process we have misplaced the tomcat version this
file came with..) , and that got rid of the CPU usage problems.

But then another problem arose. After uploading documents into our system,
we could not download them successfully - this was first seen with PDF
files. And the larger the file, the more likely the problem. Then we noticed
that going directly towards Tomcat (on 8080) worked like a charm, so did
accessing static files under apache - but when trying the same static files
under tomcat - going through apache - it failed again. 

We have tried different versions of mod_jk with no success, and experimented
with mod_expires settings etc. Then we got reports of issues where large
servlet generated reports got messed up, and it seemed the stream had just
left out parts of the produced HTML code, only to continue further down in
the expected report. And finally, to top it, we also got data from one user
showing up at another user! 

After having no success we finally decided to try to remove the tcnative
DLL, and what do you know, it worked! No more problems with PDFs, and so
far, no more cut or mixed servlet response!

So what I want to know is, what could have caused this? My knowledge of both
Apache server and Tomcat is rather limited, so I hope someone can come up
with a good answer :)




Yuval Perlov wrote:
> 
> We started restarting apache on a regular basis but if a user is in  
> mid request (consider a user that just filled a big form and is  
> upload a file).
> 
> I moved all static content to apache so tomcat is now only delivering  
> the actual jsp file. The result was that the mix up took longer to  
> appear, however when it did USERS STARTED SEEING EACH OTHERS DATA!!!  
> (before that, the mixup was usually with images etc just because  
> there are more of them).
> 
> I am actually amazed that this can even happen in such a mature  
> version and that such a small number of us are experiencing it. This  
> is slowly killing our project. Trying to move to proxy_ajp did not  
> help which makes the whole thing even more mysterious - these are two  
> separate code bases, no? (BTW - are mod_jk developers reading this?)
> 
> We are contemplating two approaches:
> 1) moving to proxy_http. My only concern is that this won't help -  
> maybe the problem is unrelated to AJP? Upgrading has helped some  
> users but not all and the problem exists in both mod_jk and proxy_ajp.
> 2) getting rid of apache and moving tomcat to the front (much harder  
> to configure but ensures we are rid of this problem).
> 
> Any Thoughts?
> 
> Regards,
> Yuval Perlov
> 
> 
> 
> 
> On Feb 5, 2009, at 11:27 PM, LukeK wrote:
> 
> 
> 
> JohnHardin wrote:
>>
>> * Have others (that now seem to be "fixed") gotten things to work by
>> updating to the latest mod_jk (1.2.27)?
> 
> I suspect that it's related to 1.2.27 - I have been playing around with
> older versions. .24 and .25 have had issues forwarding certain request
> headers, but so far .26 seems to be working OK.
> 
> 
> Is periodically restarting apache a suitable (if not hackish) work- 
> around
> until we can get our production environment upgraded?
> 
> That'd be my fallback position.
> 
> Cheers!
> 
> Luke
> -- 
> View this message in context: http://www.nabble.com/Apache-mod_jk- 
> serves-random-files-from-tomcat-tp18385568p21861548.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p22059232.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Apache/mod_jk serves random files from tomcat

Posted by André Warnier <aw...@ice-sa.com>.
Yuval Perlov wrote:
[...]

> 2) getting rid of apache and moving tomcat to the front (much harder to 
> configure but ensures we are rid of this problem).
> 
This being the Tomcat forum, and as these things go, I am sure you are 
going to get some ringing endorsements for that.  But I am less sure 
they will be unbiased.
You should balance that with a similar question on the Apache httpd forum.

And yes, the mod_jk developers do lurk around here.



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


Re: Apache/mod_jk serves random files from tomcat

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yuval,

On 2/12/2009 3:12 AM, Yuval Perlov wrote:
> I actually upgraded from mod_jk 1.2.26 to 27 to try and make the problem
> go away.

Ha! Okay. Sorry for a bad tip. ;)

So, I'm definitely not going to be able to help you from here on out,
but I know that folks like Rainer and Mladen could use some more
information, so I'll go ahead and ask for some.

> The mixup occurs only in tomcat originated data - the static stuff
> coming from httpd stays fine.

Good to know.

> Moreover, in the past I had it setup so the static stuff came from
> tomcat as well. This naturally resulted in significantly more hits
> between apache and tomcat which made the problem appear much faster
> (hence my theory that some resource is being depleted over time).

Is this something you can reproduce reliably in a test environment? Does
it require heavy load in order for this behavior to manifest itself? Or,
is it just after 5M requests everything goes to hell? I'm wondering if
concurrency is the problem or maybe something silly like logging or
maintaining worker status that somehow corrupts something.

It's very odd that responses would be crossed. I don't think any of that
stuff is shared between threads/processes in mod_jk/httpd, but I suppose
when you overwrite memory (which is the only explanation I can think
of), you can't really expect the program to operate properly.

Oh, are you using worker or prefork MPM?

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

iEYEARECAAYFAkmUplsACgkQ9CaO5/Lv0PANwQCeM7IEsDUu+o8cKjZP3kxAZgXP
7g4AoLyLW2cvmLC7AGGJnEf8jHBzNBvM
=E4BT
-----END PGP SIGNATURE-----

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


Re: Apache/mod_jk serves random files from tomcat

Posted by Yuval Perlov <yu...@r-u-on.com>.
I actually upgraded from mod_jk 1.2.26 to 27 to try and make the  
problem go away.
I see the mixup in the file sizes so thought a trace was not necessary.
The mixup occurs only in tomcat originated data - the static stuff  
coming from httpd stays fine.
Moreover, in the past I had it setup so the static stuff came from  
tomcat as well. This naturally resulted in significantly more hits  
between apache and tomcat which made the problem appear much faster  
(hence my theory that some resource is being depleted over time).

Yuval


On Feb 11, 2009, at 3:44 PM, Christopher Schultz wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yuval,

On 2/11/2009 1:56 AM, Yuval Perlov wrote:
> What leads me to believe this is unrelated to my application code is
> that restarting apache makes the problem go away.

So, when your site goes crazy, a simple httpd-bounce does the trick? No
Tomcat restart or anything required? Existing users and sessions are all
preserved and pretty much the problem just magically goes away?

Crazy.

I see that you are using httpd 2.2.10. Have you tried downgrading to
2.0.x to see if that helps? I've heard some folks having trouble with
mod_jk 1.2.27, so you might try downgrading to 1.2.26 unless something
vital is in the .27 release that you need.

Those are easier fixes than switching to proxy_http or removing httpd
altogether.

If you watch the network traffic with a TCP sniffer like wireshark, does
it look like request A results in response B instead of (expected)
response A? When the server goes crazy, can you start sending TRACE
requests to see if those get mixed-up? Does all traffic get jumbled, or
just the stuff bound for Tomcat?

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

iEYEARECAAYFAkmS1lgACgkQ9CaO5/Lv0PBNTwCghqlzDnFDppy0WmgHGTdKjMoQ
czQAnijlks4T6XAM72WuC3EgMN1NB+0Q
=xzLb
-----END PGP SIGNATURE-----

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




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


Re: Apache/mod_jk serves random files from tomcat

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yuval,

On 2/11/2009 1:56 AM, Yuval Perlov wrote:
> What leads me to believe this is unrelated to my application code is
> that restarting apache makes the problem go away.

So, when your site goes crazy, a simple httpd-bounce does the trick? No
Tomcat restart or anything required? Existing users and sessions are all
preserved and pretty much the problem just magically goes away?

Crazy.

I see that you are using httpd 2.2.10. Have you tried downgrading to
2.0.x to see if that helps? I've heard some folks having trouble with
mod_jk 1.2.27, so you might try downgrading to 1.2.26 unless something
vital is in the .27 release that you need.

Those are easier fixes than switching to proxy_http or removing httpd
altogether.

If you watch the network traffic with a TCP sniffer like wireshark, does
it look like request A results in response B instead of (expected)
response A? When the server goes crazy, can you start sending TRACE
requests to see if those get mixed-up? Does all traffic get jumbled, or
just the stuff bound for Tomcat?

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

iEYEARECAAYFAkmS1lgACgkQ9CaO5/Lv0PBNTwCghqlzDnFDppy0WmgHGTdKjMoQ
czQAnijlks4T6XAM72WuC3EgMN1NB+0Q
=xzLb
-----END PGP SIGNATURE-----

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


Re: Apache/mod_jk serves random files from tomcat

Posted by Yuval Perlov <yu...@r-u-on.com>.
Thanks!

The problem as far as I can tell is a simple mixup of http requests  
so user identities don't play into this. It might look like it since  
user A is getting the results of user B but as far as session  
management goes it is unaffected by this.

The URLs are very short.
This happens at random. This only starts to happen after the server  
has been running for a while - it's as if some resource is being  
consumed and once it's done this problem starts emerging.
When it starts happening it happens to all users.

What leads me to believe this is unrelated to my application code is  
that restarting apache makes the problem go away. User data is  
managed on the session object and I am not interfering with it in any  
way (no direct cookie code).
This is also the reason I believe tomcat only will work. Also we have  
been running for sometime in a tomcat only mode and never had this  
problem (which is not definite evidence, i know).

The reason I am not jumping to proxy_http is that the application is  
currently using IP geo location which I suspect will not be available  
once we are behind a http proxy. We will be shutting off this  
functionality just so we can switch to proxy_http but it takes a few  
day to test.

Yuval


On Feb 11, 2009, at 4:38 AM, Christopher Schultz wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yuval,

On 2/10/2009 3:44 PM, Yuval Perlov wrote:
> We started restarting apache on a regular basis but if a user is in  
> mid
> request (consider a user that just filled a big form and is upload  
> a file).

So it appears that Apache is, over time, losing track of user
identities? That seems odd since neither mod_jk nor Apache httpd
actually do anything but forward the identity information from the
browser to Tomcat. Either an HTTP cookie or a URL parameter is used to
identify sessions, and both are provided with every request.

Do you have unusually long URLs? Unusually long request bodies? I'm just
trying to think of why any data would be mixed-up.

Does this happen seemingly randomly, or only for certain pages on your
site? Certain source IP addresses? We had some users that were getting
all messed up before we recognized that they were doing through google's
cache which was seriously confusing just about everything. Fortunately,
we could see from our server logs that some requests came from the
/real/ remote user and others came from google's domain.

Otherwise, all I can think of is that you have some bug in your
application <shrug>. How are you doing authentication? How about user
identification - aside from relying on session data in Tomcat.

> We are contemplating two approaches:
> 1) moving to proxy_http. My only concern is that this won't help -  
> maybe
> the problem is unrelated to AJP? Upgrading has helped some users  
> but not
> all and the problem exists in both mod_jk and proxy_ajp.

Trying mod_proxy_http will certainly give you more information. Can you
reproduce this problem in a safe environment?

> 2) getting rid of apache and moving tomcat to the front (much  
> harder to
> configure but ensures we are rid of this problem).

Are you /sure/ that a Tomcat-only setup doesn't exhibit this problem?

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

iEYEARECAAYFAkmSOi0ACgkQ9CaO5/Lv0PBpiwCdH2pRuaVP7TRl7E6tOqZbkUQM
yuUAniM9m8+Mo9aWiu2G8XQcZjXf2W/M
=l0Xk
-----END PGP SIGNATURE-----

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




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


Re: Apache/mod_jk serves random files from tomcat

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yuval,

On 2/10/2009 3:44 PM, Yuval Perlov wrote:
> We started restarting apache on a regular basis but if a user is in mid
> request (consider a user that just filled a big form and is upload a file).

So it appears that Apache is, over time, losing track of user
identities? That seems odd since neither mod_jk nor Apache httpd
actually do anything but forward the identity information from the
browser to Tomcat. Either an HTTP cookie or a URL parameter is used to
identify sessions, and both are provided with every request.

Do you have unusually long URLs? Unusually long request bodies? I'm just
trying to think of why any data would be mixed-up.

Does this happen seemingly randomly, or only for certain pages on your
site? Certain source IP addresses? We had some users that were getting
all messed up before we recognized that they were doing through google's
cache which was seriously confusing just about everything. Fortunately,
we could see from our server logs that some requests came from the
/real/ remote user and others came from google's domain.

Otherwise, all I can think of is that you have some bug in your
application <shrug>. How are you doing authentication? How about user
identification - aside from relying on session data in Tomcat.

> We are contemplating two approaches:
> 1) moving to proxy_http. My only concern is that this won't help - maybe
> the problem is unrelated to AJP? Upgrading has helped some users but not
> all and the problem exists in both mod_jk and proxy_ajp.

Trying mod_proxy_http will certainly give you more information. Can you
reproduce this problem in a safe environment?

> 2) getting rid of apache and moving tomcat to the front (much harder to
> configure but ensures we are rid of this problem).

Are you /sure/ that a Tomcat-only setup doesn't exhibit this problem?

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

iEYEARECAAYFAkmSOi0ACgkQ9CaO5/Lv0PBpiwCdH2pRuaVP7TRl7E6tOqZbkUQM
yuUAniM9m8+Mo9aWiu2G8XQcZjXf2W/M
=l0Xk
-----END PGP SIGNATURE-----

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


Re: Apache/mod_jk serves random files from tomcat

Posted by Yuval Perlov <yu...@r-u-on.com>.
We started restarting apache on a regular basis but if a user is in  
mid request (consider a user that just filled a big form and is  
upload a file).

I moved all static content to apache so tomcat is now only delivering  
the actual jsp file. The result was that the mix up took longer to  
appear, however when it did USERS STARTED SEEING EACH OTHERS DATA!!!  
(before that, the mixup was usually with images etc just because  
there are more of them).

I am actually amazed that this can even happen in such a mature  
version and that such a small number of us are experiencing it. This  
is slowly killing our project. Trying to move to proxy_ajp did not  
help which makes the whole thing even more mysterious - these are two  
separate code bases, no? (BTW - are mod_jk developers reading this?)

We are contemplating two approaches:
1) moving to proxy_http. My only concern is that this won't help -  
maybe the problem is unrelated to AJP? Upgrading has helped some  
users but not all and the problem exists in both mod_jk and proxy_ajp.
2) getting rid of apache and moving tomcat to the front (much harder  
to configure but ensures we are rid of this problem).

Any Thoughts?

Regards,
Yuval Perlov




On Feb 5, 2009, at 11:27 PM, LukeK wrote:



JohnHardin wrote:
>
> * Have others (that now seem to be "fixed") gotten things to work by
> updating to the latest mod_jk (1.2.27)?

I suspect that it's related to 1.2.27 - I have been playing around with
older versions. .24 and .25 have had issues forwarding certain request
headers, but so far .26 seems to be working OK.


Is periodically restarting apache a suitable (if not hackish) work- 
around
until we can get our production environment upgraded?

That'd be my fallback position.

Cheers!

Luke
-- 
View this message in context: http://www.nabble.com/Apache-mod_jk- 
serves-random-files-from-tomcat-tp18385568p21861548.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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




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


Re: Apache/mod_jk serves random files from tomcat

Posted by LukeK <lu...@sce.net>.

JohnHardin wrote:
> 
> * Have others (that now seem to be "fixed") gotten things to work by
> updating to the latest mod_jk (1.2.27)?

I suspect that it's related to 1.2.27 - I have been playing around with
older versions. .24 and .25 have had issues forwarding certain request
headers, but so far .26 seems to be working OK.


Is periodically restarting apache a suitable (if not hackish) work-around
until we can get our production environment upgraded?

That'd be my fallback position.

Cheers!

Luke
-- 
View this message in context: http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p21861548.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Apache/mod_jk serves random files from tomcat

Posted by JohnHardin <ha...@texas.net>.

LukeK wrote:
> 
> 
> yuvalperlov wrote:
>> 
>> I am having the exact same symptoms with the latest versions of
>> everything:
>> Fedora 10
>> Tomcat 6.0.18
>> Apache Apache/2.2.10
>> mod_jk-1.2.27 (and the same problem with the built-in mod_proxy_ajp).
>> 
>> It takes a day or so for the problem to start but once it does it happens
>> more frequently - resources get mixed up. Tomcat logs show that the right
>> resources are loaded in response to each call but on the browser end you
>> can see images loaded in the wrong place. Restarting apache resets the
>> problem for another day or so.
> 
> This describes my issue as well. SuSE 10.3 64-bit, running Apache 2.2.11,
> Tomcat 6.0.16, APR 1.3.4 and mod_jk/1.2.27. I have downgraded mod_jk to
> 1.2.24 to see if this makes a difference.
> 

We, too, are experiencing similar issues:  CentOS release 5, Apache 2.2.3,
Tomcat 6.0.14, and mod_jk 1.2.23.  Comparing tomcat and apache logs show
discrepancies between tomcat's and apache's content sizes for given
requests.

We're clearly not up-to-date on any of these components, but we're trying to
find the minimum we have to update in order to resolve this issue.

    * Have others (that now seem to be "fixed") gotten things to work by
updating to the latest mod_jk (1.2.27)?

    * Has anyone discovered a way to reproduce this issue?

    * Is periodically restarting apache a suitable (if not hackish)
work-around until we can get our production environment upgraded?

Thoughts?

Thanks in advance for your assistance.

-John Hardin
-- 
View this message in context: http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p21861245.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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