404 Weirdness After Rebooting with CFMX/IIS5

Posted by Dan on Apr 17, 2003 @ 2:12 PM

Ok, so I ran in to a really odd problem today. One of our servers decided that it wanted to start giving 404 errors on any request after the box was rebooted—it didn't matter if it was a static html page or a dynamic page. If I restarted all the services, things would start working again. This meant though, that if the box was restarted you manually had to run a batch file to recycle the services—which is unacceptable.

After doing some investigation on the box, I learned that the jrun log files in the CFusionMX\runtime\lib\wsconfig\1\ directory were generating lines like the following:

04:03:20 jrISAPI[init] JRun 4.0 (Build 55228) ISAPI Extension - Nov 21 2002 20:12:06 04:03:21 jrISAPI[init] initProxy failed to fetch server properties 04:03:21 jrISAPI[init] could not initialize Server_1:127.0.0.1:51010 04:03:21 jrISAPI[init] Couldn't initialize from remote server, deferring init till request time. 04:03:21 jrISAPI[init] JRun 4.0 (Build 55228) ISAPI Extension - Nov 21 2002 20:12:08 04:03:32 jrISAPI[filter] initProxy failed to fetch server properties 04:03:32 jrISAPI[filter] could not initialize Server_1:127.0.0.1:51010 04:03:32 jrISAPI[filter] Couldn't initialize from remote server, JRun server(s) probably down.

These log entries seemed to indicate that the JRun engine was failing to run because the IIS service wasn't running at the time when the "ColdFusion MX Application Server" service was starting. However, after a lot of trial and error (which meant a lot of rebooting,) I was finally able to correct the problem by starting the "World Wide Web Publishing Service" before starting the "ColdFusion MX Application Server" service.

Since I finally was able to figure out the specific order the services needed to be started in, I now had to redo the dependencies for the services so that they'd always start in the right order. The first I took was to open up the "regedt32" application via Window's Start > Run box. You'll need to use "regedt32.exe" because you'll need to create a new "Multi-String Value" (REG_MULTI_SZ) and you can't do that with regedit.exe in Windows 2000 or below.

After opening the program, transverse to the "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ColdFusion MX Application Server\" key and add a new "Multi-String Value" (REG_MULTI_SZ) of "DependOnService". The value of this should be "IISADMIN". Doing this will ensure that the IISADMIN service is loaded before starting the CFMX App Server service. We need to do this, because we're going to change the dependency on the W3SVC (World Wide Web Publishing Service) to make sure that the CFMX App Server service is loaded before trying to start and before starting the W3SVC service, the IISADMIN service must be loaded.

After setting up the CFMX App Server service to be dependent on the IISADMIN service, we can now change the value of the multi-string value "DependOnService" in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\ key from "IISADMIN" to "ColdFusion MX Application Server". Now if you try to start the W3SVC, it'll load the following service in order (if they're not already loaded:)

  1. IISADMIN
  2. ColdFusion MX Application Server
  3. W3SVC

After making all these changes, I was then able to reboot my server and have the webserver serve pages as expected. I'm still not sure what caused this initial problem to crop up yesterday, but I had made some permission changes to the drives (to lock down the Everyone account) and I had run the remove_ALL_connectors.bat file in order to get "search friendly urls" working properply.

Anyway, hopefully this will help someone else out that has the same problem. I wasn't able to find anything on the web while searching via Google on this problem, but a few people from Macromedia said the problem has popped up on a few people in the past. There didn't seem to be any census on exactly what it would take to fix the problem. I'd also like to thank Dave Watts and Debbie Dickerson who e-mailed me with ideas and suggestions on how to resolve the problem.

Categories: HTML/ColdFusion

