Error deploying to Tentacle

Version - 2.4.7.85

When deploying a nuget package to a machine I get the following error -

2014-06-11 12:52:30.4710 INFO Beginning transfer of D:\Octopus Tentacle 2.0\Files\Octopus.Tentacle.2.4.7.85.nupkg-d5924bf2-0809-439a-9783-48167ff34f4d
2014-06-11 12:52:47.7369 INFO Beginning deployment…
2014-06-11 12:52:47.7525 ERROR Error in TentaclePackageDeployment-OH4-_XNNC0TZ@SQ-TM-DEV-WEB02-604DE4E4 while receiving e0588fa2-f041-4a21-9345-212a2297fbda
System.Xml.XmlException: Root element is missing.
at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options)
at Octopus.Tentacle.Deployment.Journal.DeploymentJournalReaderWriter.d__0.MoveNext() in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Journal\DeploymentJournalReaderWriter.cs:line 33
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Linq.Buffer1…ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at Octopus.Tentacle.Deployment.Journal.DeploymentJournal.GetInstalledPaths() in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Journal\DeploymentJournal.cs:line 184
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.GenerateUniqueInstallationDirectoryByAppendingACounter(String packageInstallationPath, PackageMetadata package) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 108
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.InstallPackageUsingNuGet(StoredPackage package, String packageInstallationPath, ILog log) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 81
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.Install(StoredPackage package, PackageInstallationOptions options, ILog activityLog) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 59
at Octopus.Tentacle.Orchestration.Deploy.Package.TentaclePackageDeployment.Receive(AcquiredEvent message) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Orchestration\Deploy\Package\TentaclePackageDeployment.cs:line 211
at Pipefish.Actor.OnReceivingTyped[TBody](Message message) in c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish\Actor.cs:line 113
2014-06-11 12:52:47.7525 FATAL
System.Xml.XmlException: Root element is missing.
at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options)
at Octopus.Tentacle.Deployment.Journal.DeploymentJournalReaderWriter.d__0.MoveNext() in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Journal\DeploymentJournalReaderWriter.cs:line 33
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Linq.Buffer1…ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at Octopus.Tentacle.Deployment.Journal.DeploymentJournal.GetInstalledPaths() in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Journal\DeploymentJournal.cs:line 184
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.GenerateUniqueInstallationDirectoryByAppendingACounter(String packageInstallationPath, PackageMetadata package) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 108
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.InstallPackageUsingNuGet(StoredPackage package, String packageInstallationPath, ILog log) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 81
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.Install(StoredPackage package, PackageInstallationOptions options, ILog activityLog) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 59
at Octopus.Tentacle.Orchestration.Deploy.Package.TentaclePackageDeployment.Receive(AcquiredEvent message) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Orchestration\Deploy\Package\TentaclePackageDeployment.cs:line 211
at Pipefish.Actor.OnReceivingTyped[TBody](Message message) in c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish\Actor.cs:line 113
2014-06-11 12:52:47.7682 ERROR Could not write an entry to the deployment journal for a failed deployment.
System.ArgumentNullException: Value cannot be null.
Parameter name: variables
at Octopus.Tentacle.Orchestration.Deploy.Package.TentaclePackageDeployment.Failed() in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Orchestration\Deploy\Package\TentaclePackageDeployment.cs:line 379
2014-06-11 12:52:47.7682 ERROR Caught exception while receiving: Octopus.Tentacle.Orchestration.Deploy.Mutex.AcquiredEvent
System.Xml.XmlException: Root element is missing.
at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options)
at Octopus.Tentacle.Deployment.Journal.DeploymentJournalReaderWriter.d__0.MoveNext() in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Journal\DeploymentJournalReaderWriter.cs:line 33
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Linq.Buffer1…ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at Octopus.Tentacle.Deployment.Journal.DeploymentJournal.GetInstalledPaths() in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Journal\DeploymentJournal.cs:line 184
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.GenerateUniqueInstallationDirectoryByAppendingACounter(String packageInstallationPath, PackageMetadata package) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 108
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.InstallPackageUsingNuGet(StoredPackage package, String packageInstallationPath, ILog log) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 81
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.Install(StoredPackage package, PackageInstallationOptions options, ILog activityLog) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 59
at Octopus.Tentacle.Orchestration.Deploy.Package.TentaclePackageDeployment.Receive(AcquiredEvent message) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Orchestration\Deploy\Package\TentaclePackageDeployment.cs:line 211
at Pipefish.Actor.OnReceivingTyped[TBody](Message message) in c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish\Actor.cs:line 113
2014-06-11 12:52:47.7994 ERROR Received a delivery failure in response to acquisition 5c261cd1-34e0-4c06-b15c-83d6f841402f
Pipefish.Errors.PipefishCommunicationException: The message could not be handled
System.Xml.XmlException: Root element is missing.
at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options)
at Octopus.Tentacle.Deployment.Journal.DeploymentJournalReaderWriter.d__0.MoveNext() in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Journal\DeploymentJournalReaderWriter.cs:line 33
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Linq.Buffer1…ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at Octopus.Tentacle.Deployment.Journal.DeploymentJournal.GetInstalledPaths() in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Journal\DeploymentJournal.cs:line 184
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.GenerateUniqueInstallationDirectoryByAppendingACounter(String packageInstallationPath, PackageMetadata package) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 108
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.InstallPackageUsingNuGet(StoredPackage package, String packageInstallationPath, ILog log) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 81
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.Install(StoredPackage package, PackageInstallationOptions options, ILog activityLog) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 59
at Octopus.Tentacle.Orchestration.Deploy.Package.TentaclePackageDeployment.Receive(AcquiredEvent message) in y:\work\db516cd4dfb6f424\source\Octopus.Tentacle\Orchestration\Deploy\Package\TentaclePackageDeployment.cs:line 211
at Pipefish.Actor.OnReceivingTyped[TBody](Message message) in c:\TeamCity\buildAgent\work\cf0b1f41263b24b9\source\Pipefish\Actor.cs:line 113

Hi Graham,

Thanks for getting in touch!

It appears that you might have a corrupt file that is creating this issue for you.
If you could please find the following file and attach a copy so we can have a look at what might have gone wrong.
C:\Octopus\Applications.Tentacle\DeploymentJournal.xml

Thanks!

Vanessa

C:\Octopus does not contain a folder called Applications.Tentacle.

It only contains a Logs folder.

Hi Graham,

Very sorry that was for a default installation. To find your folder/installation path please do the following:

  1. Open the tentacle manager application
  2. look for the ‘Home directory’ (default is c:/Octopus) Within that folder you will see a tentacle folder, inside there a tentacle.config file
  3. Open that file in a text editor - find the following line:
    <set key="Tentacle.Deployment.ApplicationDirectory">C:\Octopus\Applications</set>
  4. Go that path, you will find a .tentacle folder - where you will find the Deployment.Journal.xml

Please send us that file.

Vanessa

D:\Deploy
so I found D:\Deploy\.Tentacle\DeploymentJournal.xml but its empty and was last modified on 30/05/14 whereas I attempted to deploy to the machine on 11/06/14.

Hi Graham,

Thanks for getting back to us.

Could you please delete that file, and then try your deployment again.

Let me know how that goes!

Vanessa

Deleting the file fixed it!

Thanks.

Hi. We’re running version 2.4.8.107 and we’re experiencing a similar error. I found this post the first time and deleting the DeploymentJournal.xml file resolved our issue.

Now it’s happened a second time, both times during a production deployment of course, and my management is getting concerned and they want the problem resolved.

Any idea what is causing this file to become corrupt, and is there a fix upcoming?

Exact error is:

Root element is missing.
System.Xml.XmlException: Root element is missing.
at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options)
at Octopus.Tentacle.Deployment.Journal.DeploymentJournalReaderWriter.d__0.MoveNext() in y:\work\refs\heads\master\source\Octopus.Tentacle\Deployment\Journal\DeploymentJournalReaderWriter.cs:line 33
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Linq.Buffer1…ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at Octopus.Tentacle.Deployment.Journal.DeploymentJournal.GetInstalledPaths() in y:\work\refs\heads\master\source\Octopus.Tentacle\Deployment\Journal\DeploymentJournal.cs:line 184
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.GenerateUniqueInstallationDirectoryByAppendingACounter(String packageInstallationPath, PackageMetadata package) in y:\work\refs\heads\master\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 108
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.InstallPackageUsingNuGet(StoredPackage package, String packageInstallationPath, ILog log) in y:\work\refs\heads\master\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 81
at Octopus.Tentacle.Deployment.Packages.PackageInstaller.Install(StoredPackage package, PackageInstallationOptions options, ILog activityLog) in y:\work\refs\heads\master\source\Octopus.Tentacle\Deployment\Packages\PackageInstaller.cs:line 59
at Octopus.Tentacle.Orchestration.Deploy.Package.TentaclePackageDeployment.Receive(AcquiredEvent message) in y:\work\refs\heads\master\source\Octopus.Tentacle\Orchestration\Deploy\Package\TentaclePackageDeployment.cs:line 211
at Pipefish.Actor.OnReceivingTyped[TBody](Message message) in y:\work\3cbe05672d69a231\source\Pipefish\Actor.cs:line 113

Hi John,

Thanks for getting in touch! The DeploymentJournal.xml file is needed for any deployment. After a deployment it is written to with what happened, where packages were stored project details that are all then read for the next deployment. It’s also read from for retention policy stuff. So the question is, why is this file becoming corrupt, or why is this file unavailable to be read from and or written to.
As it says Root element missing, that is leading us to wonder if the file gets created on the first deployment but nothing gets written to, it remains blank.
If it is not blank, are you able to send us the corrupt file?

And a few questions. Do you or could you have anti-virus or monitoring software that is locking that file when it is first created by reading/scanning it?
Does it only happen on the one server, and happen on the second deployment after the file is deleted?
Production servers do tend to be more locked down, but obviously the user is creating the file in the first instance, it just appears to be unable to write to that file. Leading to suspicions about AV and monitoring.

Please let me know what you find.
Vanessa

It was the same server \ tentacle both times.
Both times the file was empty, 0 kb in size.

We are using this tentacle to do SQL deployments. In both cases that we had a failure we were deploying multiple databases from different projects to various destination SQL servers. We were able to deploy database 1 and 2 fine, had this failure on database 3, and then had success deploying database 3 after deleting the 0 kb DeploymentJournal.xml.

I will have to check and see if AV is running on this machine, I suspect it is. If so I will have them try adding the Octopus folders to the exclusion list.

Hi John,

Have you had any luck looking for an AV? Has the issue cleared up?

Vanessa

Haven’t heard back about AV yet. We have not had a release into production since the last failure so I’m not sure if it’s cleared up or not. We are planning to update Octopus to the latest version this week so I’m hopeful that might resolve it as well.

No AV enabled on the tentacle directories.
We did update to 2.5.9 last week, and we installed additional tentacle instances on our server so we can spread out database deployments across multiple tentacles. Had no issues on our most recent prod deploy.

Hi John,

I am glad this seems to have resolved itself. Please let me know if it occurs again.

Vanessa