Link to home
Start Free TrialLog in
Avatar of bryndavies
bryndavies

asked on

mod_jk2 settings in Apache httpd.conf file

I am trying to use Apache 2.0.43 and Tomcat 4.1.12, integrated using the mod_jk2-2.0.43.dll on windows XP.

I have previously used mod_jk successfully but am attempting to change to mod_jk2. I have an Include statement in my httpd.conf which pulls in a configuration file mod_jk2.conf, as follows:

LoadModule jk2_module modules/mod_jk2-2.0.43.dll
JkWorkersFile (blah blah)
JkLogFile (blah blah)
JkLogLevel error

However, Apache refuses to start, and outputs a message to the event log:

Invalid command 'JkWorkersFile', perhaps mis-spelled or defined by a module not included in the server configuration.

Presumably the JkWorkersFile, and possibly JkLogFile and JkLogLevel commands have been renamed for mod_jk2 - but what to? I cannot find any information on this on the Apache website.

There seem to be plenty of you guys who are using mod_jk2, so please let me know how I point the dll to the workers2.properties file, and you'll be 50 points better off and I'll be able to sleep easily.

Thanks!
Avatar of gvinayak
gvinayak

Hi!
   I was using an earlier version of apache and tomcat and tried to integrate them and obtained the same error.
   I included the

<IfModule !mod_jk.c>
  LoadModule jk_module c:/winnt/system32/mod_jk.dll
</IfModule>
and followed it IMMEDIATELY with
JkWorkersFile "D:\Program Files\tomcat\jakarta-tomcat-4.0.4\conf\jk\workers.properties"
 and I stopped getting the error.
   Try this and let me know if you still have the error.
cheers
Avatar of bryndavies

ASKER

Thanks gvinayak

I have used mod_jk.dll successfully in the way you have described, but this method does not work with mod_jk2.dll. I get the error described in my original post.

I've given up trying to get mod_jk2 working for the time being as it was becoming too much of a distraction but I am still interested in the solution if anyone knows it.

Bryn
I have the exact configuration you have running, except under Linux. I know there are a great many undocumented inconsistencies for the connectors, but mine succesfully runs with the same statements that you are using, except that I use mod_jk-2.0.42. It's hit and miss, but it might make a difference.
ASKER CERTIFIED SOLUTION
Avatar of serserv
serserv

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of periwinkle
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area with the following recommendation for this question:

Answered by serserv

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

periwinkle
EE Cleanup Volunteer
I am trying to get mod_jk2 to work as well, but I have an additional complication in that I have installed apache 1.3 from the FreeBSD ports collection, and the httpd.conf file does not live in $APACHE_HOME/conf as in a std installation.  Instead it lives in /usr/local/etc/apache directory.  When I drop in the workers2.properties file, it does not get recognized.  Is there anything I can put in the httpd.conf file that will allow me to specify exactly the location of workers2.properties?

Thanks,
Jeff
I found something that gave me a bit of a surprise. I found out that when giving the following,
    <IfModule !mod_jk2.c>
      LoadModule jk2_module /usr/lib/mod_jk2.so
    </IfModule>
the mod_jk2.so module never got loaded. But when I commented out the IfModule lines, then started Apache, and then restarted Apache again, I got the following:
    WARNING: mod_jk2.so already loaded. Skipping.

This indicates that the mod_jk2.so file had been loaded previously.

But, I've noticed ALL over the web that information is being given only about how to link Apache with mod_jk. Not with mod_jk2. Sites talking about integrating with mod_jk indicate to include the line:
    JkWorkersFile "/var/jk/workers.properties"

This "JKWorkersfile" works only for mod_jk.so.

Question 1:
Does anybody have any idea what the equivalent is for mod_jk2.so????? I have tried giving "JKWorkersfile", "JKWorkerfile", "JK2Workersfile", "JK2Workerfile"... basically all sorts of permitations and combinations. Apache just wont allow this keyword.

Question 2:
In the place where we specify the LoadModule for mod_jk2 (as under)
    LoadModule jk2_module modules/mod_jk2.so
I guess we need to fully qualify the path to mod_jk2 in case mod_jk2 is placed under a different directory other than [Apache_Install_Dir]/modules. Is this right?