I got a problem during OctopusDeploy Migration Error: There is an error in XML document (0, 0)

I run regular migration from current version: 2018.2.3 to the latest version: 2018.5.3
An attempt to rollbackj lead to the same rror.
Details are below. It is not stated there which XML file has missed root element.


Stopping service…
Waiting for service to become Stopped. Current status: StopPending
Waiting for service to become Stopped. Current status: StopPending
Waiting for service to become Stopped. Current status: StopPending
Waiting for service to become Stopped. Current status: StopPending
Waiting for service to become Stopped. Current status: StopPending
Waiting for service to become Stopped. Current status: StopPending
Waiting for service to become Stopped. Current status: StopPending
Waiting for service to become Stopped. Current status: Stopped
Service stopped
Error: ===============================================================================
Error: There is an error in XML document (0, 0).
System.InvalidOperationException
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at Octopus.Shared.Configuration.XmlKeyValueStore.LoadSettings(IDictionary2 settingsToFill) at Octopus.Shared.Configuration.DictionaryKeyValueStore.Load() at System.Lazy1.CreateValue()
at System.Lazy1.LazyInitValue() at Octopus.Shared.Configuration.DictionaryKeyValueStore.Read(String key) at Octopus.Shared.Configuration.FlatDictionaryKeyValueStore.Get[TData](String name, TData defaultValue, Nullable1 protectionScope)
at Octopus.Core.Configuration.OctopusServerStorageConfiguration.get_ExternalDatabaseConnectionString()
Error: System.InvalidOperationException
Error: at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
Error: at Octopus.Shared.Configuration.XmlKeyValueStore.LoadSettings(IDictionary2 settingsToFill) Error: at Octopus.Shared.Configuration.DictionaryKeyValueStore.Load() Error: at System.Lazy1.CreateValue()
Error: at System.Lazy1.LazyInitValue() Error: at Octopus.Shared.Configuration.DictionaryKeyValueStore.Read(String key) Error: at Octopus.Shared.Configuration.FlatDictionaryKeyValueStore.Get[TData](String name, TData defaultValue, Nullable1 protectionScope)
Error: at Octopus.Shared.Configuration.HomeConfiguration.get_HomeDirectory()
Error: at Octopus.Shared.Configuration.LoggingConfiguration.get_LogsDirectory()
Error: at Octopus.Shared.Configuration.LogInitializer.InitializeLogs()
Error: at Octopus.Shared.Configuration.ApplicationInstanceSelector.LoadCurrentInstance()
Error: at Octopus.Shared.Configuration.ApplicationInstanceSelector.GetCurrentInstance()
Error: at Octopus.Server.Commands.DatabaseCommand.Start()
Error: at Octopus.Shared.Startup.AbstractCommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions)
Error: at Octopus.Shared.Startup.ConsoleHost.Run(Action`1 start, Action shutdown)
Error: at Octopus.Shared.Startup.OctopusProgram.Run()
Error:
Error: --Inner Exception–
Error: Root element is missing.
Error: System.Xml.XmlException
Error: at System.Xml.XmlTextReaderImpl.Throw(Exception e)
Error: at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
Error: at System.Xml.XmlReader.MoveToContent()
Error: at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderXmlSettingsRoot.Read4_octopussettings()
Error: -------------------------------------------------------------------------------
Error: Terminating process with exit code 100
Error: Full error details are available in the log files at:
Error: C:\Users\arturk\AppData\Local\Octopus\Logs
Error: If you need help, please send these log files to https://octopus.com/support
Error: -------------------------------------------------------------------------------
Error:
Error: The previous command returned a non-zero exit code of: 100
Error: The command that failed was: “C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe” database --instance “OctopusServer” --upgrade

Hi Artuk,

Thanks for getting in touch! Sorry to see that you have run into an error.

From what you have advised (and please correct me if I am wrong), it appears that the error you are seeing is after you attempted a downgrade from a newer version. Unfortunately that is not a supported process and with your database in its current state I would recommend that you restore your database from backup to return to a known good state.

Once that has occurred if you would still like to update I would recommend updating to Octopus 2018.5.5 as it includes some important fixes over 2018.5.3.

Please let me know if this issue started prior to the rollback, or if there are any other issues.

Regards,
Alex

Hi Alex,

Here are steps which I performed before that.

  1. Installation of new v. 2018.5.3 -> got the error similar to mentioned above.
  2. Tried to install one more time in recovery mode - > the same error message
  3. Tried to install previous version 2018.2.3 - > the same error message
  4. Tried to install one more time in recovery mode - > the same error message

Then I realized that Octopus server config file is empty.

Finally I was able to resolve the issueI by installing OctopusServer from scratch.
To be able to do it. I deleted Local machine\Software\Octopus registry folderand renamed C:\Octopus folder. Otherwise installation lead to the same problem.

Hi Artur,

Thanks for the update, sorry to hear that it was such a struggle to get this sorted.

We haven’t had any other reports of this issue so far so I’m not sure it’s worth investigating further at this point, but I will let you know if this changes.

Regards
Alex

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