You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduced in 2024.2.5864 via this PR, toggled on by default in 2024.3.5805
Latest Version
I could reproduce the problem in the latest build
What happened?
When health checking a target where the machine policy is set to "Only perform connection test (useful for raw scripting)" it fails if bash is not available. This is unexpected as it should not be trying to run any scripts on the target.
This is for a SSH target. I have not checked if it applies to tentacle targets (or whether it should).
Reproduction
Create a VM that does not have bash
Enable SSH to that VM
Configure a machine policy with Only perform connection test (useful for raw scripting)
Create a SSH target for that machine with that machine policy
Perform a health check
Error and Stacktrace
/bin/bash shell missing.
SSH connection disposed.
Exit code: 127
The remote script failed with exit code 127 Octopus.Server.Orchestration.Targets.Tasks.ActionHandlerFailedException: The remote script failed with exit code 127
at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.SuccessArbitrator.ThrowIfNotSuccessful(IActionHandlerResult result) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/ActionDispatch/SuccessArbitrator.cs:line 25
at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.AdHocActionDispatcher.Dispatch(ExecutionsMachine machine, ActionHandlerInvocation actionHandler, ITaskLog taskLog, CancellationToken cancellationToken, VariableCollection variables) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/ActionDispatch/AdHocActionDispatcher.cs:line 80
at Octopus.Server.Orchestration.ServerTasks.HealthCheck.Providers.SshEndpointHealthProvider.ExecutePreCheckScript(Machine machine, TimeSpan cancellationTimeout, CancellationToken cancellationToken) in ./source/Octopus.Server/Orchestration/ServerTasks/HealthCheck/Providers/SshEndpointHealthProvider.cs:line 50
at Octopus.Server.Orchestration.ServerTasks.HealthCheck.Providers.MachineHealthProvider.PerformHealthCheckAndSaveResult(Machine machine, CancellationToken cancellationToken, ExceptionHandling exceptionHandling) in ./source/Octopus.Server/Orchestration/ServerTasks/HealthCheck/Providers/MachineHealthProvider.cs:line 92
Octopus.Server version 2025.1.1477 (2025.1.1477)
Severity
Fails health check for targets without Bash
Version
Introduced in
2024.2.5864
via this PR, toggled on by default in2024.3.5805
Latest Version
I could reproduce the problem in the latest build
What happened?
When health checking a target where the machine policy is set to "Only perform connection test (useful for raw scripting)" it fails if bash is not available. This is unexpected as it should not be trying to run any scripts on the target.
This is for a SSH target. I have not checked if it applies to tentacle targets (or whether it should).
Reproduction
Only perform connection test (useful for raw scripting)
Error and Stacktrace
More Information
Health Check task log
Workaround
None available
The text was updated successfully, but these errors were encountered: