Error while deploying to Azure websites

I am getting the following error often while deploying to Azure websites. However it works on retrying. Any hints?

Microsoft.Web.Deployment.DeploymentDetailedException: Web Deploy experienced a connection problem with the server and had to terminate the connection.  Contact your server administrator if the problem persists.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED. ---> System.Xml.XmlException: Root element is missing.
19:36:14Error
   at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
19:36:14Error
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
19:36:14Error
   at System.Xml.XmlReader.MoveToContent()
19:36:14Error
   at Microsoft.Web.Deployment.TraceEventSerializer.Deserialize(Stream responseStream, DeploymentBaseContext baseContext, DeploymentSyncContext syncContext)
19:36:14Error
   --- End of inner exception stack trace ---
19:36:14Error
   at Microsoft.Web.Deployment.TraceEventSerializer.Deserialize(Stream responseStream, DeploymentBaseContext baseContext, DeploymentSyncContext syncContext)
19:36:14Error
   at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext, Nullable`1 syncPass, String syncSessionId)
19:36:14Error
   at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
19:36:14Error
   at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
19:36:14Error
   at Calamari.Azure.Deployment.Conventions.AzureWebAppConvention.Install(RunningDeployment deployment) in Y:\work\14ffc968155e4956\source\Calamari.Azure\Deployment\Conventions\AzureWebAppConvention.cs:line 37
19:36:14Error
   at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in Y:\work\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 60
19:36:14Error
   at Calamari.Deployment.ConventionProcessor.RunConventions() in Y:\work\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 28
19:36:14Error
Running rollback conventions...
19:36:14Error
Microsoft.Web.Deployment.DeploymentDetailedException: Web Deploy experienced a connection problem with the server and had to terminate the connection.  Contact your server administrator if the problem persists.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED. ---> System.Xml.XmlException: Root element is missing.
19:36:14Error
   at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
19:36:14Error
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
19:36:14Error
   at System.Xml.XmlReader.MoveToContent()
19:36:14Error
   at Microsoft.Web.Deployment.TraceEventSerializer.Deserialize(Stream responseStream, DeploymentBaseContext baseContext, DeploymentSyncContext syncContext)
19:36:14Error
   --- End of inner exception stack trace ---
19:36:14Error
   at Microsoft.Web.Deployment.TraceEventSerializer.Deserialize(Stream responseStream, DeploymentBaseContext baseContext, DeploymentSyncContext syncContext)
19:36:14Error
   at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext, Nullable`1 syncPass, String syncSessionId)
19:36:14Error
   at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
19:36:14Error
   at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
19:36:14Error
   at Calamari.Azure.Deployment.Conventions.AzureWebAppConvention.Install(RunningDeployment deployment) in Y:\work\14ffc968155e4956\source\Calamari.Azure\Deployment\Conventions\AzureWebAppConvention.cs:line 37
19:36:14Error
   at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in Y:\work\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 60
19:36:14Error
   at Calamari.Deployment.ConventionProcessor.RunConventions() in Y:\work\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 50
19:36:14Error
   at Calamari.Azure.Commands.DeployAzureWebCommand.Execute(String[] commandLineArguments) in Y:\work\14ffc968155e4956\source\Calamari.Azure\Commands\DeployAzureWebCommand.cs:line 86
19:36:14Error
   at Calamari.Program.Execute(String[] args) in Y:\work\14ffc968155e4956\source\Calamari\Program.cs:line 38
19:36:14Fatal
The step failed: The remote script failed with exit code 100
Step 3: Deploy Tenant Cloud Service

Is there any way to retry a specific process step when it fails?

Hi Ponsakthi,

No, there is no way to retry a specific step.

Are the Azure Web Apps you are deploying load-balanced?

Regards,
Michael

@Michael: We have 2 instances of websites and I assume azure takes care of load balancing. Do we need to setup anything extra?

Hi Ponsakthi,

Are you deploying to an Azure Web App or a Web Role?

Could you please send the full task log for a failing deployment?

Regards,
Michael

We are using Azure Web App.
Could you please share your mail id so that I can share the full task log?

Hi,

Please send the log through to support @ octopus.com

Thanks!
Vanessa

I am facing same problem , any work around for this. Please update