Possiblities for setting up failover for KCM
Issue
Is it possible to set up failover for KCM (where a second machine takes over when the main machine is unavailable)?
Solution
Database cluster for the KCM Repository database
From the viewpoint of KCM , KCM Repository connects to an ODBC data source. This means that any replication, mirroring, clustering etc on the database side, is not relevant for KCM. This is handled by the database server. You can use SQL Server clustering to make the database highly available. This is not discussed in the Technical Specifications document, because this is irrelevant for KCM. KCM requires an exclusive database per instance. Two KCM instances cannot use the same database. This may lead to irreparable damage to the integrity of the database.
Failover
KCM offers various tools for synchronizing the content and configuration of two KCM instances. These tools can be used to keep a second KCM instance in sync, which can be used as a failover machine. See the article Synchronise the configuration and content of two KCM installations for more information on how to keep two instances synchronised.
Two different methods are described. The first method assumes the database of the main instance is replicated to a backup database. On failover, the second instance is started and will use the replicated database.
The second method assumes the content is synchronised using the export/import tools for content which are part of KCM. This has the advantage that the second instance can be running at all time and a failover switch will be instantly.
A) Replicated database (Stopped second instance)
When the failover KCM instance is stopped, it is possible to replicate the main database to a backup database that will be used by this failover instance. Use the native tools of the database server to replicate the main KCM Repository database to a backup KCM Repository database.
All KCM services on the second server must be stopped. After KCM has been installed on the failover server, use StopInstance.exe and StopContractManager.exe to stop all services. These programs are described in the installation guide.
Periodically synchronise the KCM Instance configuration and Contract Manager configuration using the available command line tools. For more information see the article Synchronise the configuration and content of two KCM installations. Slightly different steps are required for synchronizing the contract manager configuration.
For Export/ImportContractManagerConfiguration.exe, it is important to include the Export/ImportInfrastructure=True parameter. This ensures the contract with contract types is included in the export. An import with Contract Manager configuration with infrastructure information, can only succeed if the contracts in the import do not exist yet. Before the import, any existing contracts must be removed using ManageCM.exe. For example if the default contract CCM,Local is used:
ManageCM.exe /RemoveContract /Partner=CCM /Customer=Local
On failover, first the Contract Manager must be started using StartContractManager.exe. Secondly SetInstanceDatabase.exe must be used for configuring the connection string of the replicated database. Thirdly the instance can be started using StartInstance.exe.
To summarize:
- After installation
- Stop the Contract Manager and instance using StopContractManager.exe and StopInstance.exe.
- Periodic synchronization
- Use the native tools of the database server to keep the backup database in sync.
- Synchronise the instance configuration and contract manager configuration as described in Synchronise the configuration and content of two KCM installations.
- For synchronising the Contract Manager configuration:
- Use ExportInfrastructure=true, ImportInfrastructure=true for exporting and importing the Contract Manager configuration.
- Before the import of the contract manager configuration, remove any contracts using ManageCm.exe /RemoveContract
- On failover
- First run StartContractManager.exe.
- Secondly run SetInstanceDatabase.exe to configure the connection string to the replicated database.
- Thirdly run startinstance.exe for starting the database.
B) Content is synchronised using the KCM CLI tools (Running second instance)
When the failover KCM installation is running, the content of Repository Server (Designer projects) can be synchronised using either command line tools or Core scripting commands. These options are described in the Synchronise the configuration and content of two KCM installations knowledge base article.
All KCM services on the failover server must be running. After KCM has been installed on the failover server, do not stop the services or the server. Content can only be transferred if KCM is running.
Periodically synchronise the KCM Instance configuration, Contract Manager configuration and Content of Repository server (Designer projects) using the available command line tools. For more information see the article Synchronise the configuration and content of two KCM installations.
To summarize:
- After installation
- Keep the services and the server running.
- Periodic synchronization
- Synchronise the content using either the command line applications or Core Scripting commands as described in the article Synchronise the configuration and content of two KCM installations.
- Synchronise the instance configuration and contract manager configuration as described in Synchronise the configuration and content of two KCM installations.
- On failover
- No extra steps are required. KCM is already running.
Level of Complexity
High
Applies to
Product | Version | Build | Environment | Hardware |
---|---|---|---|---|
Kofax Communications Manager | 5.5 and later | n/a | n/a | n/a |