MacBook Woes

Posted on Jul 19, 2006

So, a couple weeks ago I purchased a new Intel-based MacBook, and while it is a great piece of hardware and OSX is very cool, I am getting increasingly frustrated trying to set it up as a machine I can use for development (some of my initial woes made it into the recent ColdFusion Weekly podcast). My hope was to use Parallels to host my ColdFusion install on IIS (because this replicates most of my hosting environments at the moment), but to develop within OSX using CFEclipse. I feel as if I am 90% there and I can see the finish line, but recently I have been running in place. I figured perhaps someone out there has successfully done a similar setup and can share their secrets (Sean?). Keep in mind if anything I mention sounds idiotic that I am new to Mac and have also never been particularly good at networking.First let me explain what I have been able to do so far. Parallels is installed and working fine it seems. I have installed Windows XP Pro and IIS 6 on that machine. I have also installed ColdFusion MX 7 and am running the MySQL Server install on that machine as well. I also set up the Parallels tools on that VM. Lastly, I set up Parallels to use the Host-Only Networking option so that I could assign fixed static IPs to the Mac (192.168.2.1) and the Windows VM (192.168.2.2) within a "virtual network" of sorts. Most of the time, I can see a default page in IIS by browsing the VM's IP in my browser (I say most of the time because of some other issues I will explain in more detail). I also shared my internet on the Mac and Windows can connect most of the time.

The last step was to set up something so that I can use the Windows web root as my projects folder in Eclipse...this way I don't have to copy files over every time I edit it. However, most of the time, my Mac cannot see the Windows VM. I thought this was because there would be two networks with two IP addresses running at the same time - i.e. whatever network my Airport wireless connection is connected to is totally seperate from the virtual network. This idea bore fruit in that when I shut off the Airport connection, I can actually see the Windows VM in my network (most of the time) and connect to the shared folders. I can even reconnect the Airport connection and still have access to the folder via the established connection, but that goes away when I reboot. I keep hoping to figure out a way to establish a permanent connection to this drive on the Windows machine that will allow me to reconnect whenever the VM is runnning. Does this make sense?

Now, I kept saying most of the time because sometimes when I boot (and haven't changed a single setting) the internet sharing doesn't work, connecting to the Windows web servervia the IP doesn't work, and even shutting down the Airport connection I cannot see the Windows server. Essentially everything breaks down.

Well, that is the story up to this point. I have spent countless hours figuring this out...and perhaps you will say the solution is easy and I am being an idiot...My answer to that is that you may be totally correct, so put me on the right path, please! Oh, and yes I have seen Jared's solution. I gave it a quick test last night and wasn't able to get CF running myself...but I wouldn't put too much weight in that...it is most certainly an in10t user error. Nonetheless, I actually would prefer to have the Windows/Paralells-based solution if I could only get it working.

 

Comments

Peter Bell Hi Brian,

Know exactly what you're going through. Having interminable problems with the JVM getting CF running on the Mac part of my Macbook. Followed all of Sean and Mark Drews instructions, but still no luck. There is a Mac list on HoF but it's pretty quiet.

Anyone who uses a Macbook (or pro), please comment on any hints you have - it'd also be useful to know the group of macbook cf'ers so we could help each other to fix these issues!

Best Wishes,
Peter

Posted By Peter Bell / Posted on 07/19/2006 at 10:49 AM


Tom Chiverton Why are you bothering with host-only networking ?
Gibe the VM a full blown IP on your network and see if that helps.
When you say 'shared folders' is that Samaba/SMB/CIFS sharing from the OSX server to the windows client ?

Posted By Tom Chiverton / Posted on 07/19/2006 at 10:57 AM


Brad I second the call to dump the host only networking. I have the exact same set up as you with the exception of using host only. You can still give the VM a static IP on the network and you'll still be able to mount the Windows share on the Mac. Using this method, I have no problems seeing the server. I also create multiple dev sites on the server and give each site a header subdomain which I then add to the etc/hosts file. By doing this I can forget about managing multiple static IPs on the VM, and call the sites in my browser by using projectname.mydomain.com.

Good luck!

Posted By Brad / Posted on 07/19/2006 at 11:38 AM


Jarrod I set up my MacBook to run CF and MySQL in OS X, and then set up both CF and MySQL again in XP using Parellels. This way I do my development in OS X and test it in XP when needed, and I can also debug and fix issues right inside XP instead of having to switch back and forth. Here's what I've worked out...

Set up ColdFusion using the instruction found here - http://cyberdust.wordpress.com/2006/04/12/cfmx7-on-macbook-instructions/

One thing you absolutely have to do is revert OS X back to an older version of Java. If I recall the MacBook ships with 1.5 and you need to go back to either 1.4 or 1.4.2. Then do the CF install and it will work (took my days to figure that one out).

Then take the Terminal command that starts CF and put it into an Automater application. I dropped mine in the dock and when I want to start CF it's a one click process. You could also use it as a startup item if you want. Not ideal I know, but until Adobe fixes CF it'll have to do. I have CFEclipse working on OS X, but it's a bit clunky for me so I switched to skEdit (http://skti.org/). It's very lightweight and feels much more like an OS X app than CFEclipse. There's also TextMate.

Then I set up MySQL in OS X, just using the download from mysql.com. CocoaMySQL is a great tool I've found to work with it (http://cocoamysql.sourceforge.net/). Grab the 0.7 beta for the best features, it works wonders.

In Parellels I set up the XP machine to use Bridged Ethernet with the default adapter. This allows XP to get online using OS Xs Airport connection. From what I can tell it tricks XP into thinking OS Xs connection is a PC network card.

This way I do all my development on OS X and upload to a server. Then in XP I can test and if I need to quickly make a few changes I can just connect to the server and make the changes.

Again, I know this isn't ideal but it's been working very well and is a lot better than having two computers around.

Posted By Jarrod / Posted on 07/19/2006 at 12:05 PM


Brian Rinaldi Thanks for the suggestions from everyone. I am happy to say that, with alot of direct intervention from Kurt Wiersma, I have ColdFusion running on OSX on my intel MacBook (thanks Kurt!). It didn't require rolling back the JVM either - much like Jared's solution doesn't. I think I will be following the suggestions of some here and getting rid of the host-only network option and using Windows as a test machine after developing locally in OSX.

Just for explanation sake, the host only option was so that if I assign a static IP I can ensure there is no conflict with whatever network I may be connected on. I am not a networking guy, but otherwise don't you run the risk of using an IP that already exists on the network?

Posted By Brian Rinaldi / Posted on 07/19/2006 at 1:26 PM


Peter Bell Hi Tom/Brad,

I'm going through same thing as Brian and an a Mac newbie. I nee dto be able to use my mac on the subway (no dhcp at all) in starbucks, at home, in office, in free wi-fi spots, in clients offices, etc. Wherever I don't have a network I should be able to access the win from the mac. Wherever I do, bot should have access through the network without setup if it isn't secured, and if I log into starbucks, I need to be able to use 1 account for both "computers".

My understanding was that unless you use host only you either need a dhcp server or if you set a static IP for one, if you happen to use a network with a different set of IP addresses, mac and pc won't be able to talk.

Am I wrong? How do you handle this.

Best Wishes,
Peter

Posted By Peter Bell / Posted on 07/19/2006 at 1:28 PM


Brad Peter,

You have a unique situation (not really unique, but different from mine). There are probably a few options available to you:

(1) Get host only working correctly. This may be a Parallels problem that is outside your control.

(2) Figure out how to do everything on the Mac, which Brian may be able to help you with.

(3) You might be able to set up the Windows VM as a bridge between the two different machines. You'd set up the network adapter on the VM to another network and then add a bridge in the networking. However, with the absense of a network infastructure (routers or switches) you'd be out of luck. By the way, I think you can add multiple network interfaces in Parallels, which may be of some help.

(4) Do everything in the Windows VM.

I think you best and maybe only bet would be to use the Mac only option. If you figure out another plan of action please let us know...I'd be interested in hearing what you work out.

Posted By Brad / Posted on 07/19/2006 at 1:58 PM


Peter Bell I'm hoping to get host only working. I'm not going to do everything in windows or everything in mac (although I want to be able to do everything in either as an option) - kinda defeats the purpose of Macbook! I'm locked with projects but will work on this tomorrow and let you know what comes of it!

Will keep you posted.

Best Wishes,
Peter

Posted By Peter Bell / Posted on 07/19/2006 at 2:12 PM


Jared Rypka-Hauer Hey all...

Just FYI - I downloaded the Dev version of CF for OSX and installed multiserver, which is where the shell script in the StartCFMX launcher points... /Applications/Jrun4/lib/jrun.jar so if you're running the standalone install you need to edit the shell script as per my original blog entry:

http://www.web-relevant.com/blogs/cfobjective/index.cfm?mode=entry&entry=7A6E6DBA-BDB9-5320-E11FFDA89A81B509

This should allow you to input the path to the jrun.jar file where it needs to be, which should be /Applications/ColdFusionMX7/runtime/lib/jrun.jar.

I prefer to run the multiserver version of CF in general, so I don't have the standalone install on my box at all. I suppose I could install it just to test.

Anyway... as the folks at Adobe are quick to point out, CFMX on a MBP isn't supported, nor is using CFMX on any Mac with the 1.5 JVM set up as the OS default JVM. We're on our own out here...

If anyone's tried my launcher and it hasn't worked for them could you please hit one of the links to my blog here and leave a comment with their configuration and any errors or anything they saw?

Thanks,
J

Posted By Jared Rypka-Hauer / Posted on 07/19/2006 at 3:17 PM


Tom Cornilliac This thread couldn't be more timely as my MBP should be here tomorrow :-) Thanks!

Posted By Tom Cornilliac / Posted on 07/19/2006 at 5:08 PM


Jon Clausen I've got a similar setup but with a bit different solution. My solutions all involve statically assigned IP addresses to the machines I'm using as servers:

1) If router assigns the the IP addresses for the network through DCHP, once you look up the assigned IP under the network connection, change the connection over to a static ip with that number (i.e. "192.168.0.103"). At least so far, my IP addresses haven't had any conflicts - even through two cable modem resets. Someday I'll have to set up DNS on my local network, but for now it's not to much trouble to deal with the IP's.
I have a Windows desktop that I use as a database server and all of my datasources point to it. My Parallels install is used when I have to test specifically on a Windows machine or when I need to alot of database work (sadly there's nothing for the Mac that compares to Managment Studio Express or the awesome SQL manager's from EMS).

