Issue with Deployment Following Update clouds.config

Good Afternoon,
I’ve run into an issue with one of our deployments to azure. I believe this has only happened since updating octopus deploy.
We’re currently on the latest version 2018.8.3 we also had this issue in 2018.8.2.
The deployment step deploys to azure and comes up with the following error:
The step failed: Activity Deploy on *** failed with error ‘The remote script failed with exit code 100’.

The full log is:
Exception while replacing configuration-variables in: C:\Octopus\Work\20180910151816-24731-25\staging\clouds.config
September 10th 2018 16:18:39Error
System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
September 10th 2018 16:18:39Error
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
September 10th 2018 16:18:39Error
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
September 10th 2018 16:18:39Error
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
September 10th 2018 16:18:39Error
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
September 10th 2018 16:18:39Error
at Calamari.Integration.ConfigurationVariables.ConfigurationVariablesReplacer.ReadXmlDocument(String configurationFilePath)
September 10th 2018 16:18:39Error
at Calamari.Integration.ConfigurationVariables.ConfigurationVariablesReplacer.ModifyConfigurationFile(String configurationFilePath, VariableDictionary variables)
September 10th 2018 16:18:39Error
at Calamari.Deployment.Conventions.ConfigurationVariablesConvention.Install(RunningDeployment deployment)
September 10th 2018 16:18:39Error
at Calamari.Deployment.ConventionProcessor.RunInstallConventions()
September 10th 2018 16:18:39Error
at Calamari.Deployment.ConventionProcessor.RunConventions()
September 10th 2018 16:18:39Error
Running rollback conventions…
September 10th 2018 16:18:39Error
Data at the root level is invalid. Line 1, position 1.
September 10th 2018 16:18:39Error
System.Xml.XmlException
September 10th 2018 16:18:39Error
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
September 10th 2018 16:18:39Error
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
September 10th 2018 16:18:39Error
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
September 10th 2018 16:18:39Error
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
September 10th 2018 16:18:39Error
at Calamari.Integration.ConfigurationVariables.ConfigurationVariablesReplacer.ReadXmlDocument(String configurationFilePath)
September 10th 2018 16:18:39Error
at Calamari.Integration.ConfigurationVariables.ConfigurationVariablesReplacer.ModifyConfigurationFile(String configurationFilePath, VariableDictionary variables)
September 10th 2018 16:18:39Error
at Calamari.Deployment.Conventions.ConfigurationVariablesConvention.Install(RunningDeployment deployment)
September 10th 2018 16:18:39Error
at Calamari.Deployment.ConventionProcessor.RunInstallConventions()
September 10th 2018 16:18:39Error
at Calamari.Deployment.ConventionProcessor.RunConventions()
September 10th 2018 16:18:39Error
at Calamari.Azure.Commands.DeployAzureWebCommand.Execute(String[] commandLineArguments)
September 10th 2018 16:18:39Error
at Calamari.Program.Execute(String[] args)
September 10th 2018 16:18:40Fatal
The remote script failed with exit code 100

The clouds.config file from what i can see is one that is generated by octopus itself rather than anything that we’ve put in or setup.
The content of it is:
[AzureCloud]
subscription = ID

I had a look around on google and found Octopus.Action.Package.IgnoreVariableReplacementErrors but i didn’t really want to go changing this setting when the file that’s being scanned isn’t even one we’ve created.

Your input would be greatly appreciated.

Thanks
Jo

Hi Jo,

​Thanks for getting in touch! I think I have a resolution for you here. It looks like Octopus getting caught trying to perform the Configuration Variables feature. This feature technically tries to hit *.config, but is failing when parsing the clouds.config file as it is not XML.

​To workaround this issue, would you be able to add the following project variable, create a release and try to deploy?

​Variable | Value
​OctopusDisableAzureCLI | True

​I can also provide you with a link to the GitHub issue we currently have open for this, which contains further information about the issue.

​Let me know if this helps, or if you have any further questions here.

​Best regards,

Hi Daniel,

Thanks for the quick response. I’ve tested putting that variable in and the deployment has gone through.

Apologies for logging an existing issue. I did try to have a good google around yesterday but couldn’t find anything relevant i guess because it’s such a new issue.

Thanks for your help

Jo

Hi Jo,

No worries at all! I’m glad to hear the variable helped get the deployment through.

I should let you know that this issue is resolved in Octopus version 2018.8.3. The issue was initially labelled with the incorrect milestone (2018.8.2). This also caused some issues with the release notes which we have gone through and manually updated.

If you update your Octopus, you will be able to remove the hotfix variable from your project.

Hope that helps. :slight_smile:

Best regards,
Daniel

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.