Tag Archives: node removal

Removing K2 node from K2 farm

Just a quick note on removal of a node(s) from K2 servers farm. When you run K2 uninstall on one of the nodes, and obviously when you suddenly lose one of your nodes (server failure without ability to restore it), information about it still stored in K2 database and additional steps are required in that scenario.

To reiterate, just running K2 uninstall on the node does not remove references to the node from K2 database.

To clear that up there is a stored procedure Server.kClusterDown which removes references to the node you removing from all the relevant tables:

Server.ProcInst
Server.DestQueue
Server.Async
Server.IPCAsync
Server.ClusterMessage

It sets Running=0 for node you want to remove in Server.Server table, and then updates all references to the server ID of the server you want to delete with ID of server which you keep.

You run this stored procedure specifying IDs (note: IDs not sever names) from Server.Server table as a parameters:

@ServerID = NEW SERVERID / ID OF THE SERVER WHICH STAYS IN YOUR FARM
@ClusterServerID = OLD SERVERID / ID OF THE SERVER WHICH YOU REMOVE FROM YOUR FARM
@ServerDownTimeout = 0

As usual before attempting any direct modifications on K2 system database you should back it up beforehand.