You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by nohacks <ph...@gmail.com> on 2009/04/30 22:18:02 UTC

I have a problem with Apache, Tomcat

You can see from my logs that apache returns a 200 for my login page then
returns a 404 from

It seems to be an issue now and then. It works for a while then it tosses a
404. Maybe after a timeout I really dont know...Hard to recreate. but my
logs are full of 404 jsessionid issues...

Any help out there?

Phil

66.104.22.9 - - [29/Apr/2009:14:10:50 -0400] "GET /login.jsf HTTP/1.1" 200
3303 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
1.0.3705; .NET CLR 1.1.4322; Media Cente
r PC 4.0; FDM; .NET CLR 2.0.50727)"
 			
66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET
/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrME
aw__.jsf;jsessionid=483272B32E87258CAA51358838510D4C.tomcat1 HTTP/1.1" 404
7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE
7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Cente
r PC 4.0; FDM; .NET CLR 2.0.50727)"
			404 here
66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET
/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAF7sqpgb-jyGdIAF
rMEaw__.jsf;jsessionid=483272B32E87258CAA51358838510D4C.tomcat1 HTTP/1.1"
404 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE
7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Cente
r PC 4.0; FDM; .NET CLR 2.0.50727)"
			404 here
66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET /css/stylesheet.css
HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Cente
r PC 4.0; FDM; .NET CLR 2.0.50727)"
66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET /js/jquery-1.2.3.pack.js
HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Cente
r PC 4.0; FDM; .NET CLR 2.0.50727)"
66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET
/js/jquery.jcarousel.pack.js HTTP/1.1" 304 -
"http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Cente
r PC 4.0; FDM; .NET CLR 2.0.50727)"
66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET /css/jquery.jcarousel.css
HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Cente
r PC 4.0; FDM; .NET CLR 2.0.50727)"
66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET /css/skin.css HTTP/1.1"
304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE
7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Cente
r PC 4.0; FDM; .NET CLR 2.0.50727)"
66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET
/images/prev-horizontal.png HTTP/1.1" 304 -
"http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Cente
r PC 4.0; FDM; .NET CLR 2.0.50727)"
66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET
/images/next-horizontal.png HTTP/1.1" 304 -
"http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Cente
r PC 4.0; FDM; .NET CLR 2.0.50727)"

-- 
View this message in context: http://www.nabble.com/I-have-a-problem-with-Apache%2C-Tomcat-tp23322605p23322605.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: I have a problem with Apache, Tomcat

Posted by nohacks <ph...@gmail.com>.
Thanks for all of your time on this problem. 

I found the issue..!!!

It was a page caching issue with the browser. It seems the page was cached
and so not creating a new session for the Post button on Login. 

I put the following in my login page and now it works great. The new session
is created. 
 	 
<META Http-Equiv="Cache-Control" Content="no-cache">
<META Http-Equiv="Pragma" Content="no-cache">
<META Http-Equiv="Expires" Content="-1"> 

This forces the page to go back to server and get new session id. Because
old session id was expired. 

I followed the logs from 
Browser, Apache, ModJk, LB, Tomcat, App.

It all works for now. I might also use the Apache. CacheDisable Directive
http://httpd.apache.org/docs/2.2/mod/mod_cache.html#cachedisable

Thanks Again.

Phil






Rainer Jung-3 wrote:
> 
> On 05.05.2009 22:17, nohacks wrote:
>> 1) Which component should respond to this request, Apache or Tomcat?
>> 
>> Tomcat should answer all. I am not using Apache to server any Static
>> content.
> 
> OK, and I assume you actually checked, that it *is* Tomcat that produces
> the answer in the 404 case.
> 
> I forgot: Do you have the same problem, when using Tomcat directly via
> the HTTP connector without Apache? If so, we should debug it without
> Apache, because then it doesn't have to do with Apache.
> 
>> 2)Which part of your webapps is expected to serve the content for
>> 
>> Tomcat
>> 
>> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
>> 
>> We are using JSF and JBoss Richfaces.
>> 
>> or there is some servlet, which should answer that request dynamically
>> and is not configured right, resp. the servlet producing the page which
>> contains this link produces garbage in the page.
>> 
>> I dont think it is garbage, but you never know right. hahah.
>> 
>> I see it returns a 200 here..
>> 
>> 78.124.0.12 - - [04/May/2009:10:26:27 -0400] "GET
>> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
>> HTTP/1.1" 2001254 "http://www.myAppName.com/login.jsf" "Mozilla/4.0
>> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR
>> 1.1.4322;
>> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
> 
> The missing space after the "200" is due to a copy and paste error? It
> is somewhat misleading, when the most important information in the line
> (the status code) is corrupt.
> 
> Can you call the URL directly, without going through the login.jsf by
> simply entering the long URL into the browser address line?
> 
> The next thing would be to redo the same request, but making sure, that
> there is no session cookie send. So before sending the request and
> before each of the following tests, clean up all cookies in your
> browser. Especially that means do not go via the login page (which will
> likely set the cookie), always use the troubling URL direct.
> 
> Do you also get a 200, when doing the same request without session cookie?
> 
> Then simply add a ";jsessionid=123" at the end of the URL, redo the test
> (without cookie) to check what happens, if you use a session id for a
> non-existing session.
> 
> If you can then reproduce the problem I would assume, that the 404 is
> produced by the JSF component itself.
> 
> Regards,
> 
> Rainer
> 
> ---------------------------------------------------------------------
> 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/I-have-a-problem-with-Apache%2C-Tomcat-tp23322605p23407036.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: I have a problem with Apache, Tomcat

Posted by Rainer Jung <ra...@kippdata.de>.
On 05.05.2009 22:17, nohacks wrote:
> 1) Which component should respond to this request, Apache or Tomcat?
> 
> Tomcat should answer all. I am not using Apache to server any Static
> content.

OK, and I assume you actually checked, that it *is* Tomcat that produces
the answer in the 404 case.

I forgot: Do you have the same problem, when using Tomcat directly via
the HTTP connector without Apache? If so, we should debug it without
Apache, because then it doesn't have to do with Apache.

> 2)Which part of your webapps is expected to serve the content for
> 
> Tomcat
> 
> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
> 
> We are using JSF and JBoss Richfaces.
> 
> or there is some servlet, which should answer that request dynamically
> and is not configured right, resp. the servlet producing the page which
> contains this link produces garbage in the page.
> 
> I dont think it is garbage, but you never know right. hahah.
> 
> I see it returns a 200 here..
> 
> 78.124.0.12 - - [04/May/2009:10:26:27 -0400] "GET
> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
> HTTP/1.1" 2001254 "http://www.myAppName.com/login.jsf" "Mozilla/4.0
> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"

The missing space after the "200" is due to a copy and paste error? It
is somewhat misleading, when the most important information in the line
(the status code) is corrupt.

