Skip to content

Form a pair Since v0.1 ​

You start the pair on a running node, which becomes the active node. You then join the second node while it is stopped. It starts as the standby, copies the active node's data and follows every change.

Before you begin ​

  • Role: admin. Run the commands on the nodes.
  • Both nodes run the same software version.
  • The peer link port, for example 9444, is reachable between the two nodes only. Firewall it from everything else. Replicated data includes password hashes and private keys.
  • Give each node one peer address per independent network path, for example a dedicated cable and the management network. A peer counts as lost only when no path answers for 1 second.

Create the pair ​

On the first node, running:

text
1. Open System > High availability. A standalone node shows how to start a pair.
2. Run the shown waap ha init command on the node.
3. Fill in Pair settings if you use a virtual address (optional now).
sh
waap ha init -listen 10.0.0.1:9444 -address 10.0.0.1:9444,192.168.50.1:9444

The command prints a join token, valid for 1 hour and one use. This node is the active node.

Join the second node ​

On the second node, stopped:

sh
waap ha join -data-dir /var/lib/waap -node-id waap-b -listen 10.0.0.2:9444 -address 10.0.0.2:9444,192.168.50.2:9444 TOKEN

Add -replace if the node has a database to move aside. Start the node with the same -data-dir and -node-id. It starts as the standby.

Check the pair ​

text
1. Open System > High availability.
2. Check that both nodes show a role, healthy, and In sync.
sh
waap ha status

waap ha status shows the roles, the term, the peer and each link, the peer's last heartbeat (software and configuration version), and whether the nodes are in sync.

Replace a failed node ​

On the surviving node, create a new token, then join the new node with the same node ID.

text
1. On the active node, open System > High availability.
2. Select Create join token and copy the token.
sh
waap ha token

Then run waap ha join ... on the new node with the same -node-id.

Leave a pair ​

sh
waap ha leave

The node becomes standalone and keeps its data. Its pair settings move to DATA-DIR/ha.left-TIME.

Settings reference ​

waap ha init ​

FlagWhat it doesDefaultAllowed valuesApplies in
-listenPeer link listener on this node.none (required)host:portrunning node
-addressWhere the other node reaches this one, one per network path.none (required)up to 4 host:port, comma-separatedrunning node

waap ha join ​

FlagWhat it doesDefaultAllowed valuesApplies in
TOKENThe join token.none (required)tokenstopped node
-data-dirThis node's data directory.datapathstopped node
-node-idThis node's ID. Run it with the same -node-id.the host's defaultnode IDstopped node
-listenPeer link listener.none (required)host:portstopped node
-addressWhere the other node reaches this one.none (required)host:port, comma-separatedstopped node
-replaceMoves an existing database aside instead of refusing.offflagstopped node

Limits ​

LimitValue
Nodes in a pair2
Peer addresses per node4
Join token1 hour, one use; failed joins limited to 10 a minute and audited
Peer linkmutual TLS 1.3, pair's own CA

Troubleshooting ​

ha join refuses: the node has a database ​

  • Cause: the node's data will come from the active node, so an existing database is not kept silently.
  • Fix: add -replace. The old database is moved aside as waap.db.replaced-TIME.

The standby shows not in sync ​

  • Cause: a difference in configuration, files, country database or replication position lasted more than 10 seconds.
  • Check: waap ha status lists what differs. The audit log has ha.drift.
  • Fix: wait for catching up, update the country database on both nodes, or check the peer link.