DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12946.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12946
parameter serverRoot from jk2.properties not read; workaround
--- Additional Comments From [EMAIL PROTECTED] 2002-10-04 08:15 ---
Right!
As I now notice, there is no serverRoot parameter mentioned in Jakarta's JK2-
Documentation.
Even so: How does the native side JK get to know about the location of
workers2.properties ?? Appearently the value of serverRoot, as stated in
$CATALINA_HOME/conf/jk2.properties or elsewhere, must be read in order for the
native JK to take knowledge of the location of workers2.properties and be able
to process it.
At the time I submitted this report, $CATALINA_HOME/conf/jk2.properties was one
I took from Simon Steward's web site
http://www.pubbitch.org/jboss/mod_jk2.html, having only modified
$CATALINA_HOME. Locations were correct
# jk2.properties
# list of needed handlers.
handler.list=apr,channelSocket,channelUnix,request
# Set the default port for the channelSocket
channelSocket.port=8009
# State where the UNIX domain socket is located
channelUnix.file=/opt/jakarta-tomcat-4.1.10/work/jk2.socket
# Dynamic library
serverRoot=/usr/local/apache2
apr.NativeSo=/opt/jakarta-tomcat-4.1.10/lib/libjkjni.so
# end of jk2.properties
By the time, $APACHE_HOME/conf/workers2.properties also was one I took from the
same JBoss web site, having only modified $CATALINA_HOME. Locations were correct
# workers2.properties
# Shared memory handling. Needs to be set.
[shm]
file=/usr/local/apache2/logs/shm.file
size=1048576
# Example socket channel, explicitly set port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
# Example UNIX domain socket
[channel.un:/usr/local/tomcat/work/jk2.socket]
tomcatId=localhost:8009
debug=0
# define the worker
[ajp13:localhost:8009]
channel=channel.un:/usr/local/tomcat/work/jk2.socket
# To use the TCP/IP socket instead, just comment out the above
# line, and uncomment the one below
#channel=channel.socket:localhost:8009
# Announce a status worker
[status:status]
# Uri mapping
[uri:/examples/*]
#worker=ajp13:localhost:8009
worker=ajp13:/usr/local/tomcat/work/jk2.socket
[uri:/status/*]
worker=status:status
# end of workers2.properties
Before exporting serverRoot=/usr/local/apache2, thee startup messages in
$CATALINA_HOME/logs/catalina.out were like
[INFO] Registry - -Loading registry information
[INFO] Registry - -Creating new Registry instance
[INFO] Registry - -Creating MBeanServer
[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.10
[INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080
[Fri Oct 04 09:51:29 2002] (error ) [jk_config_file.c (261)] config.update():
Can't find config file ${serverRoot}/conf/workers2.properties
[Fri Oct 04 09:51:29 2002] ( info ) [jk_config.c (246)] config.setAttribute()
Error setting config: file ${serverRoot}/conf/workers2.properties
[Fri Oct 04 09:51:29 2002] (error ) [jk_logger_file.c (171)] Initializing log
file stderr
[Fri Oct 04 09:51:29 2002] (error ) [jk_shm.c (333)] shm.init(): No file
[Fri Oct 04 09:51:29 2002] ( info ) [jk_workerEnv.c (403)] workerEnv.init() ok
${serverRoot}/conf/workers2.properties
[INFO] ChannelSocket - -JK2: ajp13 listening on tcp port 8009
[INFO] ChannelUn - -JK: listening on unix socket: /opt/jakarta-tomcat-
4.1.10/work/jk2.socket
[INFO] JkMain - -Jk running ID=0 time=1/87 config=/opt/jakarta-tomcat-
4.1.10/conf/jk2.properties
[INFO] ChannelSocket - -Port busy 8009 java.net.BindException: Address already
in use
[INFO] ChannelSocket - -JK2: ajp13 listening on tcp port 8010
[INFO] ChannelUn - -JK: listening on unix socket: /opt/jakarta-tomcat-
4.1.10/work/jk2.socket1
[INFO] JkMain - -Jk running ID=1 time=1/18 config=/opt/jakarta-tomcat-
4.1.10/conf/jk2.properties
[Fri Oct 04 09:51:29 2002] ( info ) [jk_jni_aprImpl.c (470)] jkInvoke() invoke
f30d4c38
[Fri Oct 04 09:51:29 2002] ( info ) [jk_jni_aprImpl.c (470)] jkInvoke() invoke
f30d4c38
AFTER putting
serverRoot=/usr/local/apache2
export serverRoot
at the top of $CATALINA_HOME/bin/startup.sh
the startup messages turned to
[INFO] Registry - -Loading registry information
[INFO] Registry - -Creating new Registry instance
[INFO] Registry - -Creating MBeanServer
[INFO] Http11Protocol - -Initializing