Can you call the URL directly, without going through the login.jsf by
simply entering the long URL into the browser address line?

The next thing would be to redo the same request, but making sure, that
there is no session cookie send. So before sending the request and
before each of the following tests, clean up all cookies in your
browser. Especially that means do not go via the login page (which will
likely set the cookie), always use the troubling URL direct.

Do you also get a 200, when doing the same request without session cookie?

Then simply add a ";jsessionid=123" at the end of the URL, redo the test
(without cookie) to check what happens, if you use a session id for a
non-existing session.

If you can then reproduce the problem I would assume, that the 404 is
produced by the JSF component itself.

Regards,

Rainer

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


Re: I have a problem with Apache, Tomcat

Posted by André Warnier <aw...@ice-sa.com>.
Caldarale, Charles R wrote:
>> From: nohacks [mailto:philipfwilson@gmail.com]
>> Subject: Re: I have a problem with Apache, Tomcat
>>
>> I am not using Apache to server any Static content.
> 
> That begs the question: why do you have httpd in the game at all?
> 
I knew you'd say that, I was about to do the same.
But I think that the answer is "balancer".

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


RE: I have a problem with Apache, Tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: nohacks [mailto:philipfwilson@gmail.com]
> Subject: RE: I have a problem with Apache, Tomcat
> 
> Apache has better Security and Load balancing for the tomcat cluster.

Security, no.  Load balancing, yes - if you can't afford a real one.

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: I have a problem with Apache, Tomcat

Posted by André Warnier <aw...@ice-sa.com>.
Pid wrote:
> nohacks wrote:
>> Apache has better Security and Load balancing for the tomcat cluster. 
> 
> I'm passing out hard hats & sandbags for anyone who wants one.
> 
Do you also have some flame-retardant and anti-troll spells (or dwarfs) 
in your inventory ?

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


Re: I have a problem with Apache, Tomcat

Posted by Pid <p...@pidster.com>.
nohacks wrote:
> Apache has better Security and Load balancing for the tomcat cluster. 

I'm passing out hard hats & sandbags for anyone who wants one.

p


> Phil
> 
> 
> Caldarale, Charles R wrote:
>>> From: nohacks [mailto:philipfwilson@gmail.com]
>>> Subject: Re: I have a problem with Apache, Tomcat
>>>
>>> I am not using Apache to server any Static content.
>> That begs the question: why do you have httpd in the game at all?
>>
>>  - 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 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: I have a problem with Apache, Tomcat

Posted by nohacks <ph...@gmail.com>.
Apache has better Security and Load balancing for the tomcat cluster. 

Phil


Caldarale, Charles R wrote:
> 
>> From: nohacks [mailto:philipfwilson@gmail.com]
>> Subject: Re: I have a problem with Apache, Tomcat
>> 
>> I am not using Apache to server any Static content.
> 
> That begs the question: why do you have httpd in the game at all?
> 
>  - 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 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/I-have-a-problem-with-Apache%2C-Tomcat-tp23322605p23396481.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: I have a problem with Apache, Tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: nohacks [mailto:philipfwilson@gmail.com]
> Subject: Re: I have a problem with Apache, Tomcat
> 
> I am not using Apache to server any Static content.

That begs the question: why do you have httpd in the game at all?

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: I have a problem with Apache, Tomcat

Posted by nohacks <ph...@gmail.com>.
Hi Rainer,

Thanks very much for your responses. I have your answers below. 

1) Which component should respond to this request, Apache or Tomcat?

Tomcat should answer all. I am not using Apache to server any Static
content.

2)Which part of your webapps is expected to serve the content for

Tomcat

/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf

We are using JSF and JBoss Richfaces.

or there is some servlet, which should answer that request dynamically
and is not configured right, resp. the servlet producing the page which
contains this link produces garbage in the page.

I dont think it is garbage, but you never know right. hahah.

I see it returns a 200 here..

78.124.0.12 - - [04/May/2009:10:26:27 -0400] "GET
/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
HTTP/1.1" 2001254 "http://www.myAppName.com/login.jsf" "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"


Thanks
Phil



