1 Reply Latest reply on Nov 2, 2003 8:46 AM by jcordes

    Invalid command JkWorkersFile

    rsrivast

      I am trying to configure HTTP clustering with JBoss 3.2.1 and Apache 2.0.47 under Windows 2k. I have done the following:
      1. Downloaded mod_jk2 binary and copied under /module.
      2. Added the stmt to include mod-jk.conf in httpd.conf.
      3. Created mod-jk.conf and workers.properties under /conf as per the JBossClustering doc.

      When starting apache, I get following error in the console...
      Syntax error on line 2 of C:/Program Files/Apache Group/Apache2/conf/mod-jk.conf:
      Invalid command 'JkWorkersFile', perhaps mis-spelled or defined by a module not included in the server configuration.

      My mod-jk.conf looks like this...

      LoadModule jk2_module modules/mod_jk2-2.0.43.dll
      JkWorkersFile conf/workers.properties
      # Where to put jk logs
      JkLogFile logs/mod_jk.log
      # Set the jk log level [debug/error/info]
      JkLogLevel info
      # Select the log format
      JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
      # JkOptions indicate to send SSL KEY SIZE,
      JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
      # JkRequestLogFormat set the request format
      JkRequestLogFormat "%w %V %T"
      JkMount /* loadbalancer

      What's wrong with the 'JkWorkersFile' command?

      Thanks in advance!

        • 1. Re: Invalid command JkWorkersFile
          jcordes

          Hi !

          You're trying to configure mod_jk2 with configuration options for mod_jk. Create a config-file named workers2.properties in the apache/conf directory. A short example:

          [logger]
          level=DEBUG

          [shm]
          file=F:\Programme\Apache Group\Apache\logs\shm.file
          size=1048576

          # Example socket channel, override port and host.
          [channel.socket:node1]
          port=11009
          host=127.0.0.1
          group=lb
          lbfactor=1
          tomcatId=node1

          [channel.socket:node2]
          port=12009
          host=127.0.0.1
          group=lb
          lbfactor=1
          tomcatId=node2

          # define the worker
          [ajp13:node1]
          channel=channel.socket:node1
          level=INFO

          [ajp13:node2]
          channel=channel.socket:node2
          level=INFO

          # Uri mapping
          [uri:/myshop/*]
          context=/myshop
          worker=lb

          [uri:/web-console/*]
          context=/web-console
          worker=lb

          [uri:/jmx-console/*]
          context=/jmx-console
          worker=lb


          [lb:lb]
          debug=1
          stickySession=1

          # define the worker
          [status:status]

          # Uri mapping
          [uri:/jkstatus/*]
          worker=status:status


          Documentation can be found at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/ under the section JK2.

          HTH,

          Jochen.