tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Ilardo <alessandro.ila...@my-sandro.net>
Subject Re: session and AJP
Date Wed, 24 Jan 2007 08:59:22 GMT
Ok, I think is better if I give the scenario:
A Tomcat 5.5 and JBoss are behind a firewall, they serve external 
request exclusively trough a connector used by an Apache HTTP reachable 
from Internet.
As I'm in a Tomcat mailing list I'll only refer to the sample 
application which is included in the Tomcat installation, but the same 
kind of error happens with JBoss.
(in the following code I omitted ONLY the domain in order to protect it, 
I hope it doesn't confuse)

calling this sample application directly from Tomcat I don't get any errors
http://saturn.domain.com:8080/jsp-examples/sessions/carts.htm

while if I try to get the same application trough Apache HTTP
http://www.xxxxxxx.eu/jsp-examples/sessions/carts.html
As soon as I try to submit the form I get the this error (perhaps from 
Apache HTTP)
Error. The file was not found. (filename = 
/etc/httpd/htdocs/jsp-examples/sessions/carts.jsp)

These are the Access Logs from Tomcat (the first attempt) and Apache 
HTTP (second attempt)
xx.xx.xx.185 - - [24/Jan/2007:10:36:51 +0000] "GET 
/jsp-examples/sessions/carts.jsp?item=NIN+CD&submit=add HTTP/1.1" 200 2027
(it works)

Access log calling the same application, but passing from Apache HTTP / 
connector
xx.xx.xx.185 - - [24/Jan/2007:10:58:24 +0000] "GET 
/jsp-examples/sessions/carts.jsp?item=X-files+movie&submit=add HTTP/1.1" 
404 94 "http://www.xxxxxxx.eu/jsp-examples/sessions/carts.html" 
"Mozilla/5.0 (X11; U; Linux i686; it; rv:1.8.0.3) Gecko/20060425 
SUSE/1.5.0.3-7 Firefox/1.5.0.3"

Here belowe the configuration I'm using for the Virtual-Host on Apache 
HTTP and the worker
<VirtualHost *:80>
     ServerName www.xxxxxxxxx.eu
     JkMount /* tomcat559Saturn
</VirtualHost>


worker.list=tomcat559Saturn,jboss322Pluto
worker.tomcat559Saturn.type=ajp13
worker.tomcat559Saturn.port=8009
worker.tomcat559Saturn.host=saturn.domain.com
worker.jboss322Pluto.type=ajp13
worker.jboss322Pluto.port=8009
worker.jboss322Pluto.host=pluto.domain.com

This what I think:
on both Tomcat and JBoss the problem occurs when I try to set values in 
the session. It only happens when I post the data trough Apache HTTP and 
the Connector.
I'm probably missing some configurations in the Virtual-Host which 
refers to cookies, session or path.

Can anyone tell me where is the problem and possibly how I can solve it?


Rainer Jung ha scritto:
> alessandro.ilardo@my-sandro.net schrieb:
>   
>> I'm trying to set up an AJP connector between Apache 2 (red hat) and
>> Tomcat 5.5 (red hat) running on two different servers.
>>
>> <VirtualHost *:80>
>> ServerName server2.domain.com
>> DocumentRoot "/var/www/html"
>> JkMount /id/admin/* tomcat559
>> </VirtualHost>
>>     
>
> OK, no rules for jboss322, so we can ignore this worker.
>
>   
>> worker.list=tomcat559,jboss322
>> worker.tomcat559.maintain=60
>>     
>
> Drop the maintain line, it will not do anything.
>
>   
>> worker.tomcat559.type=ajp13
>> worker.tomcat559.port=8009
>> worker.tomcat559.host=intServer.domain.com
>> worker.jboss322.maintain=60
>>     
>
> Drop the maintain line, it will not do anything.
>
>   
>> worker.jboss322.type=ajp13
>> worker.jboss322.port=8009
>> worker.jboss322.host=server3.domain.com
>>
>> If I call the following url
>> http://server2.domain.com/id/admin/
>>     
>
> /id/ or /im/ (which you wrote above)?
>
>   
>> The web application running on Tomcat correctly asks me for a user
>> identification. Once I enter the user name and password a file not found
>> back to me.
>>
>> Error. The file was not found. 
>> filename = /etc/httpd/htdocs/im/admin/index.jsp
>>     
>
> Activate the access log in tomcat and check what's in the Tomcat access
> log. Check if the URL occuring there is what you expect.
>
>   
>> On Tomcat I get the following message
>> [Channel Socket] Connection timeout reached
>>
>>
>> I also made a test with the sample application which is included in the Tomcat installation.
>>  /jsp-examples/sessions/carts.html
>> and it reported the same kind of error while inside the firewall, with a url like
this
>> http://intServer.domain.com:8080/jsp-examples/sessions/carts.html
>> the sample application works fine.
>>     
>
> Which firewall?
>
>   
>> I guess my problem is related to the session and connector.
>> Can anyone tell me how to fix it?
>>
>>
>> Thanks in advance
>>
>> Regards
>> Alessandro Ilardo
>>     
>
> Regards,
>
> Rainer
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>   


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


Mime
View raw message