Health check stuck on Octopus 3.14.1

We have a healthcheck stuck for 6+ hours that we caught here now. It seems to be a result of a server that is pegged offline. However, the healthcheck service is unable to be cancelled on the UI of octopus, and it did not also time out on its own.

Can a resolution be configured in our existing version or patched in a newer version for this issue?

“Check Tentacle health
April 4th 2018 09:03:16 Info
Starting health check for deployment targets with policy: Default Machine Policy
April 4th 2018 09:03:17 Info
72 machines will have their health checks taken.
April 4th 2018 15:09:25 Info
Requesting cancellation…”

If you have another way of restarting the tentacle on the target that is failing, that has fixed this problem for me in the past.

Hi John,

Thanks for getting in touch! I’m very sorry for the delay in getting back to you here.

Are you still experiencing this issue?

We have had a small number of reports from older versions of Octopus where a task can occasionally become stuck while cancelling.

The fix for the stuck task generally requires manually updating the SQL entry to force the change in Octopus from Cancelling to Canceled.

If you are still running into this problem, below are the steps you can take to resolve it:

1. Backup Database.

Before you make any Database changes at all, please ensure you have a fresh backup of the Octopus database and your master key.

Documentation for this step.

2. Identify stuck task ID

The first thing you will need to do after you have backed up your Database and master key is to identify the Task-ID of the task. This can be found in the URL of the task itself, for example if you click on the task and look in the URI bar you should see something similar to:

http://octopus_server/app#/tasks/ServerTasks-836

The task ID is the last segment of the URI, so ServerTasks-836 in my test case.

3. Query the task in SQL

With the Task-ID identified, we can then perform an SQL query to identify that we have the correct task before we make any changes. Run the following query against your Octopus database:

SELECT * 
FROM [OctopusDeploy].[dbo].[ServerTask] 
WHERE Id = 'ServerTasks-836'

Confirm that the task we are querying is correct before we edit it. (The state should be Cancelling.)

3. Update the task in SQL

Once you have performed the above steps and confirmed that you have the correct task, the next step is to manually update the task’s state to Canceled by running the following:

UPDATE [OctopusDeploy].[dbo].[ServerTask] 
SET [State] = 'Canceled' 
WHERE Id = 'ServerTasks-836'

Done! When you return to the Octopus portal the previously stuck task should now be Canceled.

Let me know if this helps or if you have any questions at all here. And again, sorry for the delay in getting back to you.

Best regards,
Daniel

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.