Logs are flooded with error "28039 Could not connect to %SERVER_NAME%" which mentions non-existing K2 server
kbt164115
PRODUCTIssue
K2 logs are flooded with the following error which mentions non-existing/decomissioned K2 server:Symptoms
In certain scenarios (i.e. migration of an existing K2 installation to the new server, removal of the server node from the farm) your K2 database may contain references to the K2 server node which no longer exists. This floods the K2 host server logs with the error message as K2 constantly tries to connect to the missing server.
Resolution
You need to remove the non-existing server references from the K2 database. As always, before attempting to remove anything be sure to backup your K2 database, then perform the steps described below.
1. Execute stored procedure Server.kClusterDown which removes references to the node from all the relevant tables, i.e.: Server.ProcInst Server.DestQueue Server.Async Server.IPCAsync Server.ClusterMessage
To do that 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 REMOVED FROM YOUR FARM
@ServerDownTimeout = 0
2. Once you executed this stored procedure, remove references to the old server from the following tables:
Server.Server
HostServer.Server
HostServer.LicenseKey -- License can be deleted from K2 Workspace/Management GUI
3. After removing references to the old server from the K2 database, restart the K2 host server service to allow it to re-read changed configurations from the database.
-- The license can be deleted from K2 Workspace/Management GUI
Direct read access or modification of the data in the K2 database is also not supported, unless specifically instructed by K2, except for the ServerLog table where direct read access is supported.
Any modification of the K2 database or content may result in system instability or failure, therefore it is highly recommended to make backups of the K2 database prior to performing any modification, even when instructed to do so by K2.
This database schema reference is provided for informational purposes only. Note that database schemas may change between product versions, so if you have written custom queries against the K2 database, those queries may break between product versions.