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 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:55:24 2002] ( info ) [jk_config_file.c (302)]  cfg.update() 
Updating config /usr/local/apache2/conf/workers2.properties 1548561606 
1033717825
[Fri Oct 04 09:55:24 2002] ( info ) [jk_config_file.c (313)]  config.setConfig
():  Reading properties /usr/local/apache2/conf/workers2.properties 7
[Fri Oct 04 09:55:24 2002] (error ) [jk_logger_file.c (171)]  Initializing log 
file stderr
[Fri Oct 04 09:55:24 2002] ( info ) [jk_workerEnv.c (403)]  workerEnv.init() 
ok /usr/local/apache2/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=2/84  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=0/22  config=/opt/jakarta-tomcat-
4.1.10/conf/jk2.properties


In fact, I am now running with the following properties AND serverRoot set in 
the Unix Environment:

#---- jk2.properties
        
      class.channelUnix2=org.apache.jk.common.ChannelUn
      # List of needed handlers
      handler.list=apr,channelUnix,channelUnix2,request
 
      # State where the Unix domain socket is located
      channelUnix.file=/opt/jakarta-tomcat-4.1.10/work/jk2.socket
      channelUnix2.file=/opt/jakarta-tomcat-4.1.10/work/jk2.secure
 
      # Dynamic library
      serverRoot=/usr/local/apache2
      apr.NativeSo=/opt/jakarta-tomcat-4.1.10/lib/libjkjni.so

#---- end of jk2.properties

#---- workers2.properties

      # Shared memory handling. Needs to be set.
      [shm]
      file=/usr/local/apache2/logs/shm.file
      size=1048576
 
      # UNIX domain socket for http schema
      [channel.un:/opt/jakarta-tomcat-4.1.10/work/jk2.socket]
      tomcatId=localhost:8009
      debug=0
 
      # UNIX domain socket for https schema
      [channel.un:/opt/jakarta-tomcat-4.1.10/work/jk2.secure]
      tomcatId=localhost:8099
      debug=0
 
      # define the worker
      [ajp13:localhost:8009]
      channel=channel.un:/opt/jakarta-tomcat-4.1.10/work/jk2.socket
 
      # define the worker
      [ajp13:localhost:8099]
      channel=channel.un:/opt/jakarta-tomcat-4.1.10/work/jk2.secure
 
      # Announce a "status" worker
      [status:status]
 
      # Uri mapping
      [uri:/examples/*]
      worker=ajp13:/opt/jakarta-tomcat-4.1.10/work/jk2.socket
 
      [uri:/status/*]
      worker=status:status
 
      [uri:/*.jsp]
      worker=ajp13:/opt/jakarta-tomcat-4.1.10/work/jk2.socket

      .......

#---- end of workers2.properties

WITH serverRoot=/usr/local/apache2 SET as 
"export serverRoot=/usr/local/apache2" the startup messages are 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 10:09:16 2002] ( info ) [jk_config_file.c (302)]  cfg.update() 
Updating config /usr/local/apache2/conf/workers2.properties 4 1033718307
[Fri Oct 04 10:09:16 2002] ( info ) [jk_config_file.c (313)]  config.setConfig
():  Reading properties /usr/local/apache2/conf/workers2.properties 13
[Fri Oct 04 10:09:16 2002] (error ) [jk_logger_file.c (171)]  Initializing log 
file stderr
[Fri Oct 04 10:09:16 2002] (error ) [jk_worker_ajp13.c (712)]  ajp13.init(): No 
channel localhost:8009
[Fri Oct 04 10:09:16 2002] (error ) [jk_workerEnv.c (193)]  
workerEnv.initWorkers() init failed for ajp13:localhost:8009
[Fri Oct 04 10:09:16 2002] (error ) [jk_worker_ajp13.c (712)]  ajp13.init(): No 
channel localhost:8099
[Fri Oct 04 10:09:16 2002] (error ) [jk_workerEnv.c (193)]  
workerEnv.initWorkers() init failed for ajp13:localhost:8099
[Fri Oct 04 10:09:16 2002] ( info ) [jk_workerEnv.c (403)]  workerEnv.init() 
ok /usr/local/apache2/conf/workers2.properties
[INFO] ChannelUn - -JK: listening on unix socket: /opt/jakarta-tomcat-
4.1.10/work/jk2.socket
[INFO] ChannelUn - -JK: listening on unix socket: /opt/jakarta-tomcat-
4.1.10/work/jk2.secure
[INFO] JkMain - -Jk running ID=0 time=5/102  config=/opt/jakarta-tomcat-
4.1.10/conf/jk2.properties
[INFO] ChannelUn - -JK: listening on unix socket: /opt/jakarta-tomcat-
4.1.10/work/jk2.socket
[INFO] ChannelUn - -JK: listening on unix socket: /opt/jakarta-tomcat-
4.1.10/work/jk2.secure
[INFO] JkMain - -Jk running ID=0 time=1/25  config=/opt/jakarta-tomcat-
4.1.10/conf/jk2.properties


WITHOUT SETTING serverRoot in the environment, the startup messages from 
catalina.out are

[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 10:11:24 2002] (error ) [jk_config_file.c (261)]  config.update(): 
Can't find config file ${serverRoot}/conf/workers2.properties
[Fri Oct 04 10:11:24 2002] ( info ) [jk_config.c (246)]  config.setAttribute() 
Error setting config: file ${serverRoot}/conf/workers2.properties
[Fri Oct 04 10:11:24 2002] (error ) [jk_logger_file.c (171)]  Initializing log 
file stderr
[Fri Oct 04 10:11:24 2002] (error ) [jk_shm.c (333)]  shm.init(): No file
[Fri Oct 04 10:11:24 2002] ( info ) [jk_workerEnv.c (403)]  workerEnv.init() ok 
${serverRoot}/conf/workers2.properties
[INFO] ChannelUn - -JK: listening on unix socket: /opt/jakarta-tomcat-
4.1.10/work/jk2.socket
[INFO] ChannelUn - -JK: listening on unix socket: /opt/jakarta-tomcat-
4.1.10/work/jk2.secure
[INFO] JkMain - -Jk running ID=0 time=2/83  config=/opt/jakarta-tomcat-
4.1.10/conf/jk2.properties
[INFO] ChannelUn - -JK: listening on unix socket: /opt/jakarta-tomcat-
4.1.10/work/jk2.socket
[INFO] ChannelUn - -JK: listening on unix socket: /opt/jakarta-tomcat-
4.1.10/work/jk2.secure
[INFO] JkMain - -Jk running ID=0 time=1/30  config=/opt/jakarta-tomcat-
4.1.10/conf/jk2.properties

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to