Collecting information for HA issues
Description
This article describes the debugs that should be collected when troubleshooting HA issues.
Scope
FortiGate.
Solution
Â
The output of the following debug commands should be collected for any HA-related issues:
diagnose debug enable
diagnose debug console timestamp enable
diagnose debug application hatalk -1Â
diagnose debug application hasync -1Â Â
execute ha synchronize start     Explanation of commands:
HA formation issues:
diagnose debug application hatalk -1
HA Sync issues:
diagnose debug application hasync -1
Start HA Sync:
execute ha synchronize start
To disable debug:
diagnose debug disableÂ
The HA framework consists of two daemons: hatalk and hasync. The 'hatalk' process monitors cluster management and failure monitoring. The 'hasync' process handles the synchronization of configuration files, the upgrade process, IKE notifications, external files, the ARP table, and the forwarding information base (FIB).Â
Â
If no output is generated in the hasync or hatalk debugs, restarting the daemons may be necessary. This can be done by running the following commands on each unit.
Â
To determine the process IDs running for hasync and hatalk:
diagnose sys process pidof hasync
diagnose sys process pidof hatalkTo restart the process:
 diagnose system kill 11 <process_id>Alternatively, to kill all simultaneously running HA processes, execute the following with super admin rights:
fnsysctl killall hatalk
fnsysctl killall hasyncRun the following on both Primary/Secondary units and collect the info:
get system performance status
get system status
get system ha status
diagnose sys ha status
diagnose sys ha history read
diagnose debug crashlog read
diagnose sys ha checksum show
diagnose sys ha dump 5diagnose sys ha dump-by groupÂ
execute ha synchronize stop  Â
execute ha synchronize start
diagnose sys ha checksum recalculate To access the secondary device in the CLI, run the following:
execute ha manage <Index-ID> <Admin-Username>See this article for more information:
Technical Tip: How to access the secondary unit from the primary with the 'execute ha manage' command
Â
Packet captures for seeing communication between HA ports:
diagnose hardware device nic <heartbeat interface>
diagnose sniffer packet port_ha "" 4 0 l  Â
To capture only the heartbeat packets:
diagnose sniffer packet any 'ether proto 0x8890' 4 0 lÂ
There are three EtherType configurations in HA:
ha-eth-type: 8890 - Standard NAT/Route mode heartbeat.
hc-eth-type: 8892 -Â Transparent mode heartbeat or session sync.
l2ep-eth-type: 8893 -Â HA configuration synchronization (Layer 2 Endpoint).
Â
Configuration parameters can be verified with the following commands:
get system ha
show full sys ha | grep -f ethCollect the FortiGate's HA and System Event logs for both units downloaded from the GUI/FortiAnalyzer or syslog (remote) server.
Additional note : in rare instances where debug does not stop despite disabling debug. It may be necessary to stop the debug loop by killing all simultaneously running HA processes, execute the following with super admin rights:
fnsysctl killall hatalk
fnsysctl killall hasync Related articles:
