ColdFusion Muse

IIS Connector Mania

Mark Kruger September 8, 2006 3:36 PM Coldfusion Troubleshooting Comments (0)

We recently moved a site from windows 2000 to windows 2003. Everything was working fine except that the chart images didn't show up. Ok - I know this one. The virtual directories it needs aren't set up correctly (JrunScripts for example). The answer - run the connector script located in /cfusionmx7/bin/connectors. This server was lightly used so I decided to try something new. I decided to remove 1 connector and add 1 connector. I used a tip from Bruce Purcell I removed the connector and added a connector to just 1 site. Unfortunately the script hung and it took me 20 minutes of downtime to figure out why.

My problem was that I did not wait long enough. Had I waited more than about 3 minutes I would have been thrown an error. When I finally did wait (after multiple starts and tries) the error indicated that the JNI could not connect to the port. This made me think that the inter-process communication between IIS and CF had failed. I had restarted CF and the "Web publishing service" many times by this point. But I thought I would try something new. I restarted the "IIS Admin Service". All the IIS services depend on this core service and restarting it reboots all of them (web, ftp, smtp, ssl etc). After that, I tried my connector script again and Eureka! It's alive!

In the process I modified the existing batch file and created a new one that takes a single argument for the "site". I use the "name" of the site rather than the number. You can open IIS and your command line and put them right next to each other - then type "IIS_connect_1site myfancypantssitename" - rather than editing the file. Here's the (laughably simple) script.

@echo off

set CFUSION_HOME=C:\CFusionMX7

echo WARNING! This will install the ColdFusion MX IIS Connector for 1 site.
echo Press Control+C to abort.
echo Use like this: iis_connect_1site mySiteName
echo You can get the site name from the IIS manager
echo You are configuring %1
pause

REM
REM -cfwebroot with no directory arg uses the CF web root specified when
REM ColdFusion MX was installed
REM

%CFUSION_HOME%\runtime\bin\wsconfig -server coldfusion -ws IIS -site %1 -coldfusion -cfwebroot
Save it to a batch file in the /bin/connectors and it will work on any "standard install" of CF.

  • Share:

0 Comments