You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Edwin Walsh <ed...@esat.kuleuven.be> on 2008/01/14 15:37:36 UTC

strange forwarding problem with jkmount

Hi,

I have the most peculiar problem (at least in my point of view) with 
forwarding with jkmount. JkMount has always worked on my server, but 
suddenly, without changing anything but the mod_jk settings (adding a 
new jkmount and some rewriterules), JkMount suddenly only works if I 
connect to my server from localhost and not from any other location.
I can't post the entire configuration of the server here, only the 
section of mod_jk which you can find below.

Is there anybody that could give me a hint on where I might start 
looking for the problem? What I suspect myself is that there might be 
some virtualhost or directory that eats the incoming external request so 
that I never get to the mod_jk section. And that it doesn't do this when 
I connect from localhost. But it beats me why it would do that.

The error that I get from the apache logs is :
[Mon Jan 14 15:30:06 2008] [error] [client 10.33.132.252] File does not 
exist: /volume1/www/htdocs/esat/jsp-examples
which makes me thing that the section in the configuration that is 
'eating' my requests has a document base of  /volume1/www/htdocs/esat/, 
but I am not sure if that is a right presumption.

Greetings,
Edwin

<IfModule jk_module>
        JkWorkersFile           conf/extra/workers.properties
        JkLogFile               /volume1/www/logs/mod_jk.log
        JkLogLevel              info
        JkLogStampFormat        "[%a %d %b %Y %H:%M:%S] "
        JkShmFile               /volume1/www/logs/mod_jk-runtime-status
        JkMount                 /jsp-examples/* tomcat

        RewriteEngine           On
        JkMount                 /bench_* cartagen
</IfModule>

<Location /jkmanager/>
JkMount jkstatus
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm


---------------------------------------------------------------------
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


Re: strange forwarding problem with jkmount

Posted by Edwin Walsh <ed...@esat.kuleuven.be>.
Hi,

It was as I expected and a virtual server was 'eating' my requests. The 
JkMount was actually already set up in the global server, but by adding 
the line JkMountCopy All it got forwarded to all the virtualhosts as 
well. Since this is only a temporary problem for us, it will have to do...

Greetings
Edwin

Rainer Jung wrote:
> Hi Edwin,
>
> Edwin Walsh wrote:
>> Hi,
>>
>> I have the most peculiar problem (at least in my point of view) with 
>> forwarding with jkmount. JkMount has always worked on my server, but 
>> suddenly, without changing anything but the mod_jk settings (adding a 
>> new jkmount and some rewriterules), JkMount suddenly only works if I 
>> connect to my server from localhost and not from any other location.
>> I can't post the entire configuration of the server here, only the 
>> section of mod_jk which you can find below.
>>
>> Is there anybody that could give me a hint on where I might start 
>> looking for the problem? What I suspect myself is that there might be 
>> some virtualhost or directory that eats the incoming external request 
>> so that I never get to the mod_jk section. And that it doesn't do 
>> this when I connect from localhost. But it beats me why it would do 
>> that.
>
> I actually didn't read your config, but the description reminds me of 
> a problem I had to analyze a few weeks ago. Customer had a SuSE linux 
> system, which included an entry into /etc/hosts like
>
> 127.0.0.2 myserver
>
> and myserver was the name of the machine.
>
> Now if you configure a virtual host myserver:80 in your httpd 
> configuration, what will happen?
>
> When httpd starts, it will resolve myserver, and by the usual 
> configuration, /etc/hosts will come first and resolve into 127.0.0.2. 
> So requests will be mapped to this vhost, if they actually talk to 
> 127.0.0.2.
>
> Clients connection from local to myserver:80 will also resolve the 
> name into 127.0.0.2, and thus the request will be successfully mapped 
> by httpd to the vhost.
>
> Clients connecting from remote, will find myserver in DNS etc. and 
> resolve the official address. Even if httpd listens to it, it will not 
> associate the request with the myserver vhost.
>
> Check your /etc/hosts, if there is a nonsense entry for the name of 
> your server in there. Also check your /etc/nsswitch.conf (assuming 
> it's *nix), and go through those name services, checking for your 
> server entries in them.
>
> If you are not allowed to control/fix those name services, you can put 
> the JkMount into the global server and JkMountCopy On into each vhost, 
> which is suspect to catch the request. That might not be what you 
> want, though.
>
> Regards,
>
> Rainer
>
> P.S.: If you want to debug, which virtual server (or even the global 
> server) catches a request, configure a different access log for each 
> vhost and the global server. That way you can easily find out, which 
> vhost handles your request.
>
>>
>> The error that I get from the apache logs is :
>> [Mon Jan 14 15:30:06 2008] [error] [client 10.33.132.252] File does 
>> not exist: /volume1/www/htdocs/esat/jsp-examples
>> which makes me thing that the section in the configuration that is 
>> 'eating' my requests has a document base of  
>> /volume1/www/htdocs/esat/, but I am not sure if that is a right 
>> presumption.
>>
>> Greetings,
>> Edwin
>>
>> <IfModule jk_module>
>>        JkWorkersFile           conf/extra/workers.properties
>>        JkLogFile               /volume1/www/logs/mod_jk.log
>>        JkLogLevel              info
>>        JkLogStampFormat        "[%a %d %b %Y %H:%M:%S] "
>>        JkShmFile               /volume1/www/logs/mod_jk-runtime-status
>>        JkMount                 /jsp-examples/* tomcat
>>
>>        RewriteEngine           On
>>        JkMount                 /bench_* cartagen
>> </IfModule>
>>
>> <Location /jkmanager/>
>> JkMount jkstatus
>> Order deny,allow
>> Deny from all
>> Allow from 127.0.0.1
>> </Location>
>
> ---------------------------------------------------------------------
> 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
>

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm


---------------------------------------------------------------------
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


Re: strange forwarding problem with jkmount

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

Edwin Walsh wrote:
> Hi,
> 
> I have the most peculiar problem (at least in my point of view) with 
> forwarding with jkmount. JkMount has always worked on my server, but 
> suddenly, without changing anything but the mod_jk settings (adding a 
> new jkmount and some rewriterules), JkMount suddenly only works if I 
> connect to my server from localhost and not from any other location.
> I can't post the entire configuration of the server here, only the 
> section of mod_jk which you can find below.
> 
> Is there anybody that could give me a hint on where I might start 
> looking for the problem? What I suspect myself is that there might be 
> some virtualhost or directory that eats the incoming external request so 
> that I never get to the mod_jk section. And that it doesn't do this when 
> I connect from localhost. But it beats me why it would do that.

I actually didn't read your config, but the description reminds me of a 
problem I had to analyze a few weeks ago. Customer had a SuSE linux 
system, which included an entry into /etc/hosts like

127.0.0.2 myserver

and myserver was the name of the machine.

Now if you configure a virtual host myserver:80 in your httpd 
configuration, what will happen?

When httpd starts, it will resolve myserver, and by the usual 
configuration, /etc/hosts will come first and resolve into 127.0.0.2. So 
requests will be mapped to this vhost, if they actually talk to 127.0.0.2.

Clients connection from local to myserver:80 will also resolve the name 
into 127.0.0.2, and thus the request will be successfully mapped by 
httpd to the vhost.

Clients connecting from remote, will find myserver in DNS etc. and 
resolve the official address. Even if httpd listens to it, it will not 
associate the request with the myserver vhost.

Check your /etc/hosts, if there is a nonsense entry for the name of your 
server in there. Also check your /etc/nsswitch.conf (assuming it's 
*nix), and go through those name services, checking for your server 
entries in them.

If you are not allowed to control/fix those name services, you can put 
the JkMount into the global server and JkMountCopy On into each vhost, 
which is suspect to catch the request. That might not be what you want, 
though.

Regards,

Rainer

P.S.: If you want to debug, which virtual server (or even the global 
server) catches a request, configure a different access log for each 
vhost and the global server. That way you can easily find out, which 
vhost handles your request.

> 
> The error that I get from the apache logs is :
> [Mon Jan 14 15:30:06 2008] [error] [client 10.33.132.252] File does not 
> exist: /volume1/www/htdocs/esat/jsp-examples
> which makes me thing that the section in the configuration that is 
> 'eating' my requests has a document base of  /volume1/www/htdocs/esat/, 
> but I am not sure if that is a right presumption.
> 
> Greetings,
> Edwin
> 
> <IfModule jk_module>
>        JkWorkersFile           conf/extra/workers.properties
>        JkLogFile               /volume1/www/logs/mod_jk.log
>        JkLogLevel              info
>        JkLogStampFormat        "[%a %d %b %Y %H:%M:%S] "
>        JkShmFile               /volume1/www/logs/mod_jk-runtime-status
>        JkMount                 /jsp-examples/* tomcat
> 
>        RewriteEngine           On
>        JkMount                 /bench_* cartagen
> </IfModule>
> 
> <Location /jkmanager/>
> JkMount jkstatus
> Order deny,allow
> Deny from all
> Allow from 127.0.0.1
> </Location>

---------------------------------------------------------------------
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