I had to update the licence on one of our Octopus servers today when we found out existing licence had expired. We bought new licences a few months back but when I’ve gone to apply the new licence I get an error:
2018-05-21 11:12:57.8222 1 FATAL Data at the root level is invalid. Line 1, position 1.
System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
at Octopus.Server.Licensing.LicenseKey.Parse(String licenseText) in Y:\Work\refs\tags\3.4.5\source\Octopus.Server\Licensing\LicenseKey.cs:line 71
at Octopus.Server.Licensing.LicenseComplianceChecker.CheckCompatibility(License license, OctopusRelease candidate) in Y:\Work\refs\tags\3.4.5\source\Octopus.Server\Licensing\LicenseComplianceChecker.cs:line 49
at Octopus.Server.Commands.LicenseCommand.Start() in Y:\Work\refs\tags\3.4.5\source\Octopus.Server\Commands\LicenseCommand.cs:line 83
at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in Y:\Work\refs\tags\3.4.5\source\Octopus.Shared\Startup\AbstractCommand.cs:line 58
at Octopus.Shared.Startup.OctopusProgram.Start(ICommandRuntime commandRuntime) in Y:\Work\refs\tags\3.4.5\source\Octopus.Shared\Startup\OctopusProgram.cs:line 221
at Octopus.Shared.Startup.ConsoleHost.Run(Action`1 start, Action shutdown) in Y:\Work\refs\tags\3.4.5\source\Octopus.Shared\Startup\ConsoleHost.cs:line 72
at Octopus.Shared.Startup.OctopusProgram.Run() in Y:\Work\refs\tags\3.4.5\source\Octopus.Shared\Startup\OctopusProgram.cs:line 94
I upgraded the server from 3.4.5 to 2018.5.1 but am still faced the the same error.
I’m using this command to upgrade the licence:
Octopus.Server license --licenseBase64="<licence key here>"
Has anyone had this problem before?