tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morris Hooten <Morris.Hoo...@Sun.COM>
Subject Connecting Tomcat 5.5 to Apache 2
Date Wed, 01 Sep 2004 23:24:37 GMT
I have tried several versions of tomcat with several versions of apache 
and have installed and reinstalled and I can bring up both fine and
access apache web pages and the tomcat webpage to see the examples page, 
etc.

However, I can't seem to make them communicate no matter what I do.

This seems to be the most complicated plugin to get right.

I have included my log files and conf files for bothe apache and tomcat.

Does anyone have an easier way to get the two talking?

I'm pulling my hair out after two days of this!

Thanks






My jk2.properties is below:


more jk2.properties
## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
## WHEN YOU EDIT THE FILE.

## COMMENTS WILL BE _LOST_

## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.

# Set the desired handler list
# handler.list=apr,request,channelSocket
#
# Override the default port for the socketChannel
# channelSocket.port=8019
# Default:
# channelUnix.file=${jkHome}/work/jk2.socket
# Just to check if the the config  is working
# shm.file=${jkHome}/work/jk2.shm

# In order to enable jni use any channelJni directive
# channelJni.disabled = 0
# And one of the following directives:

# apr.jniModeSo=/opt/apache2/modules/mod_jk2.so

# If set to inprocess the mod_jk2 will Register natives itself
# This will enable the starting of the Tomcat from mod_jk2
# apr.jniModeSo=inprocess

Here is the tomcat log file starting up:

