How can I fix the "All Octopus Server nodes in this cluster are draining tasks?"

After an upgrade or a move, the Octopus Server is reporting “All Octopus Server nodes in this cluster are draining tasks.” How can I fix this?

Each node is an instance of the Octopus Deploy Server windows service connected to the database. While it is unusual to see all nodes in this cluster are draining tasks after an upgrade is isn’t unheard of.

The nodes are managed by going to configuration -> nodes.

Please note, if you see more than one node in this list then your license needs to support HA. If your license doesn’t support HA, then you will see some strange errors. To determine if your license supports HA, you can go to configuration -> license and look at the node limit. If that node limit doesn’t appear then you can assume you can only have 1 node.

Clicking on the ... next to the node will give you a list of options. If you need to delete a node, because you moved the Octopus Server over to a new VM and the old node still appears then you can delete it here. To disable the drain nodes option then select Disable Node Drain.

In some cases, when you go to the nodes screen you won’t see any nodes listed. This typically happens on licenses limited to one node and after the Octopus Deploy instance is moved to an older VM.

In that case you will want to do the following:

  1. Stop the Octopus Deploy windows service. Ensure all instances are stopped on all VMs if you moved servers.
  2. Run the following query on the OctopusDeploy database
Delete from OctopusServerNodeStatus
Go
Delete from OctopusServerNode
Go
  1. Start the Octopus Deploy windows service on the VM you want the server to run on.

This will reset the node table and should get you up and running again.

1 Like