- putting all my sites in /Applications/JRun4/servers/default/cfusion, where I cant run PHP and other websites (I feel its untidy but that is just me)
- having the context as /cfusion and the url on a port like: http://localhost:8100/cfusion/
- having to start JRun manually.
markdrew:/Applications/JRun4/lib mark$ java -jar wsconfig.jar
2006-04-13 11:56:57.992 java[487] CFLog (0): CFMessagePort: bootstrap_register(): failed 1103 (0x44f), port = 0xf803, name = 'java.ServiceProvider'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2006-04-13 11:56:57.995 java[487] CFLog (99): CFMessagePortCreateLocal(): failed to name Mach port (java.ServiceProvider)<br />
Then I tried the console version of wsconfig 2006-04-13 11:56:57.992 java[487] CFLog (0): CFMessagePort: bootstrap_register(): failed 1103 (0x44f), port = 0xf803, name = 'java.ServiceProvider'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2006-04-13 11:56:57.995 java[487] CFLog (99): CFMessagePortCreateLocal(): failed to name Mach port (java.ServiceProvider)<br />
markdrew:/Applications/JRun4/lib mark$ java -jar wsconfig.jar -ws Apache
Apache web server is not supported on Mac OS X
Ok, so if it is just getting errors, lets do it manually as defined by this document over at macromediaApache web server is not supported on Mac OS X
I wont detail how I did this as the document describes how to manually do all of this, and then I come to the last part, which is where you get the mod_jrun.so from the expanded wsconfig.jar, the options didnt have what I was looking for:

So, being the person I am, I tried them all and got the following error each time:
markdrew:/Applications/JRun4/lib mark$ apachectl restart
/usr/sbin/apachectl restart: httpd not running, trying to start
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/mark.conf
Syntax error on line 1112 of /etc/httpd/httpd.conf:
Cannot load /Applications/JRun4/lib/wsconfig/1/mod_jrun.so into server: (reason unknown)
/usr/sbin/apachectl restart: httpd could not be started
/usr/sbin/apachectl restart: httpd not running, trying to start
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/mark.conf
Syntax error on line 1112 of /etc/httpd/httpd.conf:
Cannot load /Applications/JRun4/lib/wsconfig/1/mod_jrun.so into server: (reason unknown)
/usr/sbin/apachectl restart: httpd could not be started
So that is where I am at. If I could get the source to mod_jrun.so and recompile it under my MacBook Pro it might work. I tried the intel, but that didnt work, I tried the linux and the mac versions still with no use. If anybody has any ideas, let me know!
EDIT: Simeon Bateman pointed me to this article on rebuilding the mod_jrun.so! so I shall be giving this a go tonight to see if I can get it all working smoothly!








12 responses
1 Rob // Sep 22, 2008 at 4:12 PM
Just checking in to see if you have got any further regarding hooking apache into jrun?
2 Mark Drew // Sep 22, 2008 at 4:12 PM
But when I get doing more coding on OS X I shall probably give it a try again, basically its the compilation of mod_jrun if I remember right.
MD
3 Leon Miller-Out // Sep 22, 2008 at 4:12 PM
4 Steve House // Sep 22, 2008 at 4:12 PM
For anyone who does not know, the virtualmappings are done in the jrun-web.xml file (if you are using the built in JRun web server).
5 Mark Andrachek // Sep 22, 2008 at 4:12 PM
Download the JRUN OEM SDK.
http://www.adobe.com/products/jrun/oem
Get the big bundle that has all platforms.
From the terminal, unzip -A the zip file.
Change into the src/connectors/src directory.
unzip -a ApacheModule.zip
run:
apxs -c -Wc,-w mod_jrun.c jrun_maptable_impl.c jrun_property.c jrun_session.c platform.c jrun_mutex.c jrun_proxy.c jrun_utils.c
wala, a functioning mac-intel apache jrun connector (mod_jrun.so). Just copy to /usr/libexec/httpd and setup your httpd.conf, and you're good to go.
I haven't gotten it working with an SSL connection, but this is enough for my needs right now.
6 Mark Drew // Sep 22, 2008 at 4:12 PM
I shall be trying this later on and getting it all going! Awesome! This is on a Mactel right?
7 Mark Andrachek // Sep 22, 2008 at 4:12 PM
8 Mark Andrachek // Sep 22, 2008 at 4:12 PM
http://webmages.com/cfmxIntelOSXguide.html
9 Mark Andrachek // Sep 22, 2008 at 4:13 PM
10 Jon // Sep 22, 2008 at 4:13 PM
OS X's JVM allows a maximum of 2500 threads on all JVM versions(1.4.2, 1.5.0, etc.) before it starts to throw java.lang.OutOfMemory errors. In comparision, Windows XP Pro sets the intial default at around 7200 and Linux scales to the amount of system memory - 32236 with 4GB of memory.
Worse yet, those hung threads don't seem to kill themselves after the errors which means that even if you refresh a few times until the application builds it's cache, those hung threads are sitting there taking up system resources and eventually lead to an unresponsive JVM.
After spending a few weeks trying to figure out why my apps were always throttling the sytem on my MacBook and locking it up, even after tuning the server and heap sizes, I finally stumbled on to this post which explained why some of my Apps wouldn't go the distance after a server restart: http://gregluck.com/blog/archives/2004/12/limits_to_threa_1.htm
I'd love to hear if anyone knows a way to increase the max allowed threads on OS X.
11 Mark Drew // Sep 22, 2008 at 4:13 PM
a) Send someone at Adobe a mac Mini so they can go and figure it out
b) Just keep running it under JRun
Its not that bad though, running it from the console is pretty good for debugging.
12 Boyloasse // Jul 21, 2011 at 10:26 PM
Fantastic web site. Plenty of useful info here. I am sending it to some buddies ans also sharing in delicious. And certainly, thank you for your sweat!
hi!,I like your writing so so much! percentage we communicate more approximately your article on AOL? I need an expert in this house to unravel my problem. May be that is you! Taking a look forward to see you.