In my ongoing quest of porting apps from Windows to Mac OS X environment, I had to install Tomcat’s mod_jk connector to proxy requests from Apache to JBoss application server. This is not my favorite setup, of course, but rather a legacy environment for one of the clients. Everything was going smoothly until mod_jk compilation part. After doing some research and reading some blogs, here is these are the steps that finally worked for me:
- Download the latest JK connector (1.2.37 at time of writing) for Mac OS X from Apache Tomcat Download page.
- Configure/make/install (if you didn’t install Apache via Homebrew and/or the path to
- Create directory for storing shared memory file, if missing.
And you are done! The
mod_jk.so module should be in Apache folder (in my case the path is
/usr/local/Cellar/httpd/2.2.26/libexec/, since Apache 2 has been installed via Homebrew)
Resolving “Abort trap: 6” Error During Apache Start
If after following the steps above, you are running into “Abort trap: 6” error upon starting Apache server, this may be due to the current buffer overlap bug in the connector. It still hasn’t been fixed in the latest version of the connector, so you’d need to manually patch it and recompile. I’ve read about this fix on this blog and was able to successfully implement it on my end.
Follow these steps to patch this bug:
tomcat-connectors-1.2.37-src/native/common/jk_map.cand locate this block of code
- Replace it with the following snippet:
- Configure/make/install again following original step 2 at the beginning of this post. The error should be gone now.
Hope this saves someone some wasted time.
##### Today my environment was:
- Mac OS X Mavericks 10.9.1
- Homebrew 0.9.5
- Apache/2.2.26 (Unix) via Homebrew
- Tomcat connector 1.2.37