Sessionright

NetScaler® HA Sync Failed: Troubleshooting Failover, Heartbeats and Sync

By Jay H.Published Updated 10 min read

Jay H. · Founder, Sessionright
Founder of Sessionright. Twenty years running Citrix, NetScaler, Citrix Cloud, NetScaler Console, Azure and Azure Virtual Desktop estates; writes the guides and reviews the platform's rules.

Stuck on this, or facing a patch deadline? Talk it through with a Sessionright engineer: 15 minutes, free.

NetScaler's troubleshooting page for high availability, last published 29 October 2026, gives three causes for an HA pair that cannot synchronise its configuration: a firewall blocking the sync port, synchronisation disabled by an administrator, and different releases or builds on the two nodes. It also covers both nodes claiming primary, a forced failover that refuses to run, and a new primary that receives no traffic.

By the end of this guide you will know why a pair failed over, how to force a failover without losing sessions, how to clear a failed sync, and when a cluster fits better than an HA pair. Every command comes from the NetScaler documentation, linked where it is used.

How NetScaler HA decides to fail over

The secondary watches the primary through heartbeats and takes over when they stop. Clients must then reconnect, although synchronised persistence sessions are kept (HA overview).

The heartbeat

The hello interval is how often heartbeats are sent. The dead interval is how long a node waits before marking its peer DOWN, and it must be a multiple of the hello interval (communication intervals). Heartbeats go out on every enabled interface, regardless of the HA MON setting. If NSVLAN or a SYNC VLAN is configured, they flow only through enabled interfaces in those VLANs. Missing heartbeats on an enabled interface raise critical SNMP alerts, so turn them off on interfaces that do not face the peer with set interface <ID> -HAHeartBeat OFF or set channel <ID> -HAHeartBeat OFF (heartbeat messages).

What triggers a failover

The causes of failover page lists these events:

Event Detail
Heartbeat loss The secondary hears nothing from the primary for longer than its dead interval.
Primary hears nothing The primary receives no heartbeats on any interface for three seconds.
SSL card failure Hardware failure of the primary's SSL card.
Critical interface down An HA MON interface that is not in a Failover Interface Set (FIS) or LA channel goes DOWN.
FIS or channel down All interfaces in an FIS fail, or an LA channel with HA MON fails.
All interfaces down or disabled Failover happens regardless of HA MON.
Route monitor DOWN A route monitor bound to the primary goes DOWN.
Manual Someone runs force HA failover on either node.

"Fail" means an enabled interface went DOWN (LINK DOWN or TXSTALL in show interface). Two settings cut unwanted failovers. Turn HA MON off on unused interfaces with set interface 1/3 -haMonitor OFF (configuring HA). Group redundant links with add fis fis1 and bind fis fis1 1/3 1/5 so one failed link does not trigger failover (FIS).

If route monitors fail on both nodes in non-INC mode, the pair fails over every 180 seconds until one node reaches all monitored routes. Cap that with set HA node -maxFlips <n> -maxFlipTime <secs> on each node; the setting is neither propagated nor synchronised (limiting failovers).

Read show ha node first

The fields that matter in the documented sample output are Node State, Master State, Sync State (ENABLED on the primary, SUCCESS on a healthy secondary), Propagation, Interfaces on which heartbeats are not seen and Interfaces causing Partial Failure.

Forcing a failover safely

The NetScaler failover command in the CLI is force HA failover. You can run it on either node, and in the GUI it is System > High Availability > Nodes > Action > Force Failover (forcing a failover).

  1. Run show ha node on both nodes. Both must be UP, the peer state known, and neither set to STAYSECONDARY or STAYPRIMARY (HA FAQ).
  2. Check that no sync is running. Forcing a failover during an HA sync can lose active data sessions.
  3. Run save ns config on the primary.
  4. Run force HA failover. The appliance shows a warning and asks for confirmation if it detects a potential issue.
  5. Run show ha node again to confirm the roles swapped and check the sync status. A forced failover is itself neither propagated nor synchronised.

The error text tells you what blocked it:

Error Meaning
Operation not possible due to invalid peer state. Rectify and retry. Run on the primary while the secondary is DOWN.
Operation not possible now. Please wait for the system to stabilize before retrying. The secondary is claiming or inactive.
Operation not possible as my state is invalid. View the node for more information. Run on a secondary that cannot become primary or is set to STAYSECONDARY.

If the new primary receives no traffic after a failover, the upstream router probably does not accept NetScaler's gratuitous ARP. The documented fix is a virtual MAC (troubleshooting).

Fixing "sync failed" and propagation failures

Synchronisation copies the primary's configuration to the secondary when the secondary restarts, when the primary becomes secondary after a failover, and when the incarnation numbers the two nodes exchange in heartbeats do not match (HA FAQ). Propagation is separate: each primary command runs on the secondary first, and if it fails there the primary still runs it and logs an error (propagation).

  1. Check the ports. The FAQ lists UDP 3003 for heartbeats and TCP 3008 or 3010 for sync and propagation. The troubleshooting page also names port 3011 (3009 for secure propagation) for propagation, so allow all of them between the two NSIPs. HA sync and node-to-node traffic always use the NSIP, whatever VLAN you configure (SYNC VLAN).

  2. Check that nobody disabled it. set HA node settings are per node, so run these on the node with the problem:

    set HA node -haSync ENABLED
    set HA node -haProp ENABLED
    

    After re-enabling propagation, force a sync (sync).

  3. Check versions. Different releases or builds stop sync and propagation. See the next section.

  4. Check pairing basics. The troubleshooting page lists unique NSIPs, a peer node ID of 1–64, matching RPC node passwords, a matching default administrator password and an enabled remote node.

  5. Force the sync.

    force HA sync
    show ha node
    

    It fails if a sync is already running, the secondary is disabled or has sync disabled, or you run it from a primary with propagation disabled.

  6. Sync the files. Configuration files are copied every minute, but certificates or scripts imported outside the GUI or CLI must exist on both nodes (points to consider). Push them with sync HA files ssl, sync HA files all or sync HA files all_plus_misc, which adds licences and rc.conf (file sync).

Two documented behaviours catch people out. A sync makes the secondary run clear ns config and reload the primary's config, but the secondary's default static route survives; if it points at the wrong gateway, services can go down. And configuration added on the secondary is never synced back to the primary. Interface, channel and node-specific HA commands are never synced at all. In INC mode, SNIPs, VLANs, routes, route monitors and net profiles stay per node too (HA FAQ).

Version mismatch during upgrades

Both nodes in an HA pair must run the same NetScaler version (points to consider). During an upgrade they briefly do not. The node on the higher version goes into listen mode, where neither propagation nor sync works (forcing a failover).

The HA pair upgrade page is more precise: between builds of the same release, config sync, command propagation, state-service sync, connection mirroring and persistence-session sync are disabled only if the internal HA versions differ. show ha node then shows Sync State: AUTO DISABLED and Propagation: AUTO DISABLED. The page lists the builds where the internal HA version changed:

Release Builds that changed the internal HA version
14.1 4.42, 8.50, 12.30, 17.38, 21.57, 25.56, 29.72, 34.42, 38.53, 43.50
13.1 4.44, 9.60, 12.51, 17.42, 21.50, 24.38, 27.59, 30.52, 33.54, 37.38, 45.64, 48.47, 49.15, 50.23, 51.15, 53.24, 54.29, 57.26

If your source and target builds fall either side of one of these, expect AUTO DISABLED, and expect all connections to be re-established when you fail over to the upgraded node. Make no config changes until both nodes match. sync HA files all still works across versions. In Service Software Upgrade avoids the connection loss; see NetScaler ISSU explained. The full runbook is in how to upgrade a NetScaler HA pair, and the upgrade errors guide covers failures during the install itself.

Fail-safe, STAYPRIMARY and STAYSECONDARY

These settings are per node.

