| Description | This article describes how to solve database replication issues in the secondary node of an HA cluster. |
| Scope | FortiNAC (FortiNAC-OS) version 7.2.6 and above, and FortiNAC (CentOS). |
|
FortiNAC v7.2.6 and above: Step 1. Check the status of the database replication in the Process Manager logs from the CLI of the secondary node:
diagnose tail -F output.processManager
The logs show that the replication is failing.
Step 2. To clear the condition, initialize the FortiNAC database on the secondary node.
Important: This step should only be executed on the secondary node. All data written to the database will be erased.
From the CLI of the secondary node, run the following command:
execute sql initialize
Note: In previous versions of FortiNAC up to v7.2.5, a different command format, 'execute sql repair' is present. However, it does not work as expected and should not be used.
Step 3. Monitor Replication progress on Secondary:
The progress and the result can be checked using the same log file:
diagnose tail -F output.processManager
:: #1 :: Database replication starting :: #1 :: Database replication finished: SUCCESS ... :: #1 :: fnacf-sec(Secondary) Primary In Control Idle(false) Max Memory (KBytes) 699,392 Free Memory (KBytes) 680,084 Threads: 3 Up Time: 1 Day 22 Hours 59 Minutes 22 Seconds Time Zone: EDT (UTC-0400)
Note: The old command 'hsIsSlaveActive' is not fully supported in all versions. Database synchronization can be checked as shown above or by reviewing the Events in the Administration GUI: Confirm Database Replication
Step 4 (optional). Reconfigure High Availability (HA) from the Primary FortiNAC GUI.
If replication still fails, reapply HA settings via the GUI under System -> Settings -> System Management -> High Availability -> Save Settings. This ensures consistent 'bsiadmin' credentials and permissions between nodes.
FortiNAC v9.x (CentOS). Verify that the SQL service is running:
systemctl status mysqld
Issue the following commands in order on the secondary FortiNAC to reinitialize the database:
After, open the Primary FortiNAC, go to High Availability settings, and select the 'Save' button to re-apply the High Availability configuration.
Related article: |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.