Tentacle crashes with unhandled XmlException while calling Set-OctopusVariable

Hi,

I’m using the Set-OctopusVariable cmdlet you recommended in order to update octopus variables from predeploy.ps1.
Unfortunately the tentacle process is crashing if i’m using variable names with more than 33 characters.

Server Version: Octopus Deploy 1.6.1.1718
Tentacle Version: Health check successful. Running version: 1.6.1.1718

Output:

2013-08-22 08:58:31 INFO [PreDeploy Script] …
2013-08-22 09:18:26 ERROR System.ServiceModel.EndpointNotFoundException: Unable to communicate with the remote tentacle …

Log4Net:
Unhandled Exception: System.Xml.XmlException: ‘alue’ is an unexpected token. The expected token is ‘=’. Line 2, position 1.
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlReader.MoveToContent()
at System.Xml.Linq.XElement.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XElement.Parse(String text, LoadOptions options)
at Octopus.Shared.ServiceMessages.ServiceMessageParser.ProcessMessage(Stringmessage) in c:\w\e6923628be6eaf72\source\Octopus.Shared\ServiceMessages\ServiceM
essageParser.cs:line 95
at Octopus.Shared.ServiceMessages.ServiceMessageParser.Append(String line) in c:\w\e6923628be6eaf72\source\Octopus.Shared\ServiceMessages\ServiceMessageParse
r.cs:line 67
at System.Diagnostics.AsyncStreamReader.FlushMessageQueue()
at System.Diagnostics.AsyncStreamReader.GetLinesFromStringBuilder()
at System.Diagnostics.AsyncStreamReader.ReadBuffer(IAsyncResult ar)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.IO.Stream.ReadWriteTask.System.Threading.Tasks.ITaskCompletionAction.Invoke(Task completingTask)
at System.Threading.Tasks.Task.FinishContinuations()
at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()

Event log:

  • 1026 2 0 0x80000000000000 25720 Application vbr-2008r2-64.powelasa.powel.com
  • Application: Tentacle.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.Xml.XmlException Stack: at System.Xml.XmlTextReaderImpl.Throw(System.String, System.String[]) at System.Xml.XmlTextReaderImpl.ParseAttributes() at System.Xml.XmlTextReaderImpl.ParseElement() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlReader.MoveToContent() at System.Xml.Linq.XElement.Load(System.Xml.XmlReader, System.Xml.Linq.LoadOptions) at System.Xml.Linq.XElement.Parse(System.String, System.Xml.Linq.LoadOptions) at Octopus.Shared.ServiceMessages.ServiceMessageParser.ProcessMessage(System.String) at Octopus.Shared.ServiceMessages.ServiceMessageParser.Append(System.String) at System.Diagnostics.AsyncStreamReader.FlushMessageQueue() at System.Diagnostics.AsyncStreamReader.GetLinesFromStringBuilder() at System.Diagnostics.AsyncStreamReader.ReadBuffer(System.IAsyncResult) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.IO.Stream+ReadWriteTask.System.Threading.Tasks.ITaskCompletionAction.Invoke(System.Threading.Tasks.Task) at System.Threading.Tasks.Task.FinishContinuations() at System.Threading.Tasks.Task.Finish(Boolean) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef) at System.Threading.Tasks.Task.ExecuteEntry(Boolean) at System.Threading.ThreadPoolWorkQueue.Dispatch()

Here is an example of a simple package that crashes the tentacle on deployment while the predeploy.ps1 file is executed.
We would really appreciate it if you could provide a fix for this bug on octopus 1.6.

Thanks
Matthias Mueller

TentacleCrash.1.0.1.nupkg (2 KB)

Hi Matthias, thanks for letting us know, I’ll try to release a patch this week.

Paul

Hi Paul, thanks for prioritizing this issue.

Matthias

This should now be fixed:

Paul