Setting Command Effect
Fail-safe set ha node -failsafe ON If both nodes fail the health check, the last primary stays primary instead of both going secondary (fail-safe).
Stay secondary set ha node -hastatus STAYSECONDARY The node stays secondary even if the primary goes down and takes no part in HA state transitions (stay secondary).
Stay primary set ha node -hastatus STAYPRIMARY A healthy primary stays primary (stay primary).
Disabled set ha node -hastatus DISABLED Only a secondary can be disabled; it stops sending heartbeats (configuring HA).

STAYSECONDARY suits work on the primary where a brief outage must not trigger a takeover. Set it back with set ha node -hastatus ENABLED when you finish, because a node left in STAYSECONDARY makes force HA failover fail and leaves you without automatic failover. With fail-safe on, a STAYSECONDARY secondary also means the primary stays primary even when it fails.

Two more options harden the pair. Secure HA heartbeats add a pre-shared key of 8–15 characters with set HA secureheartbeats -state ENABLED -haPSK <key>. Enable it on the primary first and disable it on the secondary first. A mismatched PSK can produce a dual-primary state (secure heartbeats). A SYNC VLAN, set with set ha node -syncvlan <VLANID>, moves HA traffic off the management VLANs. It is L2 only and must not include management interfaces such as 0/1 (SYNC VLAN).

NetScaler HA vs cluster

HA pair Cluster
Nodes Two, same model (points to consider) 1 to 32 nCore appliances (clustering)
Traffic Primary handles traffic, secondary monitors Distributed across nodes for throughput and scale
Migration Not applicable Adding a node clears its config; standalone or HA config cannot be migrated directly (cluster FAQ)

Clustering needs an Advanced or Premium licence. On 14.1, Gateway ICA Proxy is supported cluster-wide, but full SSL VPN and clientless VPN are node-level only (cluster features). For a Citrix® Gateway that runs full VPN, that makes an HA pair the simpler fit. A cluster makes sense when one appliance's throughput is the limit and your features are supported cluster-wide.

FAQ

What is the NetScaler failover command in the CLI?

force HA failover, on either node. Check show ha node first and let any running sync finish.

What ports does NetScaler HA use?

UDP 3003 for heartbeats and TCP 3008 or 3010 for sync and propagation, per the NetScaler HA FAQ. The troubleshooting page also names 3011 and 3009 for propagation.

Why do both NetScaler nodes show as primary?

Usually both nodes are healthy but heartbeats are not getting through. Check UDP 3003 between them and, with secure heartbeats, that the PSKs match.

Does a NetScaler HA pair fail back automatically?

No. Once the secondary takes over, it stays primary even when the original primary comes back. Run force HA failover to swap roles.

Is configuration added on the secondary synced to the primary?

No. Sync only flows from primary to secondary, so make changes on the primary.

Want a second pair of eyes?

If show ha node says AUTO DISABLED, your nodes are on builds with different internal HA versions. Paste show ns version from both nodes into the free NetScaler build and CVE checker, which maps each build to the bulletins and fixed builds in your browser and scans nothing. To run the HA upgrade as a repeatable workflow, Sessionright's Nightpatch runs it as plan, approve, execute with HA awareness. It is read-only by default, and every change is approved and logged. If you would rather talk it through, book a 15-minute call: no install, no sales deck.

Sources

Check your build before the next bulletin

Paste a NetScaler build or your show ns version output into the free checker to see the CVEs that affect it, their CISA KEV status and the fixed build for your release. It runs in your browser and never touches the appliance.

Not ready for that? Talk to a Sessionright engineer: 15 minutes, free, and you leave with a next step.

Or get the next guide by email. One email per new guide, no marketing list.

New Sessionright guides by email. No marketing drip; unsubscribe in one click.

Related guides

Citrix and NetScaler are trademarks of Citrix Systems, Inc. and/or its affiliates. Azure is a trademark of the Microsoft group of companies. Sessionright is not affiliated with or endorsed by Cloud Software Group, Citrix or Microsoft.