Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 08-23-2003, 01:12 PM   #1
LQ Newbie
Registered: Aug 2003
Posts: 3

Rep: Reputation: 0
mod_jk2 Apache error


I have been trying to get mod_jk2 setup on the standard Redhat9 install of Apache...

I tried building the source and I get c compile errors out of ANT... So I tried just downloading the latest binary for Linux I could find from the apache site (

I added the following line to httpd.conf:
LoadModule jk2_module modules/

When I start apache I get the following error:

httpd failed. The error was: Stopping httpd: [FAILED]

Starting httpd: httpd: module "../../server/apache2/mod_jk2.c" is not compatible with this version of Apache.
Please contact the vendor for the correct version.

Any ideas on how to move forward would be greatly appreciated.

Old 08-23-2003, 09:54 PM   #2
Registered: Jul 2003
Posts: 162

Rep: Reputation: Disabled
Sounds like you're trying to use something made for apache 1.x but your on apache 2.x (default red hat 9 install of apache). You could always downgrade to 1.x, there's more module support.
Old 08-25-2003, 03:41 PM   #3
LQ Newbie
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
I ended up installing the latest 'production quality' release of apache 2. Added the module in the config and it worked fine. I'm guessing that Redhat9 has a very early release of Apache 2?!?! Anyway, it works fine now. Thanks.
Old 08-29-2003, 04:23 PM   #4
LQ Newbie
Registered: Jul 2003
Posts: 4

Rep: Reputation: 0
I'm trying to install it myself and I'm having tons of trouble, I tried a gazillion configs and I'm really lost here :'(

I got in /usr/local/apache2/modules/ (along with
(it was built using jakarta-tomcat-connectors-4.1.24-src)
I got Tomcat 4.1.27 in /usr/local/jakarta-tomcat-4.1.27/
I got Apache 2.0.47

Apache runs fine alone (port 80) and Tomcat runs fine alone (port 8080)
Now whenever I try to run both together (that means adding the line
LoadModule jk2_module /usr/local/apache2/modules/
) Appache gets me the following error:
Starting httpd: httpd: module "../../server/apache2/mod_jk2.c" is not compatible with this version of Apache.
Please contact the vendor for the correct version.

I got my going on too
Here's a snippet

# Define 1 real worker using ajp13

# Set properties for worker1 (ajp13)

Here's my server.xml:

<Server port="8005" shutdown="SHUTDOWN" debug="0">
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" debug="0"/>
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" debug="0"/>

  <!-- Global JNDI resources -->

    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>

    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users -->
    <Resource name="UserDatabase" auth="Container"
       description="User database that can be updated and saved">
    <ResourceParams name="UserDatabase">


  <!-- Define the Tomcat Stand-Alone Service -->
  <Service name="Tomcat-Standalone">

    <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="8080" minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="100" debug="0" connectionTimeout="20000"
               useURIValidationHack="false" disableUploadTimeout="true" />
    <!-- Note : To disable connection timeouts, set connectionTimeout value to -1 -->

    <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="8009" minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="10" debug="0" connectionTimeout="0"

      <!-- Global logger unless overridden at lower levels -->
      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="catalina_log." suffix=".txt"

      <!-- This Realm uses the UserDatabase configured in the global JNDI
           resources under the key "UserDatabase".  Any edits
           that are performed against this UserDatabase are immediately
           available for use by the Realm.  -->
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                 debug="0" resourceName="UserDatabase"/>

      <!-- Define the default virtual host -->
      <Host name="localhost" debug="0" appBase="webapps"
       unpackWARs="true" autoDeploy="true">

        <!-- Logger shared by all Contexts related to this virtual host.  By
             default (when using FileLogger), log files are created in the "logs"
             directory relative to $CATALINA_HOME.  If you wish, you can specify
             a different directory with the "directory" attribute.  Specify either a
             relative (to $CATALINA_HOME) or absolute path to the desired
        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="localhost_log." suffix=".txt"

        <!-- Tomcat Examples Context -->
        <Context path="/examples" docBase="examples" debug="0"
                 reloadable="true" crossContext="true">
          <Logger className="org.apache.catalina.logger.FileLogger"
                     prefix="localhost_examples_log." suffix=".txt"
          <Ejb   name="ejb/EmplRecord" type="Entity"

          <Environment name="maxExemptions" type="java.lang.Integer"
          <Parameter name="" value="context.param.value"
          <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
          <ResourceParams name="jdbc/EmployeeAppDb">
          <Resource name="mail/Session" auth="Container"
          <ResourceParams name="mail/Session">
          <ResourceLink name="linkToGlobalResource"





What is going on here? :'(

(edit : a few corrections here and there)

Last edited by Morgrog; 08-29-2003 at 04:26 PM.
Old 08-29-2003, 05:49 PM   #5
LQ Newbie
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0

I don't know if I have your answer but here is a few things to try...

1. Wrong httpd?
I got that error message when I first re-installed a new version of Apache httpd. You need to make sure your last version of httpd is stopped. On Redhat 9 you can go to their equivalent of the 'Start' button and then "System Settings" > "Server Settings" > "Services". Go to the httpd service and make sure it is stopped... I unchecked it as well so that it didn't start when the system re-started.

Then: /usr/local/apache2/bin/apachectl start

I checked that I was running the new version because the documentation looked like it does on the site. The default redhat httpd server showed an older version of the docs... I'm sure there are many better ways to check your running version - I just don't know them... btw, the version I downloaded was httpd-2.0.47

2. mod_jk2 version
I downloaded a binary version of mod_jk2. The file is called There were two other versions I tried that just weren't going to work no matter what I did. I got mine from here:

This is literally the only .so file I have in my modules directory. I don't know where the others went - but it is there by itself and everything works.

3. workers file
my workers file has a different name. It is called:
It looks like the way you are doing it is from a previous version of mod_jk. Anyway my is in my conf directory. It looks like:

# Example socket channel, override port and host.

# define the worker

# Uri mapping

so a URL like:
http://localhost/joanda/index.html goes to my webapp that is loaded under the joanda context. I'm actually running the webapp out of JBoss but that shouldn't make any difference... Jo is my wife and my name is Adrian - so our site is joanda. Completely irrelevant to your problem - but hey...

4. LoadModule
My httpd.conf line looks like:
LoadModule jk2_module modules/mod_jk2-2.0.43

This is the only LoadModule that is in my httpd.conf file - again I don't know where all the others went - but it works.

Well I hope this helps. Let me know if you get it working!

Old 08-31-2003, 04:52 PM   #6
LQ Newbie
Registered: Jul 2003
Posts: 4

Rep: Reputation: 0
It's working! wonderful, thanks a zillion

I think the only thing I forgot was the uri mapping... (and of course the good version of jk2)

Thanks again!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help - mod_jk2 connector / Tomcat 5 / Apache 2 / Redhat 9 sfwhip Programming 5 06-13-2004 01:57 AM
How to connect Tomcat 5 and Apache 2.0.48 using mod_jk2 zhangwf Linux - Networking 1 03-20-2004 08:42 AM
How to connect Tomcat 5 and Apache 2.0.48 using mod_jk2 zhangwf Linux - Newbie 0 03-19-2004 08:21 PM
mod_jk2, I just can't do this. techrolla Linux - Networking 4 01-07-2004 07:29 AM
Trying to integrate Apache w/ Tomcat....error message w/ mlhammer Linux - General 2 10-06-2003 03:10 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:07 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration