Skip to content

Instantly share code, notes, and snippets.

@robdmoore
Last active December 15, 2015 15:09
Show Gist options
  • Save robdmoore/5280124 to your computer and use it in GitHub Desktop.
Save robdmoore/5280124 to your computer and use it in GitHub Desktop.
Error when executing via msdeploy 3 to a fresh msdeploy 3 install via WebPiCmd.exe

Command on the remote web server (Windows Server 2012 Web Role VM in Windows Azure):

Webpicmd.exe /install /products:WDeployNoSMO /AcceptEula /Log:"%~dp0WebPI.log"

Contents of WebPI.log

WebPiCmd Information: 0 : 
        DateTime=2013-03-31T08:27:12.7576854Z
WebPiCmd Warning: 0 : The software that you obtain using the Web Plaform Installer Command Line Tool is licensed to you by its owner.    Microsoft grants you no rights for third party software.
        DateTime=2013-03-31T08:27:12.7576854Z
WebPiCmd Verbose: 0 : Executing command: "E:\plugins\WebDeploy\Webpicmd.exe"    /install /products:WDeployNoSMO /AcceptEula /Log:"E:\plugins\WebDeploy\WebPI.log"
        DateTime=2013-03-31T08:27:12.7889416Z
WebPiCmd Information: 0 : Successfully loaded primary feed: https://go.microsoft.com/?linkid=9815470
        DateTime=2013-03-31T08:27:49.2285358Z
WebPiCmd Start: 0 : The following software is going to be installed:
        DateTime=2013-03-31T08:27:49.8066599Z
WebPiCmd Information: 0 : EULA: 'Web Deploy 3.0 - July 2012', which is owned by 'Microsoft', will be downloaded from 'http://go.microsoft.com/fwlink/?LinkID=246802&clcid=0x409'.
        DateTime=2013-03-31T08:27:49.8066599Z
WebPiCmd Information: 0 : The license agreement to 'Web Deploy 3.0 - July 2012' is available at 'http://go.microsoft.com/?linkid=9815444'.
        DateTime=2013-03-31T08:27:49.8066599Z
WebPiCmd Information: 0 : EULA: 'Web Deploy 3.0 without bundled SQL support', which is owned by 'Microsoft' will be installed
        DateTime=2013-03-31T08:27:49.8066599Z
WebPiCmd Information: 0 : The license agreement to 'Web Deploy 3.0 without bundled SQL support' may be included with the software. 
You are responsible for and must separately locate, read and accept these license terms.
        DateTime=2013-03-31T08:27:49.8066599Z
WebPiCmd Information: 0 : EULA: 'Web Deploy 3.0 without bundled SQL support (latest)', which is owned by 'Microsoft' will be installed
        DateTime=2013-03-31T08:27:49.8066599Z
WebPiCmd Information: 0 : The license agreement to 'Web Deploy 3.0 without bundled SQL support (latest)' may be included with the software. 
You are responsible for and must separately locate, read and accept these license terms.
        DateTime=2013-03-31T08:27:49.8066599Z
WebPiCmd Stop: 0 : Accepted Eulas.
        DateTime=2013-03-31T08:27:49.8066599Z
WebPiCmd Start: 0 : Starting Installation
        DateTime=2013-03-31T08:27:49.8222848Z
WebPiCmd Information: 0 : Started downloading products...
        DateTime=2013-03-31T08:27:50.7620368Z
WebPiCmd Information: 0 : Started downloading: 'Web Deploy 3.0 - July 2012'
        DateTime=2013-03-31T08:27:50.9182542Z
WebPiCmd Information: 0 : Downloaded: 'Web Deploy 3.0 - July 2012'
        DateTime=2013-03-31T08:27:52.3588748Z
WebPiCmd Information: 0 : Started installing Products... 
        DateTime=2013-03-31T08:27:52.4211011Z
WebPiCmd Start: 0 : Started installing: 'Web Deploy 3.0 - July 2012'
        DateTime=2013-03-31T08:27:52.4367267Z
WebPiCmd Information: 0 : Install completed (Success): 'Web Deploy 3.0 - July 2012'
        DateTime=2013-03-31T08:28:14.9024204Z
WebPiCmd Stop: 0 : Web Deploy 3.0 - July 2012 : Installed
        DateTime=2013-03-31T08:28:14.9180452Z
WebPiCmd Start: 0 : Started installing: 'Web Deploy 3.0 without bundled SQL support'
        DateTime=2013-03-31T08:28:14.9180452Z
WebPiCmd Information: 0 : Install completed (Success): 'Web Deploy 3.0 without bundled SQL support'
        DateTime=2013-03-31T08:28:14.9805451Z
WebPiCmd Stop: 0 : Web Deploy 3.0 without bundled SQL support : Installed
        DateTime=2013-03-31T08:28:14.9805451Z
WebPiCmd Start: 0 : Started installing: 'Web Deploy 3.0 without bundled SQL support (latest)'
        DateTime=2013-03-31T08:28:14.9805451Z
WebPiCmd Information: 0 : Install completed (Success): 'Web Deploy 3.0 without bundled SQL support (latest)'
        DateTime=2013-03-31T08:28:14.9961734Z
WebPiCmd Stop: 0 : Web Deploy 3.0 without bundled SQL support (latest) : Installed
        DateTime=2013-03-31T08:28:15.0117978Z
WebPiCmd Information: 0 : 
        DateTime=2013-03-31T08:28:15.1839608Z
WebPiCmd Start: 0 : Verifying successful installation...
        DateTime=2013-03-31T08:28:15.1839608Z
WebPiCmd Information: 0 : Web Deploy 3.0 - July 2012             True
        DateTime=2013-03-31T08:28:15.1839608Z
WebPiCmd Information: 0 : Web Deploy 3.0 without bundled SQL support     True
        DateTime=2013-03-31T08:28:15.1839608Z
WebPiCmd Information: 0 : Web Deploy 3.0 without bundled SQL support (latest) True
        DateTime=2013-03-31T08:28:15.1839608Z
WebPiCmd Verbose: 0 : Download count: 5.66 Mb, 2 sec
        DateTime=2013-03-31T08:28:15.2151243Z
WebPiCmd Verbose: 0 : Installation count: 24.17 Mb, 23 sec
        DateTime=2013-03-31T08:28:15.2151243Z
WebPiCmd Verbose: 0 : Products            , Down. Size, Inst. Time, Down. Time, Inst. Size, Log Size    
        DateTime=2013-03-31T08:28:15.2151243Z
WebPiCmd Verbose: 0 : WDeploy_Only_3_0        , 5.66            , 22    , 1     , 24.17         , 0.72            
        DateTime=2013-03-31T08:28:15.2151243Z
WebPiCmd Verbose: 0 : WDeployNoSMO_3_0        , 0     , 0     , 0     , 0     , 0     
        DateTime=2013-03-31T08:28:15.2151243Z
WebPiCmd Verbose: 0 : WDeployNoSMO    , 0     , 0     , 0     , 0     , 0     
        DateTime=2013-03-31T08:28:15.2151243Z
WebPiCmd Verbose: 0 : Total (download size/install time): 5.66 Mb, 23 sec
        DateTime=2013-03-31T08:28:15.2151243Z
WebPiCmd Stop: 0 : Install of Products: SUCCESS
        DateTime=2013-03-31T08:28:15.2151243Z

What happens when I execute msdeploy locally to that server:

C:\>"Website\obj\Release\Package\Website.deploy.cmd" /M:https://<site>.cloudapp.net:8172/msdeploy.axd /U:<user> /P:<password> /A:Basic /Y -allowUntrusted -useChecksum -debug -verbose
SetParameters from: "C:\Website\obj\Release\Package\Website.SetParameters.xml"
You can change IIS Application Name, Physical path, connectionString or other deploy parameters in the above file.
-------------------------------------------------------
 Start executing msdeploy.exe
-------------------------------------------------------
"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:package='C:\Website\obj\Release\Package\Website.zip' -dest:auto,computerName="https://<site>.cloudapp.net:8172/msdeploy.axd",userName="<user>",password="<password>",authtype="Basic",includeAcls="False" -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"C:\Website\obj\Release\Package\Website.SetParameters.xml"    -allowUntrusted -useChecksum -debug -verbose
Info: Using ID '113d2836-a1db-4f8d-9969-400705310ffa' for connections to the remote server.
Verbose: Pre-authenticating to remote agent URL 'https://<site>.cloudapp.net:8172/msdeploy.axd' as '<user>'.
Verbose: Performing synchronization pass #1.
Verbose: Pre-authenticating to remote agent URL 'https://<site>.cloudapp.net:8172/msdeploy.axd' as '<user>'.
Verbose: Received response from agent (HTTP status 'OK').
Verbose: The HTTP connection (ID='113d2836-a1db-4f8d-9969-400705310ffa', type ='GetTraceStatus') is being kept alive while the request is processed.
Verbose: The HTTP connection (ID='113d2836-a1db-4f8d-9969-400705310ffa', type ='GetTraceStatus') is being kept alive while the request is processed.
Verbose: The HTTP connection (ID='113d2836-a1db-4f8d-9969-400705310ffa', type ='GetTraceStatus') is being kept alive while the request is processed.
System.Xml.XmlException: Root element is missing.
     at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
     at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
     at System.Xml.XmlReader.MoveToContent()
     at Microsoft.Web.Deployment.TraceEventSerializer.Deserialize(Stream responseStream, DeploymentBaseContext baseContext, DeploymentSyncContext syncContext)
     at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext, Nullable`1 syncPass)
     at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObjectdestObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId)
     at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
     at MSDeploy.MSDeploy.ExecuteWorker()
Error count: 1.
@robdmoore
Copy link
Author

Just tried with msdeploy v2 on the client-side and the same error happened.

@robdmoore
Copy link
Author

It turns out the reason for this is that MS Deploy 3 uses multiple HTTP requests and the Azure Load Balancer spreads the requests across multiple servers most of the time :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment