Category Archives: Server Administration

ColdFusion 9.0.1 Update Fails to Install on Windows 2008

I’ve run into this twice in as many weeks, on Windows 2008 when running the ColdFusion 9.0.1 updater it will fail to complete successfully.  Each time failing with the same message in the install log:

ANT Script Error:
Status: ERROR
Additional Notes: ERROR - cfmx-patch-move-files-all.xmlFailed to copy C:ColdFusion9libcfperfmon_9.dll to C:Windowssystem32cfperfmon_9.dll due to C:Windowssystem32cfperfmon_9.dll (The process cannot access the file because it is being used by another process)

 
Each time, however, I was able to simply rename the dll while ColdFusion was stopped and the upgrade continues successfully.

ColdFusion Won’t Start After Importing a .car

Recently did an upgrade to ColdFusion 9 from ColdFusion 8 for a customer and ran into an issue with ColdFusion failing to restart after I was done importing the .car file I had created.   In the coldfusion-out.log file I was seeing the following entry:

Error: no known VMs. (check for corrupt jvm.cfg file)

Checking out the jvm.config file, I realized that I’d imported the old JVM path that referenced ColdFusion 8 (and no longer existed), updating to the ColdFusion 9 path allowed ColdFusion to start correctly.

Access DSNs in 64bit ColdFusion

A few weeks ago I had to assist with migrating a customer with a large amount of Access databases (over 60) to a new server.  Turns out their new server was completely 64-bit (Windows and ColdFusion) and I didn’t find out about the Access databases until after the server was completely deployed.  Had I been involved earlier I would have put a stop to that.  However, I had to make Access play nice with ColdFusion, here’s how I did that.
The first step is to open the 32-bit ODBC Datasource manager in Windows, on this server it was at C:\windows\SysWOW64\odbcad32.exe, where I had to add a system DSN for each Access DSN I was configuring.
Windows system DSNs
As you can see there are a large amount of System DSNs for each database, we’ll be setting up the DSN named ‘blank’ in this post.
After you have a System DSN created for each DSN you need in ColdFusion, you can start adding them to ColdFusion.  As you can see in the image below we set the data source up exactly as we did in the Windows ODBC manager, same name and path.

Now, when you hit Submit you’re going to get a very ugly error:

Unable to update the NT registry.
Variable DRIVERPATH is undefined.

Don’t fear, the data source is now available for ColdFusion to use.  Now, why didn’t I just use an ODBC socket?  Well, you simply can’t – when you go to create an ODBC socket in the ColdFusion Administrator it generates a drop down of 64-bit System DSNs and won’t show you the 32-bit Access DSNs (see the Additional Reading section).
Remember, you’re milage will vary on this and you should be converting those Access databases over to SQL Server or MySQL 🙂
Additional Reading
Why my 32 bit applications cannot see the ODBC DSNs that I created on my 64 bit machine ?

Disable ColdFusion Administrator Migration Wizard

Ran into an issue recently with a customer who’s upgrade to ColdFusion 9 caused the Migration Wizard to freeze up when you opened the ColdFusion Administrator for the first time.  Turns out, you can disable this very simply with the following code taking advantage of the ColdFusion Admin API:

<cfset cfadminob = createObject("component","cfide.adminapi.administrator").login("password") >
<cfset createObject("component","cfide.adminapi.administrator").setAdminProperty("MXMigrationFlag","No")>
<cfset createObject("component","cfide.adminapi.administrator").setAdminProperty("migrationFlag","No")>
<cfset createObject("component","cfide.adminapi.administrator").setAdminProperty("SetupWizardFlag","No")>
<cfset createObject("component","cfide.adminapi.administrator").setAdminProperty("migrateCF5","No")>
<cfset createObject("component","cfide.adminapi.administrator").setAdminProperty("migrateCF6","No")>
<cfset createObject("component","cfide.adminapi.administrator").setAdminProperty("setupSampleApps","No")>
<cfset createObject("component","cfide.adminapi.administrator").setAdminProperty("setupOdbc","No")>
<cfset createObject("component","cfide.adminapi.administrator").setAdminProperty("setupEnabldRds","No")>

Alternately, you could re-enable the wizard by setting all these values to “Yes”, I’ve seen a few installs that don’t have the wizard enabled.

Quick Note About IIS 7.5 FTP Virtual Hosts

With the release of IIS 7.5 (available in Windows Server 2008 R2 and Windows 7), FTP is finally re-integrated into the main IIS Manager.  Those of you still using 7.0 know that you need to use the IIS 6 Manager to manage FTP sites.  One of the great new features in IIS 7.5 FTP is the ability to setup virtual hosts for FTP (multiple FTP sites on port 21 with the same IP) similar to how you would setup web sites with host headers in IIS.  One of the trip ups when you attempt to log in to FTP is the user name needs to include the virtual host name.  Consider the following setup:
IIS Bindings
Notice that one of the bindings is ftp:192.168.1.101:21:cfbeam.localhost, when you actually connect with an FTP client the username needs to be entered as:

VirtualHost|UserName
Notice the pipe (|) between the virtual host and the user name.  Assuming you don’t put that in, you’ll likely see the following in the IIS FTP logs and in your FTP client:
Response:    220 Microsoft FTP Service
Command:    USER brent
Response:    530-Valid hostname is expected.
Response:     Win32 error:   No such host is known.
Response:     Error details: Hostname didn’t match any configured ftp site.
Response:    530 End
Error:    Could not connect to server

For more information on configuring virtual hosts in IIS 7.5 see http://learn.iis.net/page.aspx/320/using-ftp-virtual-host-names/

ColdFusion Stops Serving After a Few Requests

Just had an issue where ColdFusion would only serve a few requests before locking up and sending constant 503 errors.  Turns out there were almost 200k files in C:Coldfusion8
untimeserverscoldfusionSERVER-INF empwwwroot-tmp.  So, to fix this I stopped ColdFusion, renamed wwwroot-tmp to wwwroot-tmp2 and make a new wwwroot-tmp.  Once ColdFusion was started it ran like a champ again.  My theory is the disk I/O was killing CF when it was looking for a chached file.

cfimage CAPTCHA Not Displaying

You may occassionally run into a problem with ColdFusion and IIS where your CAPTCHA images created by cfimage are simply blank and look like they don’t exists.  Assuming you don’t have a corrupt installation, the following instructions will help fix this.

  1. Open IIS
  2. Expand the server your working with by clicking the plus sign and goto the properties for “Web Sites”
  3. In the Home Directory tab click on “Configuration”
  4. You should now be on the “Application Configuration” screen, select the Wildcard Mapping at the bottom which goes to cfroot/runtime/lib/wsconfig/1/jrun_iis6_wildcard.dll and hit Edit
  5. Make sure “Verify that file exists” is unchecked and hit OK until your back to the IIS Manager.

This should correct any issues you had with cfimage and many other tags that also create things “on the fly” in ColdFusion.