Compiling the mod_jk module in to the apache webserver allows for threading of jk connections and thus increases performance of your Tomcat, Jboss, or other AJP based web application. It will also increase the amount of connections you can serve at once. This is why I suggest compiling the module in.
With that said, I have ran in to what seems like a common problem with the instructions provided on the mod_jk website for compiling the module in. I have found the solution through much reading of the make log.
If you go to the mod_jk site page for how to compile the module in (found here - bottom of page) here is what it says:
Connector source is found in /home/tomcat-connectors-1.2.26-src
apache source is found in /home/httpd-2.0.63
This will result in an error in the first make step. When you configure the connector it goes in to the apache source and tries to grab a file that does not exist. Then when you run make, all of the referenced files generated by the configure script based off of the missing file are not there and it results in an error.
~snip~
mod_jk.c:3105: error: dereferencing pointer to incomplete type
mod_jk.c:3107: warning: assignment makes pointer from integer without a cast
mod_jk.c:3109: error: storage size of 'finfo' isn't known
mod_jk.c:3112: error: dereferencing pointer to incomplete type
mod_jk.c:3115: error: dereferencing pointer to incomplete type
mod_jk.c:3117: error: dereferencing pointer to incomplete type
mod_jk.c:3118: warning: initialization makes pointer from integer without a cast
mod_jk.c:3125: error: dereferencing pointer to incomplete type
mod_jk.c:3138: error: dereferencing pointer to incomplete type
mod_jk.c:3149: error: dereferencing pointer to incomplete type
mod_jk.c: In function `jk_map_to_storage':
mod_jk.c:3162: error: dereferencing pointer to incomplete type
mod_jk.c:3162: error: dereferencing pointer to incomplete type
mod_jk.c:3164: error: dereferencing pointer to incomplete type
~snip~
This is caused because the make command is referencing things in the Makefile.aspx file in the apache 2.0 source directory. The problem is that the file has not been generated yet. The aspx file is a perl file generated when you configure the code. So there is in fact a missing step. You must configure the apache source first then follow the online how to that the tomcat people have posted.
THE SOLUTION!!! FOLLOW THESE STEPS AND YOU ARE GOLDEN!
I installed httpd-2.0.63 and tomcat-connectors-1.2.26
The paths are:
/opt/src/httpd-2.0.63
/opt/src/tomcat-connectors-1.2.26-src
Configure the apache source and generate the missing aspx file
[user@host] ~ $ cd /opt/src/httpd-2.0.63
[user@host] ~ $ ./configure –prefix=/opt/apache2
Configure and install the mod_jk connector
[user@host] ~ $ cd /opt/src/tomcat-connectors-1.2.26-src
[user@host] ~ $ ./configure –with-apache=/opt/src/httpd-2.0.63
[user@host] ~ $ make
[user@host] ~ $ make install
RE-Configure the apache source and make/install it
[user@host] ~ $ cd /opt/src/httpd-2.0.63
[user@host] ~ $ sh buildconf
[user@host] ~ $ ./configure –prefix=/opt/apache2 –with-mod_jk
[user@host] ~ $ make
[user@host] ~ $ make install
You are all set and everything should have gone without an error. Just cruise to /opt/apache2/bin and run ./apachectl start
Technorati Tags: Apache, java, mod_jk, tech, software, compile, development

0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.