Receiving a timeout on 'Run script' step in runbook

I’ve created a runbook with just one step, which runs the following powershell script:

Write-Host "Starting install process"

When I run the runbook - I choose the environment - and in preview, I can see the deployment target is healthy.

But the script times out:

The step failed: Activity Run a script on failed with error ‘A request was sent to a polling endpoint, but the polling endpoint did not collect the request within the allowed time (00:02:00), so the request timed out. Server exception: System.TimeoutException: A request was sent to a polling endpoint, but the polling endpoint did not collect the request within the allowed time (00:02:00), so the request timed out.’.

The deployment target is still showing as healthy - and other deployments are working. Only the runbook with a ‘run script’ step is what failed (and its just a ‘write-host’, so it doesn’t make sense for it to timeout)

Any ideas?

Hi @ali.akhtar!

Sorry to hear that you are having issues with your deployment target. Generally with this sort of error, it does indicate a network connectivity issues with your polling tentacle reaching the Octopus server.

By default health checks on targets only run once per day, and it if was online when it last ran, then it would show as online, even if it is currently offline. You do have a couple of options to verify this:

  1. You can navigate to Infrastructure → Deployment targets → Your target → Connectivity and click on the “Check Health” button to perform a health check to verify that it’s online.
  2. You can adjust your Machine Policies to reduce the interval between the scheduled health checks.

In the event that it is failing to successfully health check, the first place I would suggest looking is on the machine itself, verifying that the Tentacle service is running. Assuming it is, checking the log file (C:\Octopus\Logs\OctopusTentacle.txt by default) may shed some light into why it isn’t connecting. Usually this is something like a firewall blocking outbound traffic on tcp/10943, or sometimes it’s a trust error with the certificate thumbprints.

If you find any further information that you would like assistance interpreting, please don’t hesitate to let me know!