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.

3 Comments

  • Mykhailo says:

    What i should do if i have 3 app servers in farm and i need to remove 1 of them?

    • Mikhail says:

      Process is the same respectively of number of servers in your farm, you just stop K2 service on a server to be decommissioned/removed and then use stored procedure with correct server ID, once this stored procedure is executed you should make sure that K2 is removed from that server or server itself is removed to avoid starting K2 services on it by mistake afterwards.

      • Siva says:

        HI Mike,

        We have 5 nodes for workflow and 3 for smartforms .We uninstalled 1 workflow node from farm and deleted the entries in db. But still when we browse runtime its pointing to the workflow node which is already removed.

        Would you please provide the steps or some suggesstion to be done after uninstalling the server.

Leave a Reply

Your email address will not be published. Required fields are marked *