Hi,
OD Version 2022.1.2121
We are working on a project to replace an existing deployment process with OD and have encountered an issue with some servers where a step to restart the server is failing regularly.
The step triggering the restart is as follows:
The step proceeding this polls the server to confirm when it has restarted before proceeding with other steps.
The error we are seeing is:
Name Value
21:52:55 Verbose | ---- -----
21:52:55 Verbose | PSVersion 5.1.17763.2931
21:52:55 Verbose | PSEdition Desktop
21:52:55 Verbose | PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
21:52:55 Verbose | BuildVersion 10.0.17763.2931
21:52:55 Verbose | CLRVersion 4.0.30319.42000
21:52:55 Verbose | WSManStackVersion 3.0
21:52:55 Verbose | PSRemotingProtocolVersion 2.3
21:52:55 Verbose | SerializationVersion 1.1.0.1
21:52:55 Verbose | PowerShell Environment Information:
21:52:55 Verbose | OperatingSystem: Microsoft Windows NT 10.0.17763.0
21:52:55 Verbose | OsBitVersion: x64
21:52:55 Verbose | Is64BitProcess: True
21:52:55 Verbose | CurrentUser: NT AUTHORITY\SYSTEM
21:52:55 Verbose | MachineName: {}
21:52:55 Verbose | ProcessorCount: 4
21:52:55 Verbose | CurrentDirectory: C:\Octopus\Work\20220922205252-357084-120
21:52:55 Verbose | CurrentLocation: C:\Octopus\Work\20220922205252-357084-120
21:52:55 Verbose | TempDirectory: C:\Windows\TEMP
21:52:55 Verbose | HostProcess: powershell (8144)
21:52:55 Verbose | TotalPhysicalMemory: 16776756 KB
21:52:55 Verbose | AvailablePhysicalMemory: 13034448 KB
21:52:55 Verbose | Invoking target script C:\Octopus\Work\20220922205252-357084-120\Script.ps1 with parameters.
21:52:56 Error | error occurred when sending a request to ‘https://{}:10933/’, after the request began: messageEnvelope is null
** | messageEnvelope is null
22:04:38 Error | The task was canceled
22:04:38 Verbose | Octopus.Server.Orchestration.ServerTasks.Deploy.ForcedGuidedFailureException
| at Octopus.Server.Orchestration.ServerTasks.Deploy.Guidance.HandleInterruption(Exception ex, String actionName, Boolean actionIsRequiredToRun, Maybe1 callbackOnExclude, ITaskLog taskLog, CancellationToken cancellationToken, Boolean wasLastAttempt) in Guidance.cs:line 181 | at Octopus.Server.Orchestration.ServerTasks.Deploy.Guidance.ExecuteWithGuidance(EitherAsyncOrSync callback, String actionName, Boolean actionIsRequiredToRun, Maybe
1 callbackOnExclude, ITaskLog taskLog, CancellationToken cancellationToken) in Guidance.cs:line 111
| at Octopus.Server.Orchestration.ServerTasks.Deploy.Guidance.Execute(EitherAsyncOrSync callback, String actionName, Boolean actionIsRequiredToRun, ITaskLog taskLog, Maybe1 callbackOnExclude, CancellationToken cancellationToken) in Guidance.cs:line 78 | at Octopus.Server.Orchestration.ServerTasks.Deploy.PlannedStepControllers.ProcessStepController.<>c__DisplayClass10_1.<ExecuteActionAndInitLoggingContext in ProcessStepController.cs:line 276 | at Octopus.Server.Orchestration.ServerTasks.Deploy.TransientErrorDetectionExecutor.Execute(Func
2 action, ExecutionPlan plan, ITaskLog taskLog, CancellationToken cancellationToken, DeploymentTarget deploymentTarget) in TransientErrorDetectionExecutor.cs:line 49
| at Octopus.Server.Orchestration.ServerTasks.Deploy.PlannedStepControllers.ProcessStepController.<>c__DisplayClass10_0.<ExecuteActionAndInitLoggingContext in ProcessStepController.cs:line 281
| at Octopus.Server.Infrastructure.Orchestration.UnitsOfWork.UnitOfWorkExecutor.<>c__DisplayClass6_04.<Execute in UnitOfWorkExecutor.cs:line 147 | at Octopus.Core.Infrastructure.UnitsOfWork.UnitOfWorkExtensionMethods.DoAsync(IUnitOfWork unitOfWork, Func
1 action, CancellationToken cancellationToken, String name) in UnitOfWorkExtensionMethods.cs:line 75
| at Octopus.Core.Infrastructure.UnitsOfWork.UnitOfWorkExtensionMethods.DoAsync(IUnitOfWork unitOfWork, Func1 action, CancellationToken cancellationToken, String name) in UnitOfWorkExtensionMethods.cs:line 75 | at Octopus.Server.Infrastructure.Orchestration.UnitsOfWork.UnitOfWorkExecutor.Execute[T1,T2,T3,T4](Func
6 action, CancellationToken cancellationToken, String name) in UnitOfWorkExecutor.cs:line 150
| at Octopus.Server.Orchestration.ServerTasks.Deploy.PlannedStepControllers.ProcessStepController.ExecuteActionAndInitLoggingContext(ExecutionPlan plan, ExecutionPlanner planner, PlannedStep step, DeploymentTarget targetContext, PlannedAction action, ITaskLog taskLogForTarget, ITaskLog taskLogRoot, CancellationToken cancellationToken) in ProcessStepController.cs:line 300
| --Inner Exception–
| The task was canceled
22:04:38 Fatal | The action RestartServer on {}failed
Is there any guidance on how we resolve this as it is blocking our project currently?
I also attempted running the following command from the OD Server on behalf of the deployment target but received the following error:
OpenError: Connecting to remote server servername failed with the following error message : Access is denied.
Invoke-Command -ScriptBlock { Restart-Computer } -ComputerName ServerName
Kind Regards,
Lastbuilders