Mark Drew (Redux)- cf_etc...

a compendium of railo, cfml, cfeclipse and technology topics

Mark Drew (Redux)- cf_etc...

Why CFMX wont run nicely on my MacBook ... yet

April 13, 2006 ·

Ok, so its a bit of an alarmist headline, but I went through a whole procedure of installing CFMX to run on JRun and THAT runs (see my previous post) which is fair enough, but I dont like the following:
  • 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.
Ok, so lets go through these and fix each one, and this is why the title of the post, to kill the first two I thought that I could manually deploy the wsconfig, since I was getting errors and the gui version didnt see my apache webserver:
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
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 macromedia

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

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!

Tags: adobe · apple · coldfusion

12 responses

  • 1 Rob // Sep 22, 2008 at 4:12 PM

    Hey Mark,

    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

    I havent actually checked on this recently... (having been away to CFUnited.. wayhay!!!)
    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

    Does anyone have any more info about compiling mod_jrun.so on OS X Intel? We're getting undefined symbol errors when we try.
  • 4 Steve House // Sep 22, 2008 at 4:12 PM

    Mark, I tried several times to make a virtualmapping for / or /* to move my webroot, but it always caused the service to crash and fail to restart. Right now I have a regular virtualmapping in place and I have to access all my sites under it. I couldn't live with moving all my code under the war file.

    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

    WOOT. I have an apache connector. This assumes you have the latest apple developer tools installed.

    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

    WHOA! you go Mark A!!


    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

    Absolutely. I love my shiny 15&quot; macbook pro!
  • 8 Mark Andrachek // Sep 22, 2008 at 4:12 PM

    CFMX on Intel Macs - The Definitive Guide (aka, how I did it).
    http://webmages.com/cfmxIntelOSXguide.html
  • 9 Mark Andrachek // Sep 22, 2008 at 4:13 PM

    Do you have an update on this? I'm really itchin' to be able to do some cf development on my shiny new macbook pro...
  • 10 Jon // Sep 22, 2008 at 4:13 PM

    There's one other reason, at least in my book, that Coldfusion isn't ready for the mac (or maybe that the Mac isn't ready for CFMX). With large applications that rely heavily on caching (CF Apps like FarCry or large applications using Reactor as examples), the initial thread count on Application init can punch the JVM for well over 3000 threads as the system creates the Application cache after a sever start.

    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

    Well, I can run Coldfusion nicely under JRun but I stil havent managed to compile mod_jrun.so under my MacBook. So I might either
    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

    A person essentially assist to make seriously articles I might state. This is the very first time I frequented your website page and to this point? I amazed with the research you made to make this actual put up incredible. Excellent process!
    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.