Previous Next

Thread: Cannot get remote service running

Last post 08-27-2008 11:30 AM by mikeyfev1. 11 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (12 items)

Sort Posts:

  • 08-18-2008, 10:34 PM

    Cannot get remote service running

    I cannot seem to get the remote access service running.  I have it installed on my local system (I see the file and have a msdepsvc defined).  When I start the service it quickly stops.  In the event logs I get:

    Service cannot be started. System.Net.HttpListenerException: The process cannot access the file because it is being used by another process

      at System.Net.HttpListener.AddAll()

      at System.Net.HttpListener.Start()

      at Microsoft.Web.Deployment.WDAgent.OnStart(String[] args)

      at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)

    I don't know what its talking about.  Please note, this is Windows Server 2003; IIS 6.0.  I also get these in the event logs:

    Unable to bind to the underlying transport for 0.0.0.0:80. The IP Listen-Only list may contain a reference to an interface which may not exist on this machine.  The data field contains the error number.

    Help?  Mike Frederick

  • 08-19-2008, 1:21 PM In reply to

    • SuperTramp
    • Top 150 Contributor
    • Joined on 07-07-2008, 2:41 AM
    • Seventies
    • Posts 21

    Re: Cannot get remote service running

    Without looking at your HTTP.SYS configuration, this error implies that you have another configured service (other than IIS) which is already listening on port 80 (maybe Apache?).  The deployment agent tries to listen on a URL off port 80, and this is failing. 

    If this is the case (you can configure the agent port to be something else, by changing a registry value).

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MsDepSvc\Parameters\ListenUrl

    By default this value should be http://+:80/MSDEPLOYAGENTSERVICE/.  You can change the 80 to be (say) 81.  Then try to restart the service.  If it works, then this conflict was the problem. Now remember that if you are using the client side of msdeploy.exe, you will have to specify the fully qualified URL to access the agent (computerName=http://<computerName>:81/msdeployagentservice) since by default the client assumes you have the port 80 URL configured. 

    Hope that makes sense...

  • 08-19-2008, 3:59 PM In reply to

    Re: Cannot get remote service running

    Not only made sense but it worked!  Thanks!  :)

    So, I moved on to my first 64-bit IIS server.  Again, Windows Server 2003.  Got the 64-bit version, installed (including the remote service).  I changed the service logon/password to a domain account (same used on the 32-bit machine) and I cannot get the service to run.  It starts and then stops.

    Not a logon issue (user is enabled to logon as a service, etc).  Dialog box says the service started but then stopped.  There are no messages in event logs except:

    The Microsoft Web Deployment Agent Service service was successfully sent a start control

    and

    The Microsoft Web Deployment Agent Service service entered the stopped state.

    Just for fun I tried changing the listen port as you instructed in the 32-bit example but got the same result.  Where do I get more info on what is wrong?

  • 08-20-2008, 12:08 AM In reply to

    • SuperTramp
    • Top 150 Contributor
    • Joined on 07-07-2008, 2:41 AM
    • Seventies
    • Posts 21

    Re: Cannot get remote service running

    You seem to be pushing the envelope.  That's cool <g>

    The issue you're probably running into, is the fact that your service account does not have permission to listen on the URL of the agent.  Our setup by default when creating the URL, will call into HTTP.SYS to ACL it so that NetworkService has access. 

    When you specify your own URL, you have to do this ACLing yourself.  You can do it using:

    NETSH HTTP ADD URLACL url=<URL> user=DOMAIN\USER ...

    Then things should work.  Granted, the error handling in this condition is a little fucked up and we can produce a more useful message.  But hopefully that is your problem and you can get going.

  • 08-20-2008, 9:02 AM In reply to

    Re: Cannot get remote service running

    Is the NETSH HTTP command available in Windows Server 2003?  I cannot seem to find it.
  • 08-20-2008, 10:09 AM In reply to

    • SuperTramp
    • Top 150 Contributor
    • Joined on 07-07-2008, 2:41 AM
    • Seventies
    • Posts 21

    Re: Cannot get remote service running

    Doh.  Forgot that in Win2k3, you have to use a separate tool HTTPCFG.EXE which must be downloaded from MS.COM.

    http://www.microsoft.com/downloads/details.aspx?FamilyId=6EC50B78-8BE1-4E81-B3BE-4E7AC4F0912D&displaylang=en

     

  • 08-20-2008, 11:16 AM In reply to

    Re: Cannot get remote service running

    Sorry to be a pain, but I need the 64-bit version.

  • 08-20-2008, 1:07 PM In reply to

    • SuperTramp
    • Top 150 Contributor
    • Joined on 07-07-2008, 2:41 AM
    • Seventies
    • Posts 21

    Re: Cannot get remote service running

    The 32bit doesn't work for you?  It should run in WOW64 mode and since its writing to registry keys that aren't WOW redirected, it should work. 

    What was the error you got?

  • 08-20-2008, 5:33 PM In reply to

    Re: Cannot get remote service running

    OK, I think I did the right thing...obtained httpcfg.exe, figured-out the command and made a httpcfg query look like:

    C:\Tools>httpcfg query urlacl
        URL : http://+:80/Temporary_Listen_Addresses/
        ACL : D:(A;;GX;;;WD)
    ------------------------------------------------------------------------------
        URL : http://+:81/MSDeploy/
        ACL : D:(A;;GX;;;NS)
    ------------------------------------------------------------------------------

     Then I changed the registry value

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MsDepSvc\Parameters\ListenUrl

    to http://+:81/MSDeploy/

    Started the msdepsvc; it immediately stops and there are no error log messages.  I'm sorry I'm such a pain.

  • 08-21-2008, 3:23 PM In reply to

    • SuperTramp
    • Top 150 Contributor
    • Joined on 07-07-2008, 2:41 AM
    • Seventies
    • Posts 21

    Re: Cannot get remote service running

    Does the SDDL (D:(A;;GX;;;NS)) give your service account access to the URL. 

  • 08-27-2008, 10:46 AM In reply to

    Re: Cannot get remote service running

    I am not familiar with the SDDL language, but this is the same setting that was in place as a result of the Web deploy install.  I deleted the old entry and entered this entry with the same permissions.

    Also; this is the same setting that I have on a WinXP 32-bit machine where the msdepsvc will start fine.

     I really need this to work.  I have a farm of 8 web servers with 9 complex web sites on each server.  All must be setup the same.  Any further help would be appreciated.
     

  • 08-27-2008, 11:30 AM In reply to

    Re: Cannot get remote service running

    OK, so I got this to work by changing the url to:

    D:(A;;GR;;;WD)

     

    which means "everybody has generic read access". 

Page 1 of 1 (12 items)
Page view counter