You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Denise Mangano <De...@complusdata.com> on 2002/12/23 16:25:45 UTC

Mod_jk - won't execute jsp or servlets

Thanks to all your help, I've gotten over some bumps.  As it stands I can
access any static pages in the Tomcat directory without having to type port
8080 ( i.e. I can access http://localhost/examples/servlets/index.html.
However, whenever I try to execute a servlet or JSP it hangs indefinitely.
The only errors appear in my mod_jk.log file:

[Mon Dec 23 09:49:31 2002]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Mon Dec 23 09:49:31 2002]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/examples/images/code.gif' [Mon Dec 23 09:49:31 2002]
[jk_uri_worker_map.c (599)]: jk_uri_worker_map_t::map_uri_to_worker, done
without a match [Mon Dec 23 09:49:31 2002]  [mod_jk.c (1827)]:
mod_jk::jk_translate, check alias_dir: /usr/local/tomcat/webapps/ [Mon Dec
23 09:49:31 2002]  [mod_jk.c (1850)]: mod_jk::jk_translate, AutoAlias
child_dir: images [Mon Dec 23 09:49:31 2002]  [mod_jk.c (1876)]:
mod_jk::jk_translate, AutoAlias OK for file:
/usr/local/tomcat/webapps//examples/images/code.gif
[Mon Dec 23 09:49:38 2002]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Mon Dec 23 09:49:38 2002]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/examples/servlet/HelloWorldExample'
[Mon Dec 23 09:49:38 2002]  [jk_uri_worker_map.c (502)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match worker1 ->
/examples/servlet/ [Mon Dec 23 09:49:38 2002]  [jk_worker.c (132)]: Into
wc_get_worker_for_name worker1 [Mon Dec 23 09:49:38 2002]  [jk_worker.c
(136)]: wc_get_worker_for_name, done  found a worker [Mon Dec 23 09:49:38
2002]  [jk_ajp_common.c (1404)]: Into jk_worker_t::get_endpoint [Mon Dec 23
09:49:38 2002]  [jk_ajp_common.c (1116)]: Into jk_endpoint_t::service [Mon
Dec 23 09:49:38 2002]  [jk_ajp_common.c (295)]: Into ajp_marshal_into_msgb
[Mon Dec 23 09:49:38 2002]  [jk_ajp_common.c (432)]: ajp_marshal_into_msgb -
Done [Mon Dec 23 09:49:38 2002]  [jk_connect.c (158)]: Into jk_open_socket
[Mon Dec 23 09:49:38 2002]  [jk_connect.c (165)]: jk_open_socket, try to
connect socket = 11
[Mon Dec 23 09:52:47 2002]  [jk_connect.c (174)]: jk_open_socket, after
connect ret = -1
[Mon Dec 23 09:52:47 2002]  [jk_connect.c (203)]: jk_open_socket, connect()
failed errno = 110
[Mon Dec 23 09:52:47 2002]  [jk_ajp_common.c (626)]: Error connecting to
tomcat. Tomcat is probably not started or is listenning on the wrong port.
Failed errno = 110
[Mon Dec 23 09:52:47 2002]  [jk_ajp_common.c (874)]: Error connecting to the
Tomcat process.
[Mon Dec 23 09:52:47 2002]  [jk_ajp_common.c (1190)]: sending request to
tomcat failed in send loop. err=0
[Mon Dec 23 09:52:47 2002]  [jk_connect.c (158)]: Into jk_open_socket
[Mon Dec 23 09:52:47 2002]  [jk_connect.c (165)]: jk_open_socket, try to
connect socket = 11

These are the following changes I have made to my httpd.conf file - all on
top level:
LoadModule jk_module JkWorkersFile
/usr/local/tomcat/conf/jk/workers.properties
JkLogFile /usr/local/tomcat/logs/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkRequestLogFormat "%w %r %s %T"
Alias /examples /usr/local/tomcat/webapps/examples
Alias /tomcat-docs /usr/local/tomcat/webapps/tomcat-docs
  <Location /examples/WEB-INF/>
        AllowOverride None
        deny from all
    </Location>
 JkAutoAlias /usr/local/tomcat/webapps/
 JkMount /servlet/* worker1
 JkMount /examples/jsp/*.jsp worker1
 JkMount /examples/servlet/* worker1
 JkMount /*.jsp worker1
 JkMount /admin/* worker1
 JkMount /manager/* worker1

Tomcat is set as default to listen to port 8080.  Apache is listening to
port 80 and 443.  Tomcat and Apache are both started with no errors reported
during startup.  Any ideas?  I know Jerry had a similar problem with static
pages being viewed, but unable to execute servlets, but I did not notice any
resolution.

Thanks.
Denise

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Mod_jk - won't execute jsp or servlets

Posted by Milt Epstein <me...@uiuc.edu>.
On Mon, 23 Dec 2002, Denise Mangano wrote:

> Thanks to all your help, I've gotten over some bumps.  As it stands
> I can access any static pages in the Tomcat directory without having
> to type port 8080 ( i.e. I can access
> http://localhost/examples/servlets/index.html.  However, whenever I
> try to execute a servlet or JSP it hangs indefinitely.  The only
> errors appear in my mod_jk.log file:
>
[ ... ]
> [Mon Dec 23 09:52:47 2002]  [jk_connect.c (203)]: jk_open_socket, connect()
> failed errno = 110
> [Mon Dec 23 09:52:47 2002]  [jk_ajp_common.c (626)]: Error connecting to
> tomcat. Tomcat is probably not started or is listenning on the wrong port.
> Failed errno = 110
[ ... ]

This seems to be the telling message.  So is Tomcat started and
running?  And what port is it listening on?  More completely, what
port is Apache expecting it to listen on and what port is it set to
listen on?  The former is set in workers.properties.  The latter is
set in server.xml, particularly in the Connector tag for the Ajp
connector (because it may be listening on different ports for
different things, here we only care about Ajp).  The default for that
is 8009.  It's probably best you post both of those files
(i.e. workers.properties and server.xml) so we can see for sure what
you have there.

You say that Tomcat is listening on port 8080, but that is the default
port for Tomcat's Http Connector (i.e. Tomcat standalone).  So I
suspect that is not the relevant info here.

Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>