You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jeremy Barth <jb...@dpw.com> on 2003/12/23 19:42:17 UTC
mod_jk2/2.0.2 failure in Tomcat 5.0.16 / Apache 2.0.48
I've looked at the list archives, but can't find much on JK2 with
Tomcat 5 (though there's plenty of material on Tomcat 4). I'm sure
I'm missing something obvious, but I can't get even the example webapps
to work with Apache 2.0.48 / Tomcat 5.0.16 / JK2.
I am following the example given here (yes, the documentation that
comes with Tomcat 5 refers to this v4.1 page):
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/confighowto.html
My config and log files are below, but in essence here is the problem:
http://servername/jkstatus Works -- verify JK module status
http://servername:8080/jsp-examples Works -- talk directly to Tomcat
http://servername/jsp-examples FAILS -- via JK2 connector
Here are my config files, very simple and based on that confighowto.html:
workers2.properties
--------------------------------
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009
# The documentation refers to "examples" but there is no such webapp in
# Tomcat 5; there is, however, a jsp-examples webapp
#
[uri:/jsp-examples/*]
info=Map the whole webapp
worker=ajp13:localhost:8009
# Set up jkstatus and debug logging
#
[status:status]
info=Status worker, displays runtime info
[uri:/jkstatus/*]
info=Display status info and checks config file for changes
group=status:
worker=status:status
[logger]
level=DEBUG
[logger.file:my_logfile]
level=DEBUG
file=/usr/local/apache/logs/jk2.log
[workerEnv:]
info=Global server options
logger=logger.file:my_logfile
jk2.properties
--------------------------------
Empty (i.e. just accept the defaults, e.g. channelSocket.port=8009)
server.xml
--------------------------------
<Server port="8005" shutdown="SHUTDOWN" debug="7">
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<GlobalNamingResources>
<Resource name="UserDatabase"
auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved">
</Resource>
<ResourceParams name="UserDatabase">
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users.xml</value>
</parameter>
</ResourceParams>
</GlobalNamingResources>
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">
<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
<Connector port="8080"
enableLookups="false"
redirectPort="8443"
acceptCount="100"
connectionTimeout="20000"
disableUploadTimeout="true" />
<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false"
redirectPort="8443"
debug="5"
protocol="AJP/1.3" />
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost" debug="0">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log."
suffix=".txt"
timestamp="true"/>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
debug="0"
resourceName="UserDatabase"/>
<Host name="localhost"
debug="0"
appBase="webapps"
unpackWARs="true"
autoDeploy="true"
xmlValidation="false"
xmlNamespaceAware="false">
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs"
prefix="localhost_log."
suffix=".txt"
timestamp="true"/>
</Host>
</Engine>
</Service>
</Server>
httpd.conf
------------------------------
# Add in the jk2 module
LoadModule jk2_module modules/mod_jk2.so
The log files:
/usr/local/apache/logs/jk2.log simply says it couldn't connect, but no
indication is given as to why:
( info ) [jk_logger_file.c (184)] Initializing log file
/usr/local/apache/logs/jk2.log
(debug ) [jk_env.c (383)] env.getByName(): Get by name workerEnv 1edb98
(debug ) [jk_env.c (248)] env.createBean2(): Create [lb] lb
(debug ) [jk_env.c (248)] env.createBean2(): Create [threadMutex] (null)
(debug ) [jk_env.c (312)] env.createBean2(): register threadMutex:6 21bc60
(debug ) [jk_env.c (248)] env.createBean2(): Create [threadMutex] (null)
(debug ) [jk_env.c (312)] env.createBean2(): register threadMutex:7 21fc70
(debug ) [jk_env.c (383)] env.getByName(): Get by name workerEnv 1edb98
(debug ) [jk_env.c (248)] env.createBean2(): Create [threadMutex] (null)
(debug ) [jk_env.c (312)] env.createBean2(): register threadMutex:8 223c80
(debug ) [jk_env.c (312)] env.createBean2(): register lb:lb 219c30
(debug ) [jk_env.c (248)] env.createBean2(): Create [threadMutex] (null)
(debug ) [jk_env.c (312)] env.createBean2(): register threadMutex:9 225c88
(debug ) [jk_env.c (383)] env.getByName(): Get by name ajp13:localhost:8009
1fdbe8
(debug ) [jk_env.c (383)] env.getByName(): Get by name ajp13:localhost:8009
1fdbe8
(debug ) [jk_env.c (248)] env.createBean2(): Create [handler.response]
(debug ) [jk_env.c (312)] env.createBean2(): register handler.response: 227c98
(debug ) [jk_env.c (248)] env.createBean2(): Create [handler.logon]
(debug ) [jk_env.c (312)] env.createBean2(): register handler.logon: 1c71e0
(error ) [jk_shm.c (333)] shm.init(): No file
(debug ) [jk_env.c (248)] env.createBean2(): Create [uri] *
(debug ) [jk_env.c (383)] env.getByName(): Get by name workerEnv 1edb98
(debug ) [jk_env.c (312)] env.createBean2(): register uri:* 245bc0
(debug ) [jk_uriMap.c (377)] uriMap.init() Fixing Host *
(debug ) [jk_env.c (248)] env.createBean2(): Create [uri] */
(debug ) [jk_env.c (383)] env.getByName(): Get by name workerEnv 1edb98
(debug ) [jk_env.c (312)] env.createBean2(): register uri:*/ 249bd0
(debug ) [jk_uriMap.c (464)] uriMap: fix uri (null) context (null) host *
(debug ) [jk_uriMap.c (464)] uriMap: fix uri /jsp-examples/* context (null) host
*
(debug ) [jk_uriMap.c (464)] uriMap: fix uri /jkstatus/* context (null) host *
(debug ) [jk_uriMap.c (464)] uriMap: fix uri (null) context (null) host *
(debug ) [jk_uriMap.c (464)] uriMap: fix uri / context / host *
(debug ) [jk_env.c (383)] env.getByName(): Get by name ajp13:localhost:8009
1fdbe8
(debug ) [jk_env.c (383)] env.getByName(): Get by name status:status 20bc08
( info ) [jk_workerEnv.c (403)] workerEnv.init() ok
/usr/local/apache/conf/workers2.properties
(error ) [mod_jk2.c (557)] mod_jk child init 1 0
(debug ) [jk_env.c (157)] env:Create child env 1d19a0 1f8ff0
(debug ) [jk_env.c (248)] env.createBean2(): Create [endpoint] (null)
(debug ) [jk_env.c (383)] env.getByName(): Get by name workerEnv 1edb98
(debug ) [jk_env.c (312)] env.createBean2(): register endpoint:10 255c98
(error ) [jk_endpoint.c (90)] workerEnv.init() create slot epStat.0 failed
(error ) [mod_jk2.c (678)] mod_jk.handler() Error connecting to tomcat 120000
/usr/local/tomcat/logs/localhost_log doesn't indicate any startup problem:
StandardContext[/jsp-examples]ContextListener: contextInitialized()
StandardContext[/jsp-examples]SessionListener: contextInitialized()
StandardContext[/servlets-examples]ContextListener: contextInitialized()
StandardContext[/servlets-examples]SessionListener: contextInitialized()
And /usr/local/tomcat/logs/catalina.out has no errors
Any insights / corrections to my config files would be greatly welcomed.
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org