You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Graham Leggett <mi...@sharp.fm> on 2001/09/14 13:37:39 UTC

mod_jk / tomcat webserver 404 weirdness

Hi,

I am having some grief with a new tomcat/mod_jk installation. I've
installed the required context in server.xml, and have used the
auto-generated apache mod_jk config file to taylor httpd.html.

The configured URL works great from the tomcat webserver running on port
8080 by default, but accessing the URL through Apache and mod_jk results
in an error 404 in the Apache logfile. A packet sniff on port 8009
indicates no traffic at all - which suggests to me that the Apache side
is broken, but I don't understand this stuff clearly enough yet to see
through the fog, and the FAQ hasn't yielded any clues. I have put the
following into the relevant virtual host config on Apache:

  Alias /thh "/var/tomcat/webapps/thh"
  <Directory "/var/tomcat/webapps/thh">
    Options Indexes FollowSymLinks
  </Directory>
  JkMount /thh/servlet/* ajp13
  JkMount /thh/*.jsp ajp13
  <Location "/thh/WEB-INF/">
    AllowOverride None
    deny from all
  </Location>
  <Location "/thh/META-INF/">
    AllowOverride None
    deny from all
  </Location>

The context in the server.xml file looks like this:

        <Context path="/thh" 
                 docBase="webapps/thh" 
                 crossContext="true"
                 debug="0" 
                 reloadable="true" 
                 trusted="false" > 
        </Context>

In the mod_jk.log file there have been some strange messages logged -
but there is no indication of whether these messages are just debug
informational statements, or whether they indicate an error condition of
some kind:

[jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
NULL parameter
[jk_uri_worker_map.c (185)]: In
jk_uri_worker_map_t::uri_worker_map_free, NULL parameters

Does this ring any bells with anyone? Just how stable is mod_jk -> as an
alternative we've been considering hiding the tomcat webserver behind
Apache mod_proxy instead of using mod_jk - any comments on this
alternative config? 

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."

Re: mod_jk / tomcat webserver 404 weirdness

Posted by Graham Leggett <mi...@sharp.fm>.
Tony Vinayak wrote:

> Since your browser URI is "/thh/feersum/healthbar/bloomsbury/home.html", you
> don't have a corresponding JkMount in your httpd.conf file. None of your
> current defs:
> 
> > JkMount /thh/servlet/* ajp13
> > JkMount /thh/*.jsp ajp13
> 
> will cause the browser URI to be redirected to Tomcat.
> 
> Try with the following:
> 
> JkMount /thh/* ajp13

It works now - great! I didn't fully understand the implications of what
my java programmer was doing (they make the stuff, I make it live) - I
didn't realise the significance of the jsp extension and that in our
case it wasn't being used.

Thanks hugely for the help!

Regards,
Graham 
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."

RE: mod_jk / tomcat webserver 404 weirdness

Posted by Tony Vinayak <tv...@covalent.net>.
Since your browser URI is "/thh/feersum/healthbar/bloomsbury/home.html", you
don't have a corresponding JkMount in your httpd.conf file. None of your
current defs:

> JkMount /thh/servlet/* ajp13
> JkMount /thh/*.jsp ajp13

will cause the browser URI to be redirected to Tomcat.

Try with the following:

JkMount /thh/* ajp13

- Tony


-----Original Message-----
From: minfrin [mailto:minfrin]On Behalf Of Graham Leggett
Sent: Friday, September 14, 2001 9:53 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: mod_jk / tomcat webserver 404 weirdness


Tony Vinayak wrote:

> Doesn't look like the request made it to Tomcat at all.
>
> - What does Apache's error/access log indicate regarding the request?

The access log indicates error 404. The error log indicates:

[Fri Sep 14 05:52:44 2001] [error] [client 213.122.48.138] File does not
exist: /var/tomcat/webapps/thh/feersum/healthbar/bloomsbury/home.html

> - What's the browser URL that you are using to access your servlet?

/thh/feersum/healthbar/bloomsbury/home.html

> - What does the web.xml look like?

The web.xml is the default that came with tomcat (it is attached).

Regards,
Graham
--

> -----Original Message-----
> From: minfrin [mailto:minfrin]On Behalf Of Graham Leggett
> Sent: Friday, September 14, 2001 7:38 AM
> To: Tomcat User
> Subject: mod_jk / tomcat webserver 404 weirdness
>
> Hi,
>
> I am having some grief with a new tomcat/mod_jk installation. I've
> installed the required context in server.xml, and have used the
> auto-generated apache mod_jk config file to taylor httpd.html.
>
> The configured URL works great from the tomcat webserver running on port
> 8080 by default, but accessing the URL through Apache and mod_jk results
> in an error 404 in the Apache logfile. A packet sniff on port 8009
> indicates no traffic at all - which suggests to me that the Apache side
> is broken, but I don't understand this stuff clearly enough yet to see
> through the fog, and the FAQ hasn't yielded any clues. I have put the
> following into the relevant virtual host config on Apache:
>
>   Alias /thh "/var/tomcat/webapps/thh"
>   <Directory "/var/tomcat/webapps/thh">
>     Options Indexes FollowSymLinks
>   </Directory>
>   JkMount /thh/servlet/* ajp13
>   JkMount /thh/*.jsp ajp13
>   <Location "/thh/WEB-INF/">
>     AllowOverride None
>     deny from all
>   </Location>
>   <Location "/thh/META-INF/">
>     AllowOverride None
>     deny from all
>   </Location>
>
> The context in the server.xml file looks like this:
>
>         <Context path="/thh"
>                  docBase="webapps/thh"
>                  crossContext="true"
>                  debug="0"
>                  reloadable="true"
>                  trusted="false" >
>         </Context>
>
> In the mod_jk.log file there have been some strange messages logged -
> but there is no indication of whether these messages are just debug
> informational statements, or whether they indicate an error condition of
> some kind:
>
> [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
> NULL parameter
> [jk_uri_worker_map.c (185)]: In
> jk_uri_worker_map_t::uri_worker_map_free, NULL parameters
>
> Does this ring any bells with anyone? Just how stable is mod_jk -> as an
> alternative we've been considering hiding the tomcat webserver behind
> Apache mod_proxy instead of using mod_jk - any comments on this
> alternative config?
>
> Regards,
> Graham
> --
> -----------------------------------------
> minfrin@sharp.fm                "There's a moon
>                                         over Bourbon Street
>                                                 tonight..."

--
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."


Re: mod_jk / tomcat webserver 404 weirdness

Posted by Graham Leggett <mi...@sharp.fm>.
Tony Vinayak wrote:

> Doesn't look like the request made it to Tomcat at all.
> 
> - What does Apache's error/access log indicate regarding the request?

The access log indicates error 404. The error log indicates:

[Fri Sep 14 05:52:44 2001] [error] [client 213.122.48.138] File does not
exist: /var/tomcat/webapps/thh/feersum/healthbar/bloomsbury/home.html

> - What's the browser URL that you are using to access your servlet?

/thh/feersum/healthbar/bloomsbury/home.html

> - What does the web.xml look like?

The web.xml is the default that came with tomcat (it is attached).

Regards,
Graham
--

> -----Original Message-----
> From: minfrin [mailto:minfrin]On Behalf Of Graham Leggett
> Sent: Friday, September 14, 2001 7:38 AM
> To: Tomcat User
> Subject: mod_jk / tomcat webserver 404 weirdness
> 
> Hi,
> 
> I am having some grief with a new tomcat/mod_jk installation. I've
> installed the required context in server.xml, and have used the
> auto-generated apache mod_jk config file to taylor httpd.html.
> 
> The configured URL works great from the tomcat webserver running on port
> 8080 by default, but accessing the URL through Apache and mod_jk results
> in an error 404 in the Apache logfile. A packet sniff on port 8009
> indicates no traffic at all - which suggests to me that the Apache side
> is broken, but I don't understand this stuff clearly enough yet to see
> through the fog, and the FAQ hasn't yielded any clues. I have put the
> following into the relevant virtual host config on Apache:
> 
>   Alias /thh "/var/tomcat/webapps/thh"
>   <Directory "/var/tomcat/webapps/thh">
>     Options Indexes FollowSymLinks
>   </Directory>
>   JkMount /thh/servlet/* ajp13
>   JkMount /thh/*.jsp ajp13
>   <Location "/thh/WEB-INF/">
>     AllowOverride None
>     deny from all
>   </Location>
>   <Location "/thh/META-INF/">
>     AllowOverride None
>     deny from all
>   </Location>
> 
> The context in the server.xml file looks like this:
> 
>         <Context path="/thh"
>                  docBase="webapps/thh"
>                  crossContext="true"
>                  debug="0"
>                  reloadable="true"
>                  trusted="false" >
>         </Context>
> 
> In the mod_jk.log file there have been some strange messages logged -
> but there is no indication of whether these messages are just debug
> informational statements, or whether they indicate an error condition of
> some kind:
> 
> [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
> NULL parameter
> [jk_uri_worker_map.c (185)]: In
> jk_uri_worker_map_t::uri_worker_map_free, NULL parameters
> 
> Does this ring any bells with anyone? Just how stable is mod_jk -> as an
> alternative we've been considering hiding the tomcat webserver behind
> Apache mod_proxy instead of using mod_jk - any comments on this
> alternative config?
> 
> Regards,
> Graham
> --
> -----------------------------------------
> minfrin@sharp.fm                "There's a moon
>                                         over Bourbon Street
>                                                 tonight..."

-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."

RE: mod_jk / tomcat webserver 404 weirdness

Posted by Tony Vinayak <tv...@covalent.net>.
Graham,

Doesn't look like the request made it to Tomcat at all.

- What does Apache's error/access log indicate regarding the request?
- What's the browser URL that you are using to access your servlet? 
- What does the web.xml look like?

cheers,
Tony


-----Original Message-----
From: minfrin [mailto:minfrin]On Behalf Of Graham Leggett
Sent: Friday, September 14, 2001 7:38 AM
To: Tomcat User
Subject: mod_jk / tomcat webserver 404 weirdness


Hi,

I am having some grief with a new tomcat/mod_jk installation. I've
installed the required context in server.xml, and have used the
auto-generated apache mod_jk config file to taylor httpd.html.

The configured URL works great from the tomcat webserver running on port
8080 by default, but accessing the URL through Apache and mod_jk results
in an error 404 in the Apache logfile. A packet sniff on port 8009
indicates no traffic at all - which suggests to me that the Apache side
is broken, but I don't understand this stuff clearly enough yet to see
through the fog, and the FAQ hasn't yielded any clues. I have put the
following into the relevant virtual host config on Apache:

  Alias /thh "/var/tomcat/webapps/thh"
  <Directory "/var/tomcat/webapps/thh">
    Options Indexes FollowSymLinks
  </Directory>
  JkMount /thh/servlet/* ajp13
  JkMount /thh/*.jsp ajp13
  <Location "/thh/WEB-INF/">
    AllowOverride None
    deny from all
  </Location>
  <Location "/thh/META-INF/">
    AllowOverride None
    deny from all
  </Location>

The context in the server.xml file looks like this:

        <Context path="/thh" 
                 docBase="webapps/thh" 
                 crossContext="true"
                 debug="0" 
                 reloadable="true" 
                 trusted="false" > 
        </Context>

In the mod_jk.log file there have been some strange messages logged -
but there is no indication of whether these messages are just debug
informational statements, or whether they indicate an error condition of
some kind:

[jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
NULL parameter
[jk_uri_worker_map.c (185)]: In
jk_uri_worker_map_t::uri_worker_map_free, NULL parameters

Does this ring any bells with anyone? Just how stable is mod_jk -> as an
alternative we've been considering hiding the tomcat webserver behind
Apache mod_proxy instead of using mod_jk - any comments on this
alternative config? 

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."