Sep 1, 2004 5:09:02 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Sep 1, 2004 5:09:02 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3967 ms
Sep 1, 2004 5:09:03 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 1, 2004 5:09:03 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.0
Sep 1, 2004 5:09:03 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Sep 1, 2004 5:09:06 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: 
[org.apache.webapp.balancer.RuleChain: 
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: 
News / Redirect URL: http://www.cnn.com], 
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param 
name: paramName / Target param value: paramValue / Redirect URL: 
http://www.yahoo.com], 
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: 
http://jakarta.apache.org]]
Sep 1, 2004 5:09:07 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Sep 1, 2004 5:09:07 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Sep 1, 2004 5:09:08 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Sep 1, 2004 5:09:08 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Sep 1, 2004 5:09:09 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Sep 1, 2004 5:09:09 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Sep 1, 2004 5:09:09 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=2/109 
config=/usr/local/jakarta-tomcat-5.5.0/conf/jk2.properties
Sep 1, 2004 5:09:10 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7225 ms



My workers2.properties file:


more workers2.properties
[logger]
level=DEBUG

[config:]
file=${serverRoot}/conf/workers2.properties
debug=0
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=0

# Alternate file logger
#[logger.file:0]
#level=DEBUG
#file=${serverRoot}/logs/jk2.log

[shm:]
info=Scoreboard. Required for reconfiguration and status with 
multiprocess servers
file=${serverRoot}/logs/jk2.shm
size=1000000
debug=0
disabled=0

[workerEnv:]
info=Global server options
timing=1
debug=0
# Default Native Logger (apache2 or win32 )
# can be overriden to a file logger, useful
# when tracing win32 related issues
#logger=logger.file:0

[lb:lb]
info=Default load balancer.
debug=0

[lb:lb_1]
info=A second load balancer.
debug=0

[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
debug=0
tomcatId=localhost:8009

[channel.socket:localhost:8019]
info=A second tomcat instance.
debug=0
tomcatId=localhost:8019
lb_factor=1
group=lb
group=lb_1
disabled=0

[channel.un:/opt/33/work/jk2.socket]
info=A second channel connecting to localhost:8019 via unix socket
tomcatId=localhost:8019
lb_factor=1
debug=0

[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess

[status:]
info=Status worker, displays runtime informations

[vm:]
info=Parameters used to load a JVM in the server process
#JVM=C:\jdk\jre\bin\hotspot\jvm.dll
classpath=${TOMCAT_HOME}/bin/tomcat-jni.jar
classpath=${TOMCAT_HOME}/server/lib/commons-logging.jar
OPT=-Dtomcat.home=${TOMCAT_HOME}
OPT=-Dcatalina.home=${TOMCAT_HOME}
OPT=-Xmx128M
#OPT=-Djava.compiler=NONE
disabled=1

[worker.jni:onStartup]
info=Command to be executed by the VM on startup. This one will start 
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=start
# For Tomcat 5 use the 'stard' for startup argument
# ARG=stard
disabled=1
stdout=${serverRoot}/logs/stdout.log
stderr=${serverRoot}/logs/stderr.log

[worker.jni:onShutdown]
info=Command to be executed by the VM on shutdown. This one will stop 
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=stop
disabled=1

[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:

[uri:127.0.0.1:8003]
info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to 
test it
alias=myVirtualHost:8003

[uri:127.0.0.1:8003/ex]
info=Example webapp in the virtual host. It'll go to lb_1 ( i.e. 
localhost:8019 )
context=/ex
group=lb_1

[uri:/login/*.jsp]
info=Example webapp in the default context.
context=/examples
debug=0

[uri:/examples1/*]
info=A second webapp, this time going to the second tomcat only.
group=lb_1
debug=0

[uri:/examples/servlet/*]
info=Prefix mapping

[uri:/examples/*.jsp]
info=Extension mapping

[uri:/examples/*]
info=Map the whole webapp

[uri:/examples/servlet/HelloW]
info=Example with debug enabled.
debug=10




Apache error_log


[Wed Sep 01 17:20:42 2004] [warn] Init: Session Cache is not configured 
[hint: SSLSessionCache]
[Wed Sep 01 17:20:44 2004] [notice] Digest: generating secret for digest 
authentication ...
[Wed Sep 01 17:20:44 2004] [notice] Digest: done
[Wed Sep 01 17:20:45 2004] [error] env.createBean2(): Factory error 
creating channel.jni:jni ( channel.jni, jni)
[Wed Sep 01 17:20:45 2004] [error] config.update(): Can't create 
channel.jni:jni
[Wed Sep 01 17:20:45 2004] [error] env.createBean2(): Factory error 
creating vm: ( vm, )
[Wed Sep 01 17:20:45 2004] [error] config.update(): Can't create vm:
[Wed Sep 01 17:20:45 2004] [error] env.createBean2(): Factory error 
creating worker.jni:onStartup ( worker.jni, onStartup)
[Wed Sep 01 17:20:45 2004] [error] config.update(): Can't create 
worker.jni:onStartup
[Wed Sep 01 17:20:45 2004] [error] env.createBean2(): Factory error 
creating worker.jni:onShutdown ( worker.jni, onShutdown)
[Wed Sep 01 17:20:45 2004] [error] config.update(): Can't create 
worker.jni:onShutdown
[Wed Sep 01 17:20:45 2004] [notice] jk2_init() Found child 26286 in 
scoreboard slot 0
[Wed Sep 01 17:20:45 2004] [notice] jk2_init() Found child 26287 in 
scoreboard slot 1
[Wed Sep 01 17:20:45 2004] [notice] jk2_init() Found child 26288 in 
scoreboard slot 2
[Wed Sep 01 17:20:45 2004] [notice] uriMap: creating context */examples
[Wed Sep 01 17:20:45 2004] [error] jk2_init() Can't find child 26289 in 
scoreboard
[Wed Sep 01 17:20:45 2004] [notice] workerEnv.init() ok 
/usr/local/apache2/conf/workers2.properties
[Wed Sep 01 17:20:45 2004] [error] mod_jk child init 1 0
[Wed Sep 01 17:20:45 2004] [notice] uriMap: creating context */examples
[Wed Sep 01 17:20:45 2004] [notice] workerEnv.init() ok 
/usr/local/apache2/conf/workers2.properties
[Wed Sep 01 17:20:45 2004] [notice] uriMap: creating context */examples
[Wed Sep 01 17:20:45 2004] [notice] Apache/2.0.50 (Unix) DAV/2 
mod_ssl/2.0.50 OpenSSL/0.9.7d mod_jk2/2.0.2 configured -- resuming 
normal operations
[Wed Sep 01 17:20:45 2004] [notice] uriMap: creating context */examples
[Wed Sep 01 17:20:45 2004] [notice] workerEnv.init() ok 
/usr/local/apache2/conf/workers2.properties
[Wed Sep 01 17:20:45 2004] [notice] workerEnv.init() ok 
/usr/local/apache2/conf/workers2.properties
[Wed Sep 01 17:20:45 2004] [error] mod_jk child init 1 -2
[Wed Sep 01 17:20:45 2004] [notice] jk2_init() Found child 26290 in 
scoreboard slot 4
[Wed Sep 01 17:20:45 2004] [notice] uriMap: creating context */examples
[Wed Sep 01 17:20:45 2004] [notice] workerEnv.init() ok 
/usr/local/apache2/conf/workers2.properties





---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message