2) If I want to work off the Windows server with my Macbook, I create an RDS site instead of a local site (I'm using Dreamweaver, but I thought the latest version of CFEclipse included RDS).

3) I use FolderShare (http://foldershare.com) to sync files between the different server webroots so that when a file is created/deleted/updated, it automatically is changed on the other machines. This way if I need to work specifically with one machine (for <cfexecute> and such) I know the files are already up-to-date.

3) Coldfusion has been running well on the Macbook so mostly I develop with it . The only problem I've run into is with applications that rely heavily on caching. Seems the OSX JVM maxes out at around 2500 concurrent threads. For those apps, I have to use windows.

I haven't tried Jared's launcher, but I just set the JVM to 1.4.2 and forget about it unless I absolutely have to change it back. I've created an Automator application that starts Coldfusion and the JRun admin on startup.

Good Luck,
Jon

Posted By Jon Clausen / Posted on 07/19/2006 at 5:45 PM


Sean Corfield For the record, I use the bridged network on the default adapter and never have a problem with both Mac host and Win XP guest connecting to any network I happen to find.

I have CFMX 7.0.2 installed on Win XP talking to MySQL on OS X (I have to change the IP address of the connection if my Mac gets a new IP - which happens multiple times a day because of how I work - but frankly that's no big deal). I use Flex Builder 2 on Win XP and FDS etc etc etc. I have CFEclipse 1.2 installed on FB2.

I also have CFEclipse nightly installed on Eclipse 3.2 on the Mac side. As for CF on the Mac, I have no answers to your various problems. Jared's solutions sound good but I haven't tried it. I will repeat that Java 5 is not a supported JVM (for CFMX7) on OS X and that Intel-powered Macs are not a supported platform (for CFMX7). My particular setup is, unfortunately, not something I can share. Sorry.

Posted By Sean Corfield / Posted on 07/19/2006 at 6:48 PM


Write your comment



(it will not be displayed)





About

My name is Brian Rinaldi and I am the Web Community Manager for Flash Platform at Adobe. I am a regular blogger, speaker and author. I also founded RIA Unleashed conference in Boston. The views expressed on this site are my own & not those of my employer.