We had a weekend of repeated powercuts that seem to have corrupted our octopus installation. The service will no longer start and I get the below error in event viewer:
2021-03-09 12:21:08.7595 2016 7 FATAL There is an error in XML document (1, 1).
Data at the root level is invalid. Line 1, position 1.
System.InvalidOperationException: There is an error in XML document (1, 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.XmlReader.MoveToContent()
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderXmlSettingsRoot.Read4_octopussettings()
β End of inner exception stack trace β
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.Lazy
1.CreateValue()
at System.Lazy1.LazyInitValue() at Octopus.Shared.Configuration.DictionaryKeyValueStore.Read(String key) at Octopus.Shared.Configuration.FlatDictionaryKeyValueStore.Get[TData](String name, TData defaultValue, Nullable
1 protectionScope)
at Octopus.Shared.Configuration.HomeConfiguration.get_HomeDirectory()
at Octopus.Shared.Configuration.LoggingConfiguration.get_LogsDirectory()
at Octopus.Shared.Configuration.LogInitializer.InitializeLogs()
at Octopus.Shared.Configuration.ApplicationInstanceSelector.LoadCurrentInstance()
at Octopus.Shared.Configuration.ApplicationInstanceSelector.GetCurrentInstance()
at Octopus.Server.Commands.RunCommand.Start()
at Octopus.Shared.Startup.AbstractCommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions)
at Octopus.Shared.Startup.WindowsServiceHost.<>c__DisplayClass1_0.b__0()
at Octopus.Shared.Startup.WindowsServiceAdapter.RunService()
I dont have recent backups of this system, so hoping there is a way to either identify the faulty xml and repair or to somehow repair octopus server without losing our data.