In my ongoing quest of porting apps from Windows to Mac OS X environment, I had to install Tomcat’s 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 modjk 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 page. Configure/make/install (if you didn’t install Apache via Homebrew and/or the path to apxs differs–adjust accordingly). dmoore$ cd tomcat-connectors-1.2.37-src/native dmoore$./configure CFLAGS = '-arch x8664' APXSLDFLAGS = '-arch x8664' -with-apxs =/usr/local/sbin/apxs dmoore$ make dmoore$ make install.
Linux, FreeBSD, AIX, HP-UX, MacOS X, Solaris and should work on major Unixes. Load the servlet container adaptor library and initialise it (prior to serving requests). The binaries for mod_jk are now available for several platforms. Feb 6, 2014 - Download the latest JK connector (1.2.37 at time of writing) for Mac OS X from Apache. Create directory for storing shared memory file, if missing. The mod_jk.so module should be in Apache folder (in my case the path is.
Create directory for storing shared memory file, if missing. Mkdir /usr/local/Cellar/httpd/2.2.26/run And you are done!
The modjk.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 and was able to successfully implement it on my end. Follow these steps to patch this bug:. Open tomcat-connectors-1.2.37-src/native/common/jkmap.c and locate this block of code int jkmapgetint ( jkmapt.
m, const char. name, int def ) char buf 100 ; const char. rc; sizet len; int intres; int multit = 1; sprintf ( buf, '%d', def ); rc = jkmapgetstring ( m, name, buf ). Replace it with the following snippet: int jkmapgetint ( jkmapt. m, const char.
name, int def ) char buf 100 ; char buf2 100 ; const char. rc; sizet len; int intres; int multit = 1; sprintf ( buf2, '%d', def ); rc = jkmapgetstring ( m, name, buf2 ). 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.