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 127.0.0.1:8012
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 mod_jk.so from, but no luck there either.
Like MarcinSz, I built mod_jk from source. Here are the steps I took...
1. Made sure Apache was 64-bit
2. Ensured all ports would also be compiled as 64-bit
3. sudo port install mod_jk
4. Step 3 created a module that would allow Apache to start without warnings.
Now, setting up the connector to speak to the ColdFusion instance is what I am working on now. When I try to access the CF admin page all it does is just downloads the index.cfm file and does not process it. The two things I am looking st now::
1. Looking at how the configuration files for "Tomcat" and how they need to be configured for Apache. The ones supplied by the CF10 beta may be correct but in my system do not appear to work.
2. Looking to see if there is an issue with CF10 beta not being 64-bit and if this could be an issue with my 64-bit apache and now a 64-bit mod_jk.
Hope to know something soon. If anyone has any advise that would be great.
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.
I've made some progress!
I explicitly set the max_packet_size in the workers.properties 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!
Interesting you were able to get the built in Apache to work as I was not. I am currently testing all this on a Lion 10.7.3 but could try on Snow Leopard and Snow Leopard Server both the MacPorts and Built in installations.
I was able to see the Tomcat shows up as "java" in Activity Monitor and it is running as a 64-bit process. So the next steps seem to be looking into and learning more about Tomcat and how to configure Apache with it. Hopefully Adobe can provide more detail on the configuration process as more users are likly to want to run as Apache rather than the built in version in the ColdFusion/Tomcat installation.
Inside the ColdFusion 10 directiory there is a folder called cfusion. I see references to this in various configuration files. Would this directory and it's contents be consider a Tomcat "worker"?
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 worker.properties 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!
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.
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/mod_jk.so into server: dlopen( /Applications/ColdFusion10/config/wsconfig/1/mod_jk.so, 10): Symbol not found: _apr_stat$INODE64\n Referenced from: /Applications/ColdFusion10/config/wsconfig/1/mod_jk.so\n Expected in flat namespace\n /Applications/ColdFusion10/config/wsconfig/1/mod_jk.so
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?
Made progress -
Setting the max_packet_size seemed to start the 1st time CF10 admin process, just like it did with CF9 the 1st time we access the administrator. Then, it just went to a blank white screen.
[error] ajp_process_callback::jk_ajp_common.c (1825): Unknow ajp protocol code: 0F
[error] ajp_process_callback::jk_ajp_common.c (2426): (cfusion) connecting to tomcat failed
Now: here is something interesting:
Look at the end of the URL when it 1st attempts to access administrator: It is index.cfm?configServer=true or index.cfm?serverConfig=true
By removing this it allows me to simply click on the "continue" option and low and behold the CF admin comes up.
I also have an issue with topnav.cfm reporting a 400 (Bad Request)
Quiting the browser and comming back to CF Admin displays the login page but after enter username and password I land on index.cfm and it goes no further.
Refreshing the page starts to rope in various admin componets.
Also, it will not process any simple cfm template reporting an internal server error.
Hopefully this has to do with this being a beta.
Agree with MarcinSz. Using the MacPorts version lets us control and stay current with Apache, PHP, mod_ssl and so on. The version of Apache is 64-bit on our system. The installation method cited produces the same error I cited in my original post. It seems the mod_jk provided does not like something about the configuration and build of the MacPorts version of Apache.
It would be helpfull to know more about the mod_jk provided and what it needs to work. For example can the configuration script used to build the distributed Apache be disclosed so we could look at using it to compile Apache.