Hi,
I noticed this issue yesterday, but forgot to post! Using Choco I got the latest Tentacle installed on a server, but it failed. We rolled back one at a time and found v6.1.1056 was the last working version. We realised that Choco is ahead of Octopus.com (bizarrely ), but today we’ve just done another install using the latest from Octopus.com, which is now the bugged version.
It’s 50:50 if it errors seemingly, but here is one of the failing health checks:
| == Failed: Check worker: OctoWorker07 ==
15:46:41 Verbose | Performing health check on machine
15:46:41 Verbose | Script isolation level: NoIsolation
15:46:42 Verbose | Executable directory is C:\Windows\system32\WindowsPowershell\v1.0
15:46:42 Verbose | Executable name or full path: C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe
15:46:42 Verbose | No user context provided. Running as current user.
15:46:42 Verbose | Starting C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe in working directory 'C:\Octopus\Work\20211111154641-526575-1' using 'OEM United States' encoding running as 'NT AUTHORITY\SYSTEM' with the same environment variables as the launching process
15:46:47 Verbose | Process C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe in C:\Octopus\Work\20211111154641-526575-1 exited with code 0
15:46:47 Verbose | Exit code: 0
15:46:47 Verbose | Script isolation level: NoIsolation
15:46:48 Verbose | Executable directory is C:\Windows\system32\WindowsPowershell\v1.0
15:46:48 Verbose | Executable name or full path: C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe
15:46:48 Verbose | No user context provided. Running as current user.
15:46:48 Verbose | Starting C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe in working directory 'C:\Octopus\Work\20211111154647-526575-2' using 'OEM United States' encoding running as 'NT AUTHORITY\SYSTEM' with the same environment variables as the launching process
15:46:48 Info | Host Name: OctoWorker07
15:46:48 Info | Running As: WORKGROUP\SYSTEM (Local Administrator: True)
15:46:48 Info | Running Tentacle version 6.1.1132
15:46:48 Info | Tentacle communication uses a 'sha256RSA' certificate
15:46:49 Info | Drive C: has 115 GB available
15:46:49 Info | Drive D: has 7 GB available
15:46:58 Info | azure-cli 2.30.0
15:46:58 Info | core 2.30.0
15:46:58 Info | telemetry 1.0.6
15:46:58 Info | Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
15:46:58 Info | Extensions directory 'C:\Windows\system32\config\systemprofile\.azure\cliextensions'
15:46:58 Info | Python (Windows) 3.8.9 (tags/v3.8.9:a743f81, Apr 6 2021, 13:22:56) [MSC v.1928 32 bit (Intel)]
15:46:58 Info | Legal docs and information: aka.ms/AzureCliLegal
15:46:58 Info | Your CLI is up-to-date.
15:46:58 Error | Please let us know how we are doing: https://aka.ms/azureclihats
15:46:58 Error | and let us know if you're interested in trying out our newest features: https://aka.ms/CLIUXstudy
15:46:59 Info | DotNet assemblies loaded and working
15:46:59 Verbose | Process C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe in C:\Octopus\Work\20211111154647-526575-2 exited with code 0
15:46:59 Fatal | The process cannot access the file 'C:\Octopus\Work\20211111154647-526575-2' because it is being used by another process.
| Server exception:
| System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. ---> System.IO.IOException: The process cannot access the file 'C:\Octopus\Work\20211111154647-526575-2' because it is being used by another process.
| at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
| at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data)
| at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
| at Octopus.Shared.Util.OctopusPhysicalFileSystem.<>c__DisplayClass43_0.<PurgeDirectoryAsync>b__1()
| at System.Threading.Tasks.Task.Execute()
| --- End of stack trace from previous location where exception was thrown ---
| at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
| at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
| at Octopus.Shared.Util.OctopusPhysicalFileSystem.<PurgeDirectoryAsync>d__43.MoveNext()
| --- End of stack trace from previous location where exception was thrown ---
| at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
| at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
| at Octopus.Shared.Util.OctopusPhysicalFileSystem.<DeleteDirectory>d__14.MoveNext()
| --- End of inner exception stack trace ---
| at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
| at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
| at Octopus.Shared.Util.OctopusPhysicalFileSystem.DeleteDirectory(String path, DeletionOptions options)
| at Octopus.Tentacle.Services.Scripts.ScriptService.CompleteScript(CompleteScriptCommand command)
| --- End of inner exception stack trace ---
| at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
| at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
| at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
| at Halibut.ServiceModel.ServiceInvoker.Invoke(RequestMessage requestMessage)
| at Halibut.Transport.Protocol.MessageExchangeProtocol.InvokeAndWrapAnyExceptions(RequestMessage request, Func`2 incomingRequestProcessor)
15:46:59 Verbose | The process cannot access the file 'C:\Octopus\Work\20211111154647-526575-2' because it is being used by another process.
| Server exception:
| System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. ---> System.IO.IOException: The process cannot access the file 'C:\Octopus\Work\20211111154647-526575-2' because it is being used by another process.
| at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
| at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data)
| at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
| at Octopus.Shared.Util.OctopusPhysicalFileSystem.<>c__DisplayClass43_0.<PurgeDirectoryAsync>b__1()
| at System.Threading.Tasks.Task.Execute()
| --- End of stack trace from previous location where exception was thrown ---
| at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
| at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
| at Octopus.Shared.Util.OctopusPhysicalFileSystem.<PurgeDirectoryAsync>d__43.MoveNext()
| --- End of stack trace from previous location where exception was thrown ---
| at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
| at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
| at Octopus.Shared.Util.OctopusPhysicalFileSystem.<DeleteDirectory>d__14.MoveNext()
| --- End of inner exception stack trace ---
| at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
| at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
| at Octopus.Shared.Util.OctopusPhysicalFileSystem.DeleteDirectory(String path, DeletionOptions options)
| at Octopus.Tentacle.Services.Scripts.ScriptService.CompleteScript(CompleteScriptCommand command)
| --- End of inner exception stack trace ---
| at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
| at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
| at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
| at Halibut.ServiceModel.ServiceInvoker.Invoke(RequestMessage requestMessage)
| at Halibut.Transport.Protocol.MessageExchangeProtocol.InvokeAndWrapAnyExceptions(RequestMessage request, Func`2 incomingRequestProcessor)
| Halibut.HalibutClientException: The process cannot access the file 'C:\Octopus\Work\20211111154647-526575-2' because it is being used by another process.
| Server exception:
| System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. ---> System.IO.IOException: The process cannot access the file 'C:\Octopus\Work\20211111154647-526575-2' because it is being used by another process.
| at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
| at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data)
| at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
| at Octopus.Shared.Util.OctopusPhysicalFileSystem.<>c__DisplayClass43_0.<PurgeDirectoryAsync>b__1()
| at System.Threading.Tasks.Task.Execute()
| --- End of stack trace from previous location where exception was thrown ---
| at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
| at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
| at Octopus.Shared.Util.OctopusPhysicalFileSystem.<PurgeDirectoryAsync>d__43.MoveNext()
| --- End of stack trace from previous location where exception was thrown ---
| at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
| at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
| at Octopus.Shared.Util.OctopusPhysicalFileSystem.<DeleteDirectory>d__14.MoveNext()
| --- End of inner exception stack trace ---
| at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
| at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
| at Octopus.Shared.Util.OctopusPhysicalFileSystem.DeleteDirectory(String path, DeletionOptions options)
| at Octopus.Tentacle.Services.Scripts.ScriptService.CompleteScript(CompleteScriptCommand command)
| --- End of inner exception stack trace ---
| at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
| at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
| at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
| at Halibut.ServiceModel.ServiceInvoker.Invoke(RequestMessage requestMessage)
| at Halibut.Transport.Protocol.MessageExchangeProtocol.InvokeAndWrapAnyExceptions(RequestMessage request, Func`2 incomingRequestProcessor)
| at Halibut.ServiceModel.HalibutProxy.EnsureNotError(ResponseMessage responseMessage)
| at Halibut.ServiceModel.HalibutProxy.Invoke(MethodInfo targetMethod, Object[] args)
| --- End of stack trace from previous location ---
| at System.Reflection.DispatchProxyGenerator.Invoke(Object[] args)
| at generatedProxy_1.CompleteScript(CompleteScriptCommand )
| at Octopus.Server.Orchestration.Targets.Tentacles.ScriptObserver.Finish(ScriptTicket ticket, Int64 next, ScriptOutputFilter output) in ./source/Octopus.Server/Orchestration/Targets/Tentacles/ScriptObserver.cs:line 70
| at Octopus.Server.Orchestration.Targets.Tentacles.ScriptObserver.ObserveUntilComplete(ScriptTicket ticket, ITaskLog taskLog, Action`1 collectArtifacts) in ./source/Octopus.Server/Orchestration/Targets/Tentacles/ScriptObserver.cs:line 30
| at Octopus.Server.Orchestration.Targets.Tentacles.TentacleRemoteEndpointFacade.ExecuteCommand(StartScriptCommand command, ITaskLog taskLog) in ./source/Octopus.Server/Orchestration/Targets/Tentacles/TentacleRemoteEndpointFacade.cs:line 59
| at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionExecution.Immediate.ExecutionTargets.TentacleExecutionTarget.Execute(ScriptCollection bootstrapperScripts, IReadOnlyList`1 boostrapperArguments, IReadOnlyList`1 files, Nullable`1 forceIsolationLevel, Boolean raw, ITaskLog taskLog, Nullable`1 isolationMutexTimeout) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/ActionExecution/Immediate/ExecutionTargets/TentacleExecutionTarget.cs:line 67
| at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionExecution.Immediate.ImmediateExecutor.ExecuteRawScript(ScriptCollection scripts, IReadOnlyList`1 files, Boolean isRaw, ITaskLog taskLog, Nullable`1 isolationMutexTimeout, ExecutionIsolation isolationLevel) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/ActionExecution/Immediate/ImmediateExecutor.cs:line 88
| at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionExecution.CommandBuilders.ScriptCommandBuilder.Execute(ITaskLog taskLog) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/ActionExecution/CommandBuilders/ScriptCommandBuilder.cs:line 67
| at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.AdHocActionDispatcher.InvokeActionHandler(Machine target, ActionHandlerInvocation actionHandler, ActionAndTargetScopedVariables actionAndTargetScopedVariables, IExecutor executor, TargetManifest targetManifest, ITaskLog taskLog) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/ActionDispatch/AdHocActionDispatcher.cs:line 171
| at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.AdHocActionDispatcher.Dispatch(Machine machine, ActionHandlerInvocation actionHandler, ITaskLog taskLog, VariableCollection variables) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/ActionDispatch/AdHocActionDispatcher.cs:line 57
| at Octopus.Server.Orchestration.ServerTasks.HealthCheck.Controllers.TentacleMachineHealthController.CheckMachineHealth(Machine machine, ITaskLog taskLog)
| at Octopus.Server.Orchestration.ServerTasks.HealthCheck.Controllers.MachineHealthController.CheckHealth(Machine machine, ITaskLog taskLog) in ./source/Octopus.Server/Orchestration/ServerTasks/HealthCheck/Controllers/MachineHealthController.cs:line 48
| at Octopus.Server.Orchestration.ServerTasks.HealthCheck.HealthCheckService.PerformHealthCheck(Machine machine, ITaskLog machineTaskLog, ITaskLog serverTaskLog, IHealthResultCollator healthResultCollator, CancellationToken cancellationToken, ExceptionHandling exceptionHandling, Action`2 customAction) in ./source/Octopus.Server/Orchestration/ServerTasks/HealthCheck/HealthCheckService.cs:line 86
| Octopus.Server version 2021.3.8030 (2021.3.8030)
15:46:59 Verbose | Recording health check results