Rainer Jung-3 wrote:
> 
> On 05.05.2009 16:12, nohacks wrote:
>> Hi Guys,
>> 
>> Thanks for your feedback with this issue. This has been making me crazy
>> for
>> such a long time.
>> 
>> I have put this in last night and tested. 
>> 
>>    <VirtualHost *:80>
>>         JkMount /*.jsp loadbalancer
>>         JkMount /*.jsf loadbalancer
>>         JkMount /* loadbalancer
>>         JkMount /servlet/* loadbalancer
>> 
>>         JkMount /a4j_3_2_2-SNAPSHOTorg/* loadbalancer
>>         JkStripSession On
>> 
>> 
>> It does not work again. Strange it works for a while then when the
>> session
>> times out there seems to be an issue.
>> 
>> 78.124.0.12 - - [05/May/2009:09:43:51 -0400] "GET /login.jsf HTTP/1.1"
>> 200
>> 3370 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
>> 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR
>> 2.0.50727)"
>> 
>> == 404 here after a 200 ====
>> 
>> 78.124.0.12 - - [05/May/2009:09:43:52 -0400] "GET
>> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=FFC14D3D01CF7F18460147292A996BF8.tomcat3
>> HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0
>> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR
>> 1.1.4322;
>> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
> 
> 1) Which component should respond to this request, Apache or Tomcat? I
> assume Tomcat. Does the right component answer the request? If you don't
> know, add an access log to Tomcat and check, whether the request hits
> Tomcat or not.
> 
> 2) Assuming yo want Tomcat to serve those and your configuration already
> does that right. The URL doesn't really look like a usual static
> content. Which part of your webapps is expected to serve the content for
> 
> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
> 
> If you can't answer that question, discuss with your developers. I
> expect, that this does not refer to static content (a file with the name
> eAF7sqpgb-jyGdIAFrMEaw__.jsf in a folder
> .../richfaces/renderkit/html/css/basic_classes.xcss/DATB/). More likely
> either this URL is totaly wrong and meant to address some static file like
> 
> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss
> 
> or there is some servlet, which should answer that request dynamically
> and is not configured right, resp. the servlet producing the page which
> contains this link produces garbage in the page.
> 
> Regards,
> 
> Rainer
> 
> ---------------------------------------------------------------------
> 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/I-have-a-problem-with-Apache%2C-Tomcat-tp23322605p23395159.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: I have a problem with Apache, Tomcat

Posted by Rainer Jung <ra...@kippdata.de>.
On 05.05.2009 16:12, nohacks wrote:
> Hi Guys,
> 
> Thanks for your feedback with this issue. This has been making me crazy for
> such a long time.
> 
> I have put this in last night and tested. 
> 
>    <VirtualHost *:80>
>         JkMount /*.jsp loadbalancer
>         JkMount /*.jsf loadbalancer
>         JkMount /* loadbalancer
>         JkMount /servlet/* loadbalancer
> 
>         JkMount /a4j_3_2_2-SNAPSHOTorg/* loadbalancer
>         JkStripSession On
> 
> 
> It does not work again. Strange it works for a while then when the session
> times out there seems to be an issue.
> 
> 78.124.0.12 - - [05/May/2009:09:43:51 -0400] "GET /login.jsf HTTP/1.1" 200
> 3370 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
> 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
> 
> == 404 here after a 200 ====
> 
> 78.124.0.12 - - [05/May/2009:09:43:52 -0400] "GET
> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=FFC14D3D01CF7F18460147292A996BF8.tomcat3
> HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0
> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"

1) Which component should respond to this request, Apache or Tomcat? I
assume Tomcat. Does the right component answer the request? If you don't
know, add an access log to Tomcat and check, whether the request hits
Tomcat or not.

2) Assuming yo want Tomcat to serve those and your configuration already
does that right. The URL doesn't really look like a usual static
content. Which part of your webapps is expected to serve the content for

/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf

If you can't answer that question, discuss with your developers. I
expect, that this does not refer to static content (a file with the name
eAF7sqpgb-jyGdIAFrMEaw__.jsf in a folder
.../richfaces/renderkit/html/css/basic_classes.xcss/DATB/). More likely
either this URL is totaly wrong and meant to address some static file like

/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss

or there is some servlet, which should answer that request dynamically
and is not configured right, resp. the servlet producing the page which
contains this link produces garbage in the page.

Regards,

Rainer

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


Re: I have a problem with Apache, Tomcat

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

Phil,

On 5/5/2009 10:12 AM, nohacks wrote:
> I have put this in last night and tested. 
> 
>    <VirtualHost *:80>
>         JkMount /*.jsp loadbalancer
>         JkMount /*.jsf loadbalancer
>         JkMount /* loadbalancer
>         JkMount /servlet/* loadbalancer
> 
>         JkMount /a4j_3_2_2-SNAPSHOTorg/* loadbalancer
>         JkStripSession On

This really should work. Are you sure this configuration is being used?
Since you have /a4j_3_2_2-SNAPSHOTorg/* mounted, you shouldn't be
getting these errors:

> 78.124.0.12 - - [05/May/2009:09:43:52 -0400] "GET
> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=FFC14D3D01CF7F18460147292A996BF8.tomcat3
> HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0
> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"

Can you confirm that Tomcat never receives this request? Use the
AccessLogValve to get a logfile similar to the httpd one and observe
them in tandem.

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

iEYEARECAAYFAkoAXnsACgkQ9CaO5/Lv0PBr7QCfSfZdbl30j9uQ+xsL79FjgHvR
f0gAnRcwPg78k69HBiIckk7jnZQDGIgh
=tW2S
-----END PGP SIGNATURE-----

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


Re: I have a problem with Apache, Tomcat

Posted by nohacks <ph...@gmail.com>.
Hi Guys,

Thanks for your feedback with this issue. This has been making me crazy for
such a long time.

I have put this in last night and tested. 

   <VirtualHost *:80>
        JkMount /*.jsp loadbalancer
        JkMount /*.jsf loadbalancer
        JkMount /* loadbalancer
        JkMount /servlet/* loadbalancer

        JkMount /a4j_3_2_2-SNAPSHOTorg/* loadbalancer
        JkStripSession On


It does not work again. Strange it works for a while then when the session
times out there seems to be an issue.

78.124.0.12 - - [05/May/2009:09:43:51 -0400] "GET /login.jsf HTTP/1.1" 200
3370 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"

== 404 here after a 200 ====

78.124.0.12 - - [05/May/2009:09:43:52 -0400] "GET
/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=FFC14D3D01CF7F18460147292A996BF8.tomcat3
HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [05/May/2009:09:43:52 -0400] "GET
/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=FFC14D3D01CF7F18460147292A996BF8.tomcat3
HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [05/May/2009:09:43:52 -0400] "GET /css/stylesheet.css
HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [05/May/2009:09:43:52 -0400] "GET /js/jquery-1.2.3.pack.js
HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [05/May/2009:09:43:53 -0400] "GET
/js/jquery.jcarousel.pack.js HTTP/1.1" 304 -
"http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0;
FDM; .NET CLR 2.0.50727)"


I am going to try the 
RewriteRule /contextPath/(.*);jsessionid=[0-9A-Z]*(.*)
/path/to/webapps/contextPath/$1$2 [L] 

I will let you know how it goes. 

Fell free to add anything you might have thought of to this thread. All is
appreciated.

Thanks
Phil




Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> André,
> 
> On 5/4/2009 1:50 PM, André Warnier wrote:
>> I was not quite convinced by Chris's explanation, so I tested this by
>> myself.
> 
> [snip]
> 
>> So, despite my initial scepticism (for which I apologise), Chris turns
>> out to be right.
> 
> Sometimes it's goog to convince yourself of something, rather than
> accepting it as fact. That's always a good advice with statements made
> on this list (and on the Internet in general). No offense taken.
> 
>> I don't think that mod_jk, even with the "JkStripSession" parameter on,
>> will scan each page returned by Tomcat, and /in the content/ change
>> these links to remove the ";jsessionid=..." part.
> 
> It does not have to. The links are only a problem when the web server
> attempts to service them. If the ";jsessionid=..." is stripped-away
> before the files are located, then everything is okay.
> 
>> So the questions would be :
>> 1) /why/ does the page returned by Tomcat contain the embedded  
>> tags with a "....;jsessionid=...." URI ?
>> What puts that jession-id there ?
> 
> All URLs should be run through HttpServletResponse.encodeURL, which adds
> the ";jsessionid=..." if the container isn't sure that the client
> supports cookies. This allows sessions to be used even if cookies are
> unavailable. It's also required by the Servlet Spec.
> 
>> OR
>> 2) what makes it so that when Tomcat returns that page, Apache+mod_jk
>> think that this css URI does /not/ have to be forwarded to Tomcat ?
> 
> The OP never set *.css to be served by Tomcat. Had this been the case,
> everything would have been okay, since Tomcat knows how to use the
> ";jsessionid=..." parameter (and also knows how to ignore it properly,
> thank you very much httpd!).
> 
>> There must be, at the Apache level, a rogue JkUnMount or SetEnvIf no_jk
>> rule that interferes there, in the sense of not being quite smart enough
>> to know that this link /should/ be forwarded to Tomcat.
>> 
>> And if it should /not/ be forwarded to Tomcat after all, then you should
>> use a smart RewriteRule that will strip the ";jsessionid.." from these
>> URI's, before Apache attempts to find them locally.
> 
> FWIW that rule is this:
> 
> RewriteRule /contextPath/(.*);jsessionid=[0-9A-Z]*(.*)
> /path/to/webapps/contextPath/$1$2 [L]
> 
> (I've been around this particular block several times. Bless Rainer and
> Mladen for adding JKStripSession!).
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkn/UWMACgkQ9CaO5/Lv0PBBugCcDCCMSVpYGWwnD8zT9zXI01kV
> 8pcAoL+6BkMfZHc06JImiWhvaSnobUg9
> =n6KO
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> 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/I-have-a-problem-with-Apache%2C-Tomcat-tp23322605p23387754.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: I have a problem with Apache, Tomcat

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

André,

On 5/4/2009 1:50 PM, André Warnier wrote:
> I was not quite convinced by Chris's explanation, so I tested this by
> myself.

[snip]

> So, despite my initial scepticism (for which I apologise), Chris turns
> out to be right.

Sometimes it's goog to convince yourself of something, rather than
accepting it as fact. That's always a good advice with statements made
on this list (and on the Internet in general). No offense taken.

> I don't think that mod_jk, even with the "JkStripSession" parameter on,
> will scan each page returned by Tomcat, and /in the content/ change
> these links to remove the ";jsessionid=..." part.

It does not have to. The links are only a problem when the web server
attempts to service them. If the ";jsessionid=..." is stripped-away
before the files are located, then everything is okay.

> So the questions would be :
> 1) /why/ does the page returned by Tomcat contain the embedded <img>
> tags with a "....;jsessionid=...." URI ?
> What puts that jession-id there ?

All URLs should be run through HttpServletResponse.encodeURL, which adds
the ";jsessionid=..." if the container isn't sure that the client
supports cookies. This allows sessions to be used even if cookies are
unavailable. It's also required by the Servlet Spec.

> OR
> 2) what makes it so that when Tomcat returns that page, Apache+mod_jk
> think that this css URI does /not/ have to be forwarded to Tomcat ?

The OP never set *.css to be served by Tomcat. Had this been the case,
everything would have been okay, since Tomcat knows how to use the
";jsessionid=..." parameter (and also knows how to ignore it properly,
thank you very much httpd!).

> There must be, at the Apache level, a rogue JkUnMount or SetEnvIf no_jk
> rule that interferes there, in the sense of not being quite smart enough
> to know that this link /should/ be forwarded to Tomcat.
> 
> And if it should /not/ be forwarded to Tomcat after all, then you should
> use a smart RewriteRule that will strip the ";jsessionid.." from these
> URI's, before Apache attempts to find them locally.

FWIW that rule is this:

RewriteRule /contextPath/(.*);jsessionid=[0-9A-Z]*(.*)
/path/to/webapps/contextPath/$1$2 [L]

(I've been around this particular block several times. Bless Rainer and
Mladen for adding JKStripSession!).

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

iEYEARECAAYFAkn/UWMACgkQ9CaO5/Lv0PBBugCcDCCMSVpYGWwnD8zT9zXI01kV
8pcAoL+6BkMfZHc06JImiWhvaSnobUg9
=n6KO
-----END PGP SIGNATURE-----

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


Re: I have a problem with Apache, Tomcat

Posted by Rainer Jung <ra...@kippdata.de>.
On 04.05.2009 19:50, André Warnier wrote:
> Hi Chris too, and hi nohacks.
> 
> I was not quite convinced by Chris's explanation, so I tested this by
> myself.
> Apache httpd 2.2.3
> mod_jk 1.2.18  (quite old)
> Tomcat 5.5.27
> 
> In my case, URI's starting with /starweb are being redirected to Tomcat
> by mod_jk (corresponding to the OP's case "/myapp").
> I also set the JkLogLevel to "debug" for this test.
> 
> Then I accessed a URI that is re-directed to Tomcat, but fetches a
> static html page there (that same page does not exist under Apache
> httpd's DocumentRoot):
> http://myhost/starweb/starlog4_example_static.html
> 
> That worked fine of course, delivered by Tomcat.
> Then I added a dummy jsessionid to the URI, as follows :
> http://myhost/starweb/starlog4_example_static.html;jsessionid=blabla
> and tried again.
> That also returned the page from Tomcat, no problem.
> 
> In the mod_jk logfile, I find this (edited, because there is at lot more
> at the debug level) :
> 
> [Mon May 04 19:03:28 2009] [7189:47328] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (502): Removing Session path
> ';jsessionid=blabla' URI '/starweb/starlog4_example_static.html'
> [Mon May 04 19:03:28 2009] [7189:47328] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (508): Attempting to map URI
> '/starweb/starlog4_example_static.html;jsessionid=blabla' from 13 maps
> [Mon May 04 19:03:28 2009] [7189:47328] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (520): Attempting to map context
> URI '/servlets-examples/*'
> [Mon May 04 19:03:28 2009] [7189:47328] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (520): Attempting to map context
> URI '/starweb/*'
> [Mon May 04 19:03:28 2009] [7189:47328] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (534): Found a wildchar match
> ajp13 -> /starweb/*
> [Mon May 04 19:03:28 2009] [7189:47328] [debug] jk_handler::mod_jk.c
> (1832): Into handler jakarta-servlet worker=ajp13 r->proxyreq=0
> [Mon May 04 19:03:28 2009] [7189:47328] [debug]
> wc_get_worker_for_name::jk_worker.c (111): found a worker ajp13
> [Mon May 04 19:03:28 2009] [7189:47328] [debug] wc_maintain::jk_worker.c
> (301): Maintaining worker ajp13
> [Mon May 04 19:03:28 2009] [7189:47328] [debug]
> init_ws_service::mod_jk.c (531): Service protocol=HTTP/1.1 method=GET
> host=(null) addrr=192.168.245.129 name=myhost.company.com port=80
> auth=(null) user=(null) laddr=192.168.245.20 raddr=192.168.245.129
> [Mon May 04 19:03:28 2009] [7189:47328] [debug]
> 
> etc... (the rest shows the page being returned by Tomcat)
> 
> So, the above works, and at least for URI's supposed to be forwarded to
> Tomcat, nor Apache httpd nor mod_jk are confused by the ";jessionid="
> appendix to the URI.
> It's also interesting to note that mod_jk, when it is called by Apache
> to examine this URI and see if it wants to handle it, is smart enough to
> first remove the "jsessionid=xxx" portion, before comparing the URI to
> its list of things to forward.
> 
> Then I tried to access a document which is not redirected to Tomcat, but
> located under Apache httpd's DocumentRoot :
> http://myhost/starlog4.html
> 
> That worked also fine, and was delivered by Apache httpd.
> Then I added a "jsessionid" attribute to this request :
> 
> http://myhost/starlog4.html;jsessionid=blabla
> 
> and then Apache httpd indeed returned a "404 Not found" error.
> So, despite my initial scepticism (for which I apologise), Chris turns
> out to be right.
> 
> The Apache error log shows :
> [Mon May 04 19:21:16 2009] [error] [client 192.168.245.129] File does
> not exist: /var/www/develop/starlog4.html;jsessionid=blabla
> 
> So indeed, the error is caused by (carefully, one item at a time) :
> 
> - the browser accesses the Tomcat application
> - the Tomcat application returns a page (login.jsf), *in which* there is
> a link to
> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=7B8278D155437DE625509198918C08D4.tomcat2
> 
> - the browser thus issues a request to Apache to obtain this file
> - somehow Apache + mod_jk do not thing that this URI should be forwarded
> to Apache, so Apache tries to serve it itself

(forwarded to Apache -> forwarded to Tomcat)

> - and it does not find this object under its DocumentRoot and thus
> returns a 404.
> 
> I don't think that mod_jk, even with the "JkStripSession" parameter on,
> will scan each page returned by Tomcat, and /in the content/ change
> these links to remove the ";jsessionid=..." part.

No, it does not scan the content, but it does check requests and
manipulates them.

With JkStripSession On it will try to remove every ";jsessionid=..."
from the request URIs it does not forward to Tomcat, so that Apache
itself has a chance to find them. This is used e.g. when you put part of
your webap content to the fronting Apache and then use JkUnmount to let
Apache handle them. When you use URL encoded sessions instead of
Cookies, it could happen, that the encoding is also done for static
contenht, and JkStripSession will remove it.

In debug log it will log:

    "no match for ... found",
    "removing session identifier [...] for non servlet url [...]"

> So the questions would be :
> 1) /why/ does the page returned by Tomcat contain the embedded <img>
> tags with a "....;jsessionid=...." URI ?
> What puts that jession-id there ?
> OR
> 2) what makes it so that when Tomcat returns that page, Apache+mod_jk
> think that this css URI does /not/ have to be forwarded to Tomcat ?
> 
> There must be, at the Apache level, a rogue JkUnMount or SetEnvIf no_jk
> rule that interferes there, in the sense of not being quite smart enough
> to know that this link /should/ be forwarded to Tomcat.
> 
> And if it should /not/ be forwarded to Tomcat after all, then you should
> use a smart RewriteRule that will strip the ";jsessionid.." from these
> URI's, before Apache attempts to find them locally.

I didn't go through all of this discussion thread, but yes, f a 404 is
returned, one would first determine, whether it comes form Tomcat or
Apache (e.g. by activating Tomcat access log and checking whether the
request hits Tomcat or stays on Apache), then one would decide, whether
the system serving the request is actually the system one wants to serve
the request, and finally one would find out, why it returns 404.

Example 1: request served by Apache, but Tomcat should serve it: Check
mounting and unmounting rules
Example 2: request served by Apache as wanted, but unfortunately a 404
is returned: first send the request without the triling ;jsessionid=....
If this also returns a 404, the question is, how Apache is configured
and why it doesn't find the content. If this works and the request
including the ;jsessionid does not work, set JkStripSession On and
repeat the test. If it doesn't work, look at the mod_jk debug log for
the above logging lines and also at the Apache error log.

Regards,

Rainer

> nohacks wrote:
>> Hi Chris,
>>
>> I downloaded the new version of mod_jk
>>
>> http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.28/i586/
>>
>>
>> [   ] mod_jk-1.2.28-httpd-2.2.X.so                              
>> 21-Mar-2009 23:53  676K 
>> I am still having the same issues as you can see...
>>
>> Any ideal what is going on here??
>>
>> Thanks
>> Phil
>>
>>
>>
>> 78.124.0.12 - - [04/May/2009:11:24:32 -0400] "GET /login.jsf HTTP/1.1"
>> 200
>> 3370 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
>> 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR
>> 2.0.50727)"
>>
>> ============  404 here  ===============
>>
>> 78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET
>> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=7B8278D155437DE625509198918C08D4.tomcat2
>>
>> HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0
>> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR
>> 1.1.4322;
>> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
>>
>> ============  404 here  ===============
>>
>> 78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET
>> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=7B8278D155437DE625509198918C08D4.tomcat2
>>
>> HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0
>> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR
>> 1.1.4322;
>> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
>> 78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET /css/stylesheet.css
>> HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0
>> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR
>> 1.1.4322;
>> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
>> 78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET
>> /js/jquery-1.2.3.pack.js
>> HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0
>> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR
>> 1.1.4322;
>> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
>> 78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET
>> /js/jquery.jcarousel.pack.js HTTP/1.1" 304 -
>> "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0;
>> Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC
>> 4.0;
>> FDM; .NET CLR 2.0.50727)"
>> 78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET
>> /css/jquery.jcarousel.css
>> HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0
>> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR
>> 1.1.4322;
>> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
>> 78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET /css/skin.css HTTP/1.1"
>> 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE
>> 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media
>> Center PC
>> 4.0; FDM; .NET CLR 2.0.50727)"
>> 78.124.0.12 - - [04/May/2009:11:24:34 -0400] "GET
>> /images/prev-horizontal.png HTTP/1.1" 304 -
>> "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0;
>> Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC
>> 4.0;
>> FDM; .NET CLR 2.0.50727)"
>> 78.124.0.12 - - [04/May/2009:11:24:34 -0400] "GET
>> /images/next-horizontal.png HTTP/1.1" 304 -
>> "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0;
>> Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC
>> 4.0;
>> FDM; .NET CLR 2.0.50727)"
>> 78.124.0.12 - - [04/May/2009:11:24:42 -0400] "POST
>> /login.jsf;jsessionid=7B8278D155437DE625509198918C08D4.tomcat2
>> HTTP/1.1" 404
>> 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE
>> 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media
>> Center PC
>> 4.0; FDM; .NET CLR 2.0.50727)"
>>
>>
>>
>>
>> nohacks wrote:
>>> Hi Chris,
>>>
>>> Thanks for your reply. I have JkStripSession on and still having the
>>> issue.
>>> Any help is really appreciated. I have had this issues for a long
>>> time now
>>> and it is a Huge Issue for us !!
>>> This is my httpd.conf file.
>>>
>>> ==================================
>>> LoadModule jk_module
>>> /usr/lib/apache2/modules/mod_jk-1.2.27-httpd-2.2.6.so
>>>
>>> JkStripSession On
>>>
>>> JkMount /*.jsp loadbalancer
>>> JkMount /*.jsf loadbalancer
>>>
>>> # JkMount /*.jsp ajp13
>>> # JkMount /*.jsf ajp13
>>>
>>> JkWorkersFile workers.properties
>>> JkShmFile     /var/log/httpd/mod_jk.shm
>>> JkLogFile /opt/apache2log/mod_jk.log
>>>
>>> # JkLogLevel    info
>>>
>>> JkLogLevel    debug
>>>
>>> JkOptions     +ForwardURIEscaped
>>> JkOptions     +ForwardDirectories
>>>
>>> FileETag None
>>>
>>> ExpiresDefault "access plus 4 weeks"
>>>
>>> # 480 weeks
>>> <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
>>> Header set Cache-Control "max-age=490304000, public"
>>> </FilesMatch>
>>>
>>> ExpiresActive On
>>> ExpiresByType image/gif A2592000
>>> ExpiresByType image/png A2592000
>>> ExpiresByType image/jpg A2592000
>>> ExpiresByType image/jpeg A2592000
>>>
>>> =========== end of httpd.conf ===========
>>>
>>>
>>>
>>>
>>> Christopher Schultz-2 wrote:
> Nohacks,
> 
> On 4/30/2009 4:18 PM, nohacks wrote:
>>>>>> You can see from my logs that apache returns a 200 for my login page
>>>>>> then
>>>>>> returns a 404 from
>>>>>>
>>>>>> It seems to be an issue now and then. It works for a while then it
>>>>>> tosses a
>>>>>> 404. Maybe after a timeout I really dont know...Hard to recreate.
>>>>>> but my
>>>>>> logs are full of 404 jsessionid issues...
> I can tell you how to recreate it:
> 
> 1. Log out of your application
> 2. Go to the login page
> 
> Result: your httpd logs are full of 404 errors for things like
> mystylesheet.css;jsessionid=32456789 and
> myloginimage.png;jsessionid=32456789.
> 
> The problem is that httpd thinks the ";jsesionid" is part of the
> path of
> the resource, instead of a parameter. You can fix this either with
> mod_rewrite (which is a bit heavy-handed) or you can use
> 
> JkStripSession On
> 
> if you are using a reasonably recent version of mod_jk.
> 
> Hope that helps,
> -chris
>>>>
---------------------------------------------------------------------
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: I have a problem with Apache, Tomcat

Posted by André Warnier <aw...@ice-sa.com>.
Hi Chris too, and hi nohacks.

I was not quite convinced by Chris's explanation, so I tested this by 
myself.
Apache httpd 2.2.3
mod_jk 1.2.18  (quite old)
Tomcat 5.5.27

In my case, URI's starting with /starweb are being redirected to Tomcat 
by mod_jk (corresponding to the OP's case "/myapp").
I also set the JkLogLevel to "debug" for this test.

Then I accessed a URI that is re-directed to Tomcat, but fetches a 
static html page there (that same page does not exist under Apache 
httpd's DocumentRoot):
http://myhost/starweb/starlog4_example_static.html

That worked fine of course, delivered by Tomcat.
Then I added a dummy jsessionid to the URI, as follows :
http://myhost/starweb/starlog4_example_static.html;jsessionid=blabla
and tried again.
That also returned the page from Tomcat, no problem.

In the mod_jk logfile, I find this (edited, because there is at lot more 
at the debug level) :

[Mon May 04 19:03:28 2009] [7189:47328] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (502): Removing Session path 
';jsessionid=blabla' URI '/starweb/starlog4_example_static.html'
[Mon May 04 19:03:28 2009] [7189:47328] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (508): Attempting to map URI 
'/starweb/starlog4_example_static.html;jsessionid=blabla' from 13 maps
[Mon May 04 19:03:28 2009] [7189:47328] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (520): Attempting to map context 
URI '/servlets-examples/*'
[Mon May 04 19:03:28 2009] [7189:47328] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (520): Attempting to map context 
URI '/starweb/*'
[Mon May 04 19:03:28 2009] [7189:47328] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (534): Found a wildchar match 
ajp13 -> /starweb/*
[Mon May 04 19:03:28 2009] [7189:47328] [debug] jk_handler::mod_jk.c 
(1832): Into handler jakarta-servlet worker=ajp13 r->proxyreq=0
[Mon May 04 19:03:28 2009] [7189:47328] [debug] 
wc_get_worker_for_name::jk_worker.c (111): found a worker ajp13
[Mon May 04 19:03:28 2009] [7189:47328] [debug] wc_maintain::jk_worker.c 
(301): Maintaining worker ajp13
[Mon May 04 19:03:28 2009] [7189:47328] [debug] 
init_ws_service::mod_jk.c (531): Service protocol=HTTP/1.1 method=GET 
host=(null) addrr=192.168.245.129 name=myhost.company.com port=80 
auth=(null) user=(null) laddr=192.168.245.20 raddr=192.168.245.129
[Mon May 04 19:03:28 2009] [7189:47328] [debug]

etc... (the rest shows the page being returned by Tomcat)

So, the above works, and at least for URI's supposed to be forwarded to 
Tomcat, nor Apache httpd nor mod_jk are confused by the ";jessionid=" 
appendix to the URI.
It's also interesting to note that mod_jk, when it is called by Apache 
to examine this URI and see if it wants to handle it, is smart enough to 
first remove the "jsessionid=xxx" portion, before comparing the URI to 
its list of things to forward.

Then I tried to access a document which is not redirected to Tomcat, but 
located under Apache httpd's DocumentRoot :
http://myhost/starlog4.html

That worked also fine, and was delivered by Apache httpd.
Then I added a "jsessionid" attribute to this request :

http://myhost/starlog4.html;jsessionid=blabla

and then Apache httpd indeed returned a "404 Not found" error.
So, despite my initial scepticism (for which I apologise), Chris turns 
out to be right.

The Apache error log shows :
[Mon May 04 19:21:16 2009] [error] [client 192.168.245.129] File does 
not exist: /var/www/develop/starlog4.html;jsessionid=blabla

So indeed, the error is caused by (carefully, one item at a time) :

- the browser accesses the Tomcat application
- the Tomcat application returns a page (login.jsf), *in which* there is 
a link to
/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=7B8278D155437DE625509198918C08D4.tomcat2
- the browser thus issues a request to Apache to obtain this file
- somehow Apache + mod_jk do not thing that this URI should be forwarded 
to Apache, so Apache tries to serve it itself
- and it does not find this object under its DocumentRoot and thus 
returns a 404.

I don't think that mod_jk, even with the "JkStripSession" parameter on, 
will scan each page returned by Tomcat, and /in the content/ change 
these links to remove the ";jsessionid=..." part.

So the questions would be :
1) /why/ does the page returned by Tomcat contain the embedded <img> 
tags with a "....;jsessionid=...." URI ?
What puts that jession-id there ?
OR
2) what makes it so that when Tomcat returns that page, Apache+mod_jk 
think that this css URI does /not/ have to be forwarded to Tomcat ?

There must be, at the Apache level, a rogue JkUnMount or SetEnvIf no_jk 
rule that interferes there, in the sense of not being quite smart enough 
to know that this link /should/ be forwarded to Tomcat.

And if it should /not/ be forwarded to Tomcat after all, then you should 
use a smart RewriteRule that will strip the ";jsessionid.." from these 
URI's, before Apache attempts to find them locally.





nohacks wrote:
> Hi Chris,
> 
> I downloaded the new version of mod_jk
> 
> http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.28/i586/
> 
> [   ] mod_jk-1.2.28-httpd-2.2.X.so                               
> 21-Mar-2009 23:53  676K  
> 
> I am still having the same issues as you can see...
> 
> Any ideal what is going on here??
> 
> Thanks
> Phil
> 
> 
> 
> 78.124.0.12 - - [04/May/2009:11:24:32 -0400] "GET /login.jsf HTTP/1.1" 200
> 3370 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
> 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
> 
> ============  404 here  ===============
> 
> 78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET
> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=7B8278D155437DE625509198918C08D4.tomcat2
> HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0
> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
> 
> ============  404 here  ===============
> 
> 78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET
> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=7B8278D155437DE625509198918C08D4.tomcat2
> HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0
> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
> 78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET /css/stylesheet.css
> HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0
> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
> 78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET /js/jquery-1.2.3.pack.js
> HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0
> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
> 78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET
> /js/jquery.jcarousel.pack.js HTTP/1.1" 304 -
> "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0;
> Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0;
> FDM; .NET CLR 2.0.50727)"
> 78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET /css/jquery.jcarousel.css
> HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0
> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
> 78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET /css/skin.css HTTP/1.1"
> 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE
> 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC
> 4.0; FDM; .NET CLR 2.0.50727)"
> 78.124.0.12 - - [04/May/2009:11:24:34 -0400] "GET
> /images/prev-horizontal.png HTTP/1.1" 304 -
> "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0;
> Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0;
> FDM; .NET CLR 2.0.50727)"
> 78.124.0.12 - - [04/May/2009:11:24:34 -0400] "GET
> /images/next-horizontal.png HTTP/1.1" 304 -
> "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0;
> Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0;
> FDM; .NET CLR 2.0.50727)"
> 78.124.0.12 - - [04/May/2009:11:24:42 -0400] "POST
> /login.jsf;jsessionid=7B8278D155437DE625509198918C08D4.tomcat2 HTTP/1.1" 404
> 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE
> 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC
> 4.0; FDM; .NET CLR 2.0.50727)"
> 
> 
> 
> 
> nohacks wrote:
>> Hi Chris,
>>
>> Thanks for your reply. I have JkStripSession on and still having the
>> issue. 
>>
>> Any help is really appreciated. I have had this issues for a long time now
>> and it is a Huge Issue for us !! 
>>
>> This is my httpd.conf file.
>>
>> ==================================
>> LoadModule jk_module /usr/lib/apache2/modules/mod_jk-1.2.27-httpd-2.2.6.so
>>
>> JkStripSession On
>>
>> JkMount /*.jsp loadbalancer
>> JkMount /*.jsf loadbalancer
>>
>> # JkMount /*.jsp ajp13
>> # JkMount /*.jsf ajp13
>>
>> JkWorkersFile workers.properties
>> JkShmFile     /var/log/httpd/mod_jk.shm
>> JkLogFile /opt/apache2log/mod_jk.log
>>
>> # JkLogLevel    info
>>
>> JkLogLevel    debug
>>
>> JkOptions     +ForwardURIEscaped
>> JkOptions     +ForwardDirectories
>>
>> FileETag None
>>
>> ExpiresDefault "access plus 4 weeks"
>>
>> # 480 weeks
>> <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
>> Header set Cache-Control "max-age=490304000, public"
>> </FilesMatch>
>>
>> ExpiresActive On
>> ExpiresByType image/gif A2592000
>> ExpiresByType image/png A2592000
>> ExpiresByType image/jpg A2592000
>> ExpiresByType image/jpeg A2592000
>>
>> =========== end of httpd.conf ===========
>>
>>
>>
>>
>> Christopher Schultz-2 wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Nohacks,
>>>
>>> On 4/30/2009 4:18 PM, nohacks wrote:
>>>> You can see from my logs that apache returns a 200 for my login page
>>>> then
>>>> returns a 404 from
>>>>
>>>> It seems to be an issue now and then. It works for a while then it
>>>> tosses a
>>>> 404. Maybe after a timeout I really dont know...Hard to recreate. but my
>>>> logs are full of 404 jsessionid issues...
>>> I can tell you how to recreate it:
>>>
>>> 1. Log out of your application
>>> 2. Go to the login page
>>>
>>> Result: your httpd logs are full of 404 errors for things like
>>> mystylesheet.css;jsessionid=32456789 and
>>> myloginimage.png;jsessionid=32456789.
>>>
>>> The problem is that httpd thinks the ";jsesionid" is part of the path of
>>> the resource, instead of a parameter. You can fix this either with
>>> mod_rewrite (which is a bit heavy-handed) or you can use
>>>
>>> JkStripSession On
>>>
>>> if you are using a reasonably recent version of mod_jk.
>>>
>>> Hope that helps,
>>> - -chris
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.9 (MingW32)
>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>>
>>> iEYEARECAAYFAkn7UTEACgkQ9CaO5/Lv0PDwwgCcCjjHgsZI6oSDizZPpPxgMoD7
>>> d+4An1SWaF/2Q32jyK2DiULpvPRWB4Hn
>>> =iKFe
>>> -----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: I have a problem with Apache, Tomcat

Posted by nohacks <ph...@gmail.com>.
Hi Chris,

I downloaded the new version of mod_jk

http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.28/i586/

[   ] mod_jk-1.2.28-httpd-2.2.X.so                               
21-Mar-2009 23:53  676K  

I am still having the same issues as you can see...

Any ideal what is going on here??

Thanks
Phil



78.124.0.12 - - [04/May/2009:11:24:32 -0400] "GET /login.jsf HTTP/1.1" 200
3370 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"

============  404 here  ===============

78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET
/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=7B8278D155437DE625509198918C08D4.tomcat2
HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"

============  404 here  ===============

78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET
/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=7B8278D155437DE625509198918C08D4.tomcat2
HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET /css/stylesheet.css
HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET /js/jquery-1.2.3.pack.js
HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET
/js/jquery.jcarousel.pack.js HTTP/1.1" 304 -
"http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0;
FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET /css/jquery.jcarousel.css
HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [04/May/2009:11:24:33 -0400] "GET /css/skin.css HTTP/1.1"
304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE
7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC
4.0; FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [04/May/2009:11:24:34 -0400] "GET
/images/prev-horizontal.png HTTP/1.1" 304 -
"http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0;
FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [04/May/2009:11:24:34 -0400] "GET
/images/next-horizontal.png HTTP/1.1" 304 -
"http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0;
FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [04/May/2009:11:24:42 -0400] "POST
/login.jsf;jsessionid=7B8278D155437DE625509198918C08D4.tomcat2 HTTP/1.1" 404
7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE
7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC
4.0; FDM; .NET CLR 2.0.50727)"




nohacks wrote:
> 
> Hi Chris,
> 
> Thanks for your reply. I have JkStripSession on and still having the
> issue. 
> 
> Any help is really appreciated. I have had this issues for a long time now
> and it is a Huge Issue for us !! 
> 
> This is my httpd.conf file.
> 
> ==================================
> LoadModule jk_module /usr/lib/apache2/modules/mod_jk-1.2.27-httpd-2.2.6.so
> 
> JkStripSession On
> 
> JkMount /*.jsp loadbalancer
> JkMount /*.jsf loadbalancer
> 
> # JkMount /*.jsp ajp13
> # JkMount /*.jsf ajp13
> 
> JkWorkersFile workers.properties
> JkShmFile     /var/log/httpd/mod_jk.shm
> JkLogFile /opt/apache2log/mod_jk.log
> 
> # JkLogLevel    info
> 
> JkLogLevel    debug
> 
> JkOptions     +ForwardURIEscaped
> JkOptions     +ForwardDirectories
> 
> FileETag None
> 
> ExpiresDefault "access plus 4 weeks"
> 
> # 480 weeks
> <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
> Header set Cache-Control "max-age=490304000, public"
> </FilesMatch>
> 
> ExpiresActive On
> ExpiresByType image/gif A2592000
> ExpiresByType image/png A2592000
> ExpiresByType image/jpg A2592000
> ExpiresByType image/jpeg A2592000
> 
> =========== end of httpd.conf ===========
> 
> 
> 
> 
> Christopher Schultz-2 wrote:
>> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> 
>> Nohacks,
>> 
>> On 4/30/2009 4:18 PM, nohacks wrote:
>>> You can see from my logs that apache returns a 200 for my login page
>>> then
>>> returns a 404 from
>>> 
>>> It seems to be an issue now and then. It works for a while then it
>>> tosses a
>>> 404. Maybe after a timeout I really dont know...Hard to recreate. but my
>>> logs are full of 404 jsessionid issues...
>> 
>> I can tell you how to recreate it:
>> 
>> 1. Log out of your application
>> 2. Go to the login page
>> 
>> Result: your httpd logs are full of 404 errors for things like
>> mystylesheet.css;jsessionid=32456789 and
>> myloginimage.png;jsessionid=32456789.
>> 
>> The problem is that httpd thinks the ";jsesionid" is part of the path of
>> the resource, instead of a parameter. You can fix this either with
>> mod_rewrite (which is a bit heavy-handed) or you can use
>> 
>> JkStripSession On
>> 
>> if you are using a reasonably recent version of mod_jk.
>> 
>> Hope that helps,
>> - -chris
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.9 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>> 
>> iEYEARECAAYFAkn7UTEACgkQ9CaO5/Lv0PDwwgCcCjjHgsZI6oSDizZPpPxgMoD7
>> d+4An1SWaF/2Q32jyK2DiULpvPRWB4Hn
>> =iKFe
>> -----END PGP SIGNATURE-----
>> 
>> ---------------------------------------------------------------------
>> 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/I-have-a-problem-with-Apache%2C-Tomcat-tp23322605p23370770.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: I have a problem with Apache, Tomcat

Posted by nohacks <ph...@gmail.com>.
Hi Chris,

Thanks for your reply. I have JkStripSession on and still having the issue. 

Any help is really appreciated. I have had this issues for a long time now
and it is a Huge Issue for us !! 

This is my httpd.conf file.

==================================
LoadModule jk_module /usr/lib/apache2/modules/mod_jk-1.2.27-httpd-2.2.6.so

JkStripSession On

JkMount /*.jsp loadbalancer
JkMount /*.jsf loadbalancer

# JkMount /*.jsp ajp13
# JkMount /*.jsf ajp13

JkWorkersFile workers.properties
JkShmFile     /var/log/httpd/mod_jk.shm
JkLogFile /opt/apache2log/mod_jk.log

# JkLogLevel    info

JkLogLevel    debug

JkOptions     +ForwardURIEscaped
JkOptions     +ForwardDirectories

FileETag None

ExpiresDefault "access plus 4 weeks"

# 480 weeks
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=490304000, public"
</FilesMatch>

ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000

=========== end of httpd.conf ===========




Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Nohacks,
> 
> On 4/30/2009 4:18 PM, nohacks wrote:
>> You can see from my logs that apache returns a 200 for my login page then
>> returns a 404 from
>> 
>> It seems to be an issue now and then. It works for a while then it tosses
>> a
>> 404. Maybe after a timeout I really dont know...Hard to recreate. but my
>> logs are full of 404 jsessionid issues...
> 
> I can tell you how to recreate it:
> 
> 1. Log out of your application
> 2. Go to the login page
> 
> Result: your httpd logs are full of 404 errors for things like
> mystylesheet.css;jsessionid=32456789 and
> myloginimage.png;jsessionid=32456789.
> 
> The problem is that httpd thinks the ";jsesionid" is part of the path of
> the resource, instead of a parameter. You can fix this either with
> mod_rewrite (which is a bit heavy-handed) or you can use
> 
> JkStripSession On
> 
> if you are using a reasonably recent version of mod_jk.
> 
> Hope that helps,
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkn7UTEACgkQ9CaO5/Lv0PDwwgCcCjjHgsZI6oSDizZPpPxgMoD7
> d+4An1SWaF/2Q32jyK2DiULpvPRWB4Hn
> =iKFe
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> 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/I-have-a-problem-with-Apache%2C-Tomcat-tp23322605p23349107.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: I have a problem with Apache, Tomcat

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

Nohacks,

On 4/30/2009 4:18 PM, nohacks wrote:
> You can see from my logs that apache returns a 200 for my login page then
> returns a 404 from
> 
> It seems to be an issue now and then. It works for a while then it tosses a
> 404. Maybe after a timeout I really dont know...Hard to recreate. but my
> logs are full of 404 jsessionid issues...

I can tell you how to recreate it:

1. Log out of your application
2. Go to the login page

Result: your httpd logs are full of 404 errors for things like
mystylesheet.css;jsessionid=32456789 and
myloginimage.png;jsessionid=32456789.

The problem is that httpd thinks the ";jsesionid" is part of the path of
the resource, instead of a parameter. You can fix this either with
mod_rewrite (which is a bit heavy-handed) or you can use

JkStripSession On

if you are using a reasonably recent version of mod_jk.

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

iEYEARECAAYFAkn7UTEACgkQ9CaO5/Lv0PDwwgCcCjjHgsZI6oSDizZPpPxgMoD7
d+4An1SWaF/2Q32jyK2DiULpvPRWB4Hn
=iKFe
-----END PGP SIGNATURE-----

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