Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running a Windows 2003 R2 server with both IIS and ColdFusion installed. Whenever the server is restarted and both IIS and ColdFusion processes are set to automatically start, ColdFusion starts before IIS, preventing IIS from starting due to a conflict on port 80. Whenever ColdFusion is started after IIS, it works perfectly.

Is there any way to delay a service's startup until after another service has finished starting up?

Any help would be appreciated!

share|improve this question
add comment

2 Answers

You can either mark the ColdFusion service as delayload, or you can make IIS a dependency for ColdFusion. A dependency means that ColdFusion will not start unless IIS is Started, and stopping IIS will stop ColdFusion.

If that is what you are after; from the command prompt (with Administrative permissions), type:

sc config ColdFusionServiceName depend= W3SVC

Note that the space after = in depend is intentional and important.

You can read more about sc config depend here.

share|improve this answer
    
If you follow the link provided, the reference is for Win Server 2008. The user has a question for Windows Server 2003 R2. –  mdpc Jul 26 '11 at 4:40
    
Ok, I fixed the link to point to a different site. I disagree with the down vote because the answer is still actually correct. –  vcsjones Jul 26 '11 at 4:49
    
As per Justin's answer, whilst this is a good general suggestion, it's trying to address a symptom of the problem, not the problem itself. CF should not be trying to listen on port 80 in the first place. That's what the problem here is. It's wrong to have CF configured to run its inbuilt web server on port 80 if one wants to use IIS instead. –  Adam Cameron Sep 3 '11 at 9:40
add comment

I'd also note that it shouldn't matter which starts first in a normal deployment. It sounds as though the ColdFusion Server has its internal web server activated and changed to use port 80 (rather than the default 8500). If that is the case, when CF starts first it will take port 80 and then IIS will be out of luck. If you're using IIS, you should change the port that ColdFusion's internal web server is using to something else, or disable it entirely.

From the Adobe ColdFusion 9 documentation (it will be the same or similar for CF 8):

Switching the port for the built-in web server

You can change the port on which the built-in web server runs. Change the port for the built-in web server

  1. Back up the jrun.xml file.

    This file is in the cf_root\runtime\servers\coldfusion\SERVER-INF directory in Windows, and in the cf_root/runtime/servers/coldfusion/SERVER-INF directory in UNIX.

  2. Open the original jrun.xml file for editing.

  3. Change the port number specified in the WebService port attribute (near the bottom of the file):

    <service class="jrun.servlet.http.WebService" name="WebService"> 
      <attribute name="port">8500</attribute> 
      <attribute name="interface">*</attribute> 
      <attribute name="deactivated">false</attribute> 
      ... 
    </service>
    

    Note: Ensure that the deactivated attribute is set to false.

  4. Save the file, and then restart ColdFusion.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.