Why Can't I Run More Than One Server Instance at the Same Time?
I was recently setting-up a new development machine in this manner: installing databases, IDEs, application servers, etc. After running through the whole set-up, which is something I can do in my sleep having done it so many times over the years, I was surprised to find that this time, for some reason I couldn't start any instances on the machine. Slight correction - whenever an instance was already running I couldn't start any other instances... that's important to note. This was a first for me.
Whenever this happens you should immediately suspect your jvm.config file, as it's shared by all your instances when they start. If something in that file locks a resource (usually a port) then the other instances won't be able to start. You should also, if you aren't already doing so, immediately try starting your instances from a console window so that you can see what's going on when the instance tries to start. The culprit, as it turns out, is the ColdFusion 8 debugger.
In order to use the interactive/step debugger that ships with CF 8, you need to set up and use the Eclipse/CFEclipse debugging environment, but not before first configuring your server for debugging. The instructions are in the CF Documentation - online at http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=usingdebugger_4.html. If you read the instructions in the documentation you'll note that in a J2EE (multi-server) environment, in addition to enabling/configuring debugging in the CF Administrator, you also need to add a few extra arguments to your jvm.config file. The arguments look like: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=
So, if you want to use the interactive debugger in a multi-server environment, be sure to have each J2EE server instance start-up using a different config file (use a "-config" flag at the command line or in the service definition) and in each config file specify a unique debugger port: making sure, of course, that each instance running ColdFusion also specifies the same unique port in it's CF Admin debugger page. On Windows you can see what ports are currently in use by opening a command prompt and typing: netstat -an |find /i "listening". If you have instances not running CF, they can all start with the same jvm config file... provided that it doesn't contain the parameters for CF debugging. I haven't tested this, because my other instances didn't need debugging, but I hazard to guess you can use pretty much any port not already in use as a debugger port. The documentation doesn't mention any of this... at least not anywhere that I could find.
I was really surprised that nobody has blogged about this issue, but I searched a bit and didn't see anything. I keep getting the odd feeling that there must be something I'm missing... but until I find it, I'm going to call this one a bug (in the documentation, at least). Hopefully, this entry helps someone out there who's banging their head against the wall...

you can have multiple instances running each one pointing to a difference port number and be able to debug each one of them. What I usually do after creating a new instance is to unregister the instance and re-create it (like explained here http://mkruger.cfwebtools.com/index.cfm/2006/4/17/... ) .
This is one of those situations where I made the mistake of assuming that that was enough to share what I'd observed. :-) There are all kinds of things like that where I've shared tips but haven't blogged it all.
Anyway, as for pointing out this challenge with the multiserver deployment and the debugger, some of the resources do come up in a search (pdfs for talks) while some do not (the PDF of the CFWACK book chapter, which I point to at http://carehart.org/blog/client/index.cfm/2008/2/1...). Some aren't even online (my FAQU article where I mention this).
Anyway, good to see it shared as a blog entry. Thanks.
As for regarding it as a bug in the docs, did you add a comment in the livedocs? That will help many.
What setting are not common that we might be missing...what we see when we try to bring up any application in any other instance, all we get is a white page, no sorce code or anything.
Would you be able to provide quick steps to set up CF 8 multi after the basic install? set up IIS virtual sites for each instance, and connecting the instance to the IIS site using the coldfusion tool to do this...
Any feedback may help.
thanks
dan
After you create a new instance in the CF Admin for the main instance and create the IIS site, run wsconfig (in the bin directory) and add a mapping for each IIS website (to that instance)... make sure you check the "Configure Webserver for ColdFusion" checkbox, too. That should work for you.
It's odd that you'd be getting a completely blank page - there should be something there to tell you what's going on. You are sure that the IIS site is pointing to the right place, right?
During the setup, should we tell CF to install using the local web server, then change it to IIS using the Web Server Config tool, or right away use IIS?
Could there be an issue when I look at my IIS sites and see they are all running out of Port 80? I know each instance is set on a different port, but what about each IIS site?
Any issues with setting up IIS HTTP Headers for each site?
As you can see, we are grasping for straws here. My coworker has set up CF many times, but has not set up CF with multiple instances much, so it is weird to him why this is not working.
Any more help would be great...I will look into the info presented and see what happens.
Thanks for any help you all can give.
dan
One thing you definitely should do - after you create an instance of CF, stop it (if it's running) then go to a command prompt, to your bin directory, and start the instance from there ("jrun -start your_server_instance_name_here"). See if the instance starts without error and, if not, what error messages are displayed.