Skip navigation
Currently Being Moderated

mod_jk load error with Apache on OS X

Mar 3, 2012 10:59 PM

Hello -


I have been running CF9 on OS X with a MacPorts install of Apache 2.2.21 with no issues as a "standalone" server installation. To get ready for CF10 I have ben trying to get CF10 configured with Apache. The specefic error I am getting when launching Apache is:


Cannot load /Applications/ColdFusion10/config/wsconfig/1/ into server: dlopen( /Applications/ColdFusion10/config/wsconfig/1/, 10): Symbol not found: _apr_stat$INODE64\n Referenced from: /Applications/ColdFusion10/config/wsconfig/1/\n Expected in flat namespace\n /Applications/ColdFusion10/config/wsconfig/1/


I have done the following:


1. Recompiled Apache and forced a 64-bit compile

2. Uninstalled CF9

3. Uninstalld and reinsalled CF10

4. apxs is installed in /opt/local/apache2/bin (listed asa requirement in one of the documentation PDFs)

5. This is a Lion 10.7.3 with Xcode 4.2.1 currently installed


The error listed above is only a warning. Apache starts and still servers html files. I am a bit stumped and have no experience with Tomcat. Any help in finding a solution to this problem will be appreciated.


Thank you


  • Currently Being Moderated
    Mar 4, 2012 3:46 PM   in reply to lescall

    I'm having the same issue.  I tried compiling mod_jk from source instead, which actually lets apache start but instead the browser responds with "The proxy server received an invalid response from an upstream server." when accessing something from CF.


    Error in the mod_jk.log is:


    [Mon Mar 05 10:38:52 2012] [3429:140735255423328] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (1334): wrong message size 11744 8192 from


    Can't find anything useful about this error online, so I'm stumped too.


    Have also been trying to find where CF10 stores / compiles the from, but no luck there either.

    Mark as:
  • Currently Being Moderated
    Mar 4, 2012 4:21 PM   in reply to lescall

    lescall - I'm still using wsconfig to get Coldufsion to setup the appropriate Apache config stuff for Coldfusion, but then I just comment out their load_module and use the one I've compiled.


    Also make sure your AJP connector is enabled in cfusion/runtime/conf/server.xml:


    <Connector port="8012" protocol="AJP/1.3" redirectPort="8445" tomcatAuthentication="false" />


    With "verbose logging" on the connector I can see that Apache is sending the HTTP request to CF, and I can see CF is responding with headers but then I get the "wrong message size" error as above and the connection fails.


    Not sure where the issue is, whether it's the source built mod_jk I'm using, CFs setup or something about the mod_jk setup with Coldfusion's properties files etc.

    Mark as:
  • Currently Being Moderated
    Mar 4, 2012 4:47 PM   in reply to MarcinSz

    I've made some progress!


    I explicitly set the max_packet_size in the and a matching packetSize in the Connector in server.xml (set both to 65536 which is the max according to the Tomcat docs) and actually got the CF Administrator to load!  However I'm still getting errors, always for the same resources, which show in the mod_jk logs as:


    [Mon Mar 05 11:43:40 2012] [88850:140735255423328] [error] ajp_process_callback::jk_ajp_common.c (2022): Unknown AJP protocol code: 0F


    For example /CFIDE/administrator/topnav.cfm will throw that error, but other Administrator pages load fine.


    Anyway, something is off with the way Tomcat on CF10 is setup by default!

    Mark as:
  • Currently Being Moderated
    Mar 4, 2012 6:30 PM   in reply to MarcinSz

    .. and note that it works fine with Apple's built in Apache,  just not with the Macports one.  So maybe it's something about the way Macports and it's utilities are built instead.

    Mark as:
  • Currently Being Moderated
    Mar 4, 2012 8:26 PM   in reply to lescall

    The cfusion folder is the CF "instance" (ie. if you create multiple instances using Administrator additional similar directories get created parallel to cfusion).


    The instance directory contains the CF application as well as the Tomcat server.  When you start an instance you start Tomcat (the "java" process you're seeing) which has the CF app loaded within itself.  Apache talks to Tomcat using AJP (a binary protocol) which is implemented on the Apache side via mod_jk and on the Tomcat side via a Connector defined in server.xml for that instance.


    So, similar to how JRun works with the connector, Apache and Tomcat are entirely separate processes and only talk via the AJP binary protocol.


    You create a worker in for each AJP server you want Apache to connect to with mod_jk - defining the server, port and other parameters.  This is how you would setup Apache to talk to multiple CF instances.


    At least that's how I understand it!

    Mark as:
  • Currently Being Moderated
    Mar 4, 2012 9:42 PM   in reply to lescall

    We have made changes in the Tomcat connector. So you should use wsconfig tool to configure the connector. Building mod_jk from source will most probably not work and is not something we will support. Do you get any error if you use wsconfig to configure the connector with Apache?


    Also, is there any particular reason why you would build the apache yourself instead of using the in-built one? We have been using the inbuilt one in our regressions, and we haven’t found any issues with that.

    Mark as:
  • Currently Being Moderated
    Mar 4, 2012 9:54 PM   in reply to rupesh_kumar

    It's easier to use the Macports Apache when also using tools like PHP, Python (via mod_wsgi) etc as it's just a case of (eg.) "port install mod_wsgi" to get it running.  A lot of developers use Macports built Apache for this reason.  It easily lets you stay on the latest versions of Apache, PHP, and other tools vs the older versions that Apple provides.


    The wsconfig configured connector doesn't work with source built Apache due to the error already mentioned in the first post in this thread on Apache startup:


    Cannot load /Applications/ColdFusion10/config/wsconfig/1/ into server: dlopen( /Applications/ColdFusion10/config/wsconfig/1/, 10): Symbol not found: _apr_stat$INODE64\n Referenced from: /Applications/ColdFusion10/config/wsconfig/1/\n Expected in flat namespace\n /Applications/ColdFusion10/config/wsconfig/1/

    I guess it has been built with a different set of libraries etc and so is not compatible.


    Is there any particular reason why you needed to modify the Tomcat connector and can't just use the standard one?  Won't this cause problems for customers who are trying to integrate with an existing Apache setup where they are already have mod_jk to talk to other Tomcat instances?

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points