Root Element Missing

We have a major project deadline and our Ocotpus server service just stopped. When trying to turn on this service, I get the following error.

2019-07-24 12:04:51.3581 7720 7 FATAL There is an error in XML document (0, 0).
Root element is missing.
System.InvalidOperationException: There is an error in XML document (0, 0). —> System.Xml.XmlException: Root element is missing.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
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.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.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()

Can some one please assist.

Do you have access to the server itself? Can you check to see that OctopusServer.config file has anything in it?

Hello Shawn,

I checked and it does not. Also we just realized we do not have any backups. Base on some information would we reinstall and just point to DB(which is local as well).

Thanks!

Ramy Rizkallah

Lead Systems Administrator

First American Property and Casualty Insurance

First American Specialty Insurance

Description: https://www.firstam.com/assets/email/images/fa-logo-signature.jpg

4 First American Way, Santa Ana, CA 92707

Mobile: 714-697-2469

Direct: 714-560-7874

Email: rrizkallah@firstam.com

I’d recommend taking a backup of the database prior to starting the re-installation procedure. Did you make a backup of your master key?

Hello Shawn,
Unfortunatly no, but we did back up the db and install the latest octopus deploy. Now we are getting

An unexpected error occurred in Octopus v2019.6.4: “TypeError: Cannot read property ‘isAuthorized’ of undefined”

Any thoughts ?

Sorry to hear you are still having issues. Without the master key, you will be unable to use any of your sensitive variables. Do you recall which version of Octopus you were on before?

Hi Ramy,

Shawn is on a flight to Australia heading to our home office. I’'ll be filling in for him in the meantime.

Have you been able to make any progress in getting your instance backup and running?

Looking forward to hearing from you shortly.

Thank you!

Tina

Hello Tina,

Thanks for the follow up. Looks like we got everything repointed back to the db and I just re-established connection to tentacles, however, we deploy it cannot find the last deployed last package… is there direction
on how to setup the feed ?

Thanks,

Ramy Rizkallah

Lead Systems Administrator

First American Property and Casualty Insurance

First American Specialty Insurance

Description: https://www.firstam.com/assets/email/images/fa-logo-signature.jpg

4 First American Way, Santa Ana, CA 92707

Mobile: 714-697-2469

Direct: 714-560-7874

Email: rrizkallah@firstam.com

Hey Ramy,
That’s good news!
The deployment journal on the Tentacle is the source of truth for what Octopus will know has been deployed to the Tentacle and what still exists on the Tentacle. If the journal is overwritten, the history of what was deployed is erased.

Take a look at the Deployment Journal on each Tentacles and let me know what you find.

Tina

Hi Ramy,
There have been other reports of this happening, and the team is trying to track down what might be causing the OctopusServer.config file to come up empty.

Is there any chance that changes were made to your Octopus server using the Octopus.Server.exe CLI before you encountered this issue?

Thank you for your help!
Tina

Hey Tina,
Nothing at all.

Thanks

Ramy

Thanks for the update Ramy!