Exception Info: System.Reflection.TargetInvocationException

Hi

We seem to be experiencing this issue, other’s have previously reported.

Our octopus deploy version is: 2.6.4.951
and we’ve already tried replace with

Application: Octopus.Server.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Reflection.TargetInvocationException
Stack:
at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
at System.Delegate.DynamicInvokeImpl(System.Object[])
at System.ExecutionContextLightup.Run(System.ExecutionContextLightup, System.Action1<System.Object>, System.Object) at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run() at Microsoft.Runtime.CompilerServices.TaskAwaiter.RunNoException(System.Action) at Microsoft.Runtime.CompilerServices.TaskAwaiter+<>c_DisplayClassa.<OnCompletedInternal>b_4(System.Threading.Tasks.Task) at System.Threading.Tasks.Task.Execute() 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.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef) at System.Threading.Tasks.Task.ExecuteEntry(Boolean) at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.Task, Boolean) at System.Threading.Tasks.TaskScheduler.TryRunInline(System.Threading.Tasks.Task, Boolean) at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(System.Threading.Tasks.Task, Boolean) at System.Threading.Tasks.Task.FinishContinuations() at System.Threading.Tasks.Task1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetResult(System.__Canon)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.__Canon) at Raven.Client.LinqExtensions+<FirstOrDefaultAsync>d__2e1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
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.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
at System.Runtime.CompilerServices.TaskAwaiter.RunNoException(System.Action)
at System.Runtime.CompilerServices.TaskAwaiter+<>c_DisplayClassa.b_4(System.Threading.Tasks.Task)
at System.Threading.Tasks.Task.Execute()
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.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean)
at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.Task, Boolean)
at System.Threading.Tasks.TaskScheduler.TryRunInline(System.Threading.Tasks.Task, Boolean)
at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(System.Threading.Tasks.Task, Boolean)
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()

Hi Peter,

Thanks for reaching out. I’m sorry to say that this is a known issue, and that the only fix for this is to upgrade to Octopus 3.0/3.1. This exception is thrown by RavenDB and since there was not fix for it (we even consulted this with the RavenDB team itself), in 3.0/3.1 we decide to move to SQL to avoid having this issue ever again.

For more info about the reason of the changes we did in 3.0, please take a look at this blogpost: https://octopusdeploy.com/blog/3.0-switching-to-sql

Sorry for the crappy news.

Dalmiro