11 Comments

  • Excellent work!! Saved my day
  • Switzer,

    Got any advice for how I can stop/start the CFMX services via a batch file? I've tried NET START, but it doesn't like my service name.

    Thanks in advance...
    -Conger
  • Thank you for posting and explaining the error.. Did helped alot...
  • Charlie Arehart's Gravatar
    Charlie Arehart
    Great stuff, Dan. Thanks for that. And about Michael Conger's request for how to start CFMX from a batch file, I use:

    %windir%\System32\net.exe start "ColdFusion MX Application Server"

    All that on one line (and exactly as provided). In Win2k, at least, it gets the value of %windir% from an environment variable.
  • Charlie Arehart's Gravatar
    Charlie Arehart
    Sadly, I have to say that this hasn't solved the problem for me. After making those settings, and rebooting, and waiting for several minutes to use CFMX, it still reports not being started. Indeed, it's still reporting "The ColdFusion MX Application Server service terminated with service-specific error 2" in Event Viewer.

    I can confirm that the properties for the CFMX service do show that it's reporting being dependent on IISAdmin and depended upon by the W3SVC, as expected.

    So it seems that for some servers, this is still not quite enough.
  • I have long had this same problem. The above solution did not work for me, but it put me on the right track.

    I tried stopping the services one by one.

    I can stop the w3svc and iisadmin services and still start The ColdFusion MX Application Server (CFMX). So I do not believe that CFMX is dependent on either of these.

    ALERTER and/or MESSENGER seem to recreate the problem. The effect is not immediate. You can stop these, and CFMX will still stop/start for about 5 minutes. After that, you get the error 2. Also, restarting these services does not clear the problem. You will continue to get error 2 until you reboot. I have no explanation why these services can cause CFMX to fail. Having said that, Editing the registry and making CFMX dependent on these did not solve the problem.

    RasMan(Remote Access Connection Manager) is the slowest service to start on my machine. In an effort to delay CFMX, I made CFMX dependent on RASMAN. This solved the problem for me. It actually makes some sense that CFMX could depend on this service, but it could just be a timing thing. You can not stop RASMAN once its started, so its hard to say why this solution works.


    If anyone is having this problem, I would first try making CFMX dependent on RASMAN.


    If that doesnt work, my 2nd suggestion would be this:

    1. reboot your computer
    2. as quickly as possible, start the services applet.
    3.click the status column header twice. This will sort it descending. You should see a service that is still starting.
    4. Make CFMX dependent upon this slow starting service.


    good luck
  • Also make sure that the JRun proxy service is enabled. In runtime/servers/default/SERVER-INF/jrun.xml

    look for the proxy service and port 51010, then make sure deactivated is set to false. I was getting that error in my jrun log and the proxy was somehow deactivated.
  • Sweet,
    Thanks for the info. Fixed me right up.
  • I had similar error messages in my apache log, OS: Solaris 9. It turns out I had a corupted /etc/nodename.
  • Does anyone have any experience with CF v7.02 on XP with the Apache 2.2.3 web server? I'm having trouble getting CF to work.
  • Second installment on this issue. Here is the error.log from Apache:

    Sat Sep 02 09:30:56 2006] [notice] jrApache[1864: 36878] jrun_trans: r is 0x351b230, server is 0x26ff28, virtual 0
    [Sat Sep 02 09:30:56 2006] [notice] jrApache[1864: 36878] trying to bootstrap from "127.0.0.1:51011"
    [Sat Sep 02 09:30:56 2006] [notice] jrApache[1864: 36878] 127.0.0.1:51011 initPool finished
    [Sat Sep 02 09:30:56 2006] [notice] jrApache[1864: 36878] initialized temp proxy for 127.0.0.1:51011
    [Sat Sep 02 09:30:56 2006] [notice] jrApache[1864: 36878] 127.0.0.1:51011 fetching clustered-servers
    [Sat Sep 02 09:31:11 2006] [notice] jrApache[1864: 36878] 127.0.0.1:51011 connect failed[476]: 10060 Connection timed out
    [Sat Sep 02 09:31:11 2006] [notice] jrApache[1864: 36878] 127.0.0.1:51011 connect failed: 10060 Connection timed out
    [Sat Sep 02 09:31:11 2006] [notice] jrApache[1864: 36878] 127.0.0.1:51011 destroyed.
    [Sat Sep 02 09:31:11 2006] [notice] jrApache[1864: 36878] loadServersFromStore(C:/CFusionMX7/runtime/lib/wsconfig/1/jrunserver.store)
    [Sat Sep 02 09:31:11 2006] [notice] jrApache[1864: 36878]  proxyservers = 127.0.0.1:51011
    [Sat Sep 02 09:31:11 2006] [notice] jrApache[1864: 36878] 127.0.0.1:51011 initPool finished
    [Sat Sep 02 09:31:11 2006] [notice] jrApache[1864: 36878] 127.0.0.1:51011 fetching server-props
    [Sat Sep 02 09:31:26 2006] [notice] jrApache[1864: 36878] 127.0.0.1:51011 connect failed[476]: 10060 Connection timed out
    [Sat Sep 02 09:31:26 2006] [notice] jrApache[1864: 36878] 127.0.0.1:51011 connect failed: 10060 Connection timed out
    [Sat Sep 02 09:31:26 2006] [notice] jrApache[1864: 36878] initProxy failed to fetch server properties
    [Sat Sep 02 09:31:26 2006] [notice] jrApache[1864: 36878] could not initialize proxy for 127.0.0.1:51011
    [Sat Sep 02 09:31:26 2006] [notice] jrApache[1864: 36878] 127.0.0.1:51011 destroyed.
    [Sat Sep 02 09:31:26 2006] [notice] jrApache[1864: 36878] Couldn't initialize from remote server, JRun server(s) probably down.
    [Sat Sep 02 09:31:26 2006] [notice] jrApache[1864: 36878] jrun_trans: can't get mappings from server
    [Sat Sep 02 09:31:26 2006] [notice] jrApache[1864: 36878] jrun_service: r is 0x351b230, server is 0x26ff28, virtual 0
    [Sat Sep 02 09:31:26 2006] [notice] jrApache[1864: 36878] jrun_service: found jrun-proxy-target index -1
    [Sat Sep 02 09:31:26 2006] [notice] jrApache[1864: 36878]   HOST: localhost
    [Sat Sep 02 09:31:26 2006] [notice] jrApache[1864: 36878] filtering /cfide/administrator/index.cfm (/cfide/administrator/index.cfm) HOST=localhost
    [Sat Sep 02 09:31:26 2006] [notice] jrApache[1864: 36878] filterRequest:  no match
    [Sat Sep 02 09:31:26 2006] [notice] jrApache[1864: 36878] request not for JRun.
    [Sat Sep 02 09:31:26 2006] [notice] jrApache[1864: 36878] JRun will not accept request. Check JRun web server configuration and JRun mappings on JRun server.

Comments for this entry have been disabled.