You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Marc Vila PĂ©rez <mv...@telemako.com> on 2002/09/19 02:22:09 UTC
Problems connecting Tomcat with Apache using ajp13
Hi everybody!
I'm trying to connect tomcat 4.1.10 with apache 1.3.22, on Linux RH. In
the server I want to install several hosts (using virtual hosting).
I'm using org.apache.ajp.tomcat4.Ajp13Connector, I've downloaded several
mod_jk.so (tried different versions), ...
On every virtual host in httpd.conf there is a directive
JkMount /*.jsp ajp13
Seems than apache finds the connector, but tomcat cannot create the
servlet to serve the jsp page.
This is the output of the mod_jk log file (JkLogFile):
***********************************************
[Thu Sep 19 00:40:36 2002] [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Thu Sep 19 00:40:36 2002] [jk_uri_worker_map.c (368)]: Attempting to
map URI '/telemako.jsp'
[Thu Sep 19 00:40:36 2002] [jk_uri_worker_map.c (416)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a suffix match ajp13 ->
*.jsp
[Thu Sep 19 00:40:36 2002] [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Thu Sep 19 00:40:36 2002] [jk_uri_worker_map.c (368)]: Attempting to
map URI '/telemako.jsp'
[Thu Sep 19 00:40:36 2002] [jk_uri_worker_map.c (416)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a suffix match ajp13 ->
*.jsp
[Thu Sep 19 00:40:36 2002] [jk_worker.c (123)]: Into
wc_get_worker_for_name ajp13
[Thu Sep 19 00:40:36 2002] [jk_worker.c (127)]: wc_get_worker_for_name,
done found a worker
[Thu Sep 19 00:40:36 2002] [jk_ajp13_worker.c (865)]: Into
jk_worker_t::get_endpoint
[Thu Sep 19 00:40:36 2002] [jk_ajp13_worker.c (775)]: Into
jk_endpoint_t::service
[Thu Sep 19 00:40:36 2002] [jk_ajp13.c (403)]: Into
ajp13_marshal_into_msgb
[Thu Sep 19 00:40:36 2002] [jk_ajp13.c (537)]: ajp13_marshal_into_msgb
- Done
[Thu Sep 19 00:40:36 2002] [jk_connect.c (108)]: Into jk_open_socket
[Thu Sep 19 00:40:36 2002] [jk_connect.c (115)]: jk_open_socket, try to
connect socket = 6
[Thu Sep 19 00:43:45 2002] [jk_connect.c (124)]: jk_open_socket, after
connect ret = -1
[Thu Sep 19 00:43:45 2002] [jk_connect.c (143)]: jk_open_socket,
connect() failed errno = 110
[Thu Sep 19 00:43:45 2002] [jk_ajp13_worker.c (196)]: In
jk_endpoint_t::connect_to_tomcat, failed errno = 110
[Thu Sep 19 00:43:45 2002] [jk_ajp13_worker.c (635)]: Error connecting
to the Tomcat process.
[Thu Sep 19 00:43:45 2002] [jk_ajp13_worker.c (848)]: In
jk_endpoint_t::service, send_request failed in send loop 0
***********************************************
And these are my configuration files are:
*****************httpd.conf************************
...
### Begin from mod_jk.conf ##########################################
LoadModule jk_module modules/mod_jk.so
#AddModule mod_jk.c
JkWorkersFile /usr/local/jakarta-tomcat-4.1.10/conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel debug
#
# The following line mounts all JSP files and the /servlet/ uri to
tomcat
# write it for every virtual host.
#
#JkMount /<dir>/servlet/* ajp13
#JkMount /<dir>/*.jsp ajp13
### End from mod_jk.conf ##########################################
...
********************************************
***************workers.properties*********************
worker.list=ajp13
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13
# Define some properties
workers.apache_log=/etc/httpd/logs
workers.tomcat_home=/usr/local/jakarta-tomcat-4.1.10
workers.java_home=/usr/local/j2sdk1.4.1
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
ps=/
******************************************************
******************* server.xml (... indicates default config settings
like loggers or valves, ...)************************
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer"
value="30"/>
...
</GlobalNamingResources>
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Tomcat-Standalone">
<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="20000"
useURIValidationHack="false" />
<Engine name="Standalone" defaultHost="localhost" debug="0">
...
<!-- Define the default virtual host -->
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">
...
<!-- Tomcat Examples Context -->
<Context path="/examples" docBase="examples" debug="0"
reloadable="true" crossContext="true">
...
</Context>
</Host>
</Engine>
</Service>
<!-- Define an Apache-Connector Service -->
<Service name="Tomcat-Apache">
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>
<Engine name="Apache" defaultHost="localhost" debug="0">
...
<Host name="www.testing.com" debug="0"
appBase="/var/www/vhosts/host1"
unpackWARs="true" autoDeploy="true">
...
<Context debug="99"
docBase="/var/www/vhosts/host1/web"
path="">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="parcbit.com_log." suffix=".txt"
timestamp="true"/>
</Context>
</Host>
</Engine>
</Service>
**************************************************
Any idea????
Thank you very much!!!
Marc
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>