Runbook: Mesh Peer Stuck in CONNECTING

Last updated 3 min read
Report issue

Runbook: Mesh Peer Stuck in CONNECTING#

When you see: a gmesh peer in PEER_STATUS_CONNECTING for more than 5 minutes, with the mesh watchdog logging "manual intervention may be required."

Severity: SEV-3 (one peer pair affected) or SEV-2 (many peers, fleet-wide mesh degradation).

Symptoms#

  • The panel's mesh view (Mesh -> your network -> Topology) shows a peer with status=PEER_STATUS_CONNECTING and since >5 minutes
  • mesh_watchdog log lines every 60 seconds: update_peer requested for stuck peer X
  • Apps in the affected scopes can't reach each other across the mesh

Diagnose#

Step 1 — Confirm the peer state#

In the panel, open Mesh -> your network -> Topology and look for a peer sitting in CONNECTING. The same roster is scriptable:

BASH
curl -s https://api.gritiva.com/api/v1/mesh/peers/all -H "X-API-Key: $GRITIVA_API_KEY"
# look for status=CONNECTING with since > 5min

Step 2 — Identify which side is broken#

The peer is (scope_id_A, scope_id_B). Open a shell on each VM (panel -> VMs -> Web terminal, or SSH) and check both:

BASH
# On VM hosting scope A:
sudo ip netns list                            # find the scope's namespace
sudo ip netns exec <netns-a> ip link show wg-gmesh
# expect: <BROADCAST,MULTICAST,UP,LOWER_UP> ... wg-gmesh
# if "Device 'wg-gmesh' does not exist" — THAT side is broken

# Same on VM hosting scope B
ssh <other-vm>
sudo ip netns exec <netns-b> ip link show wg-gmesh

The most common cause (per the 2026-05-14 postmortem for related issues): one scope is missing its wg-gmesh interface inside its netns. The peer roster is correct, but the local kernel state isn't.

Step 3 — Check WireGuard handshake state#

BASH
sudo ip netns exec <netns> wg show wg-gmesh latest-handshakes
# look for the peer's pubkey + a recent timestamp
# if "0" or "1970…" — no handshake has happened

Mitigate#

Force-reconnect the affected peer from the panel: open Mesh -> your network -> Peers, remove the stuck peer, then add it back. The control plane re-issues the peer entry and the agent re-installs the WireGuard config on both sides.

Confirm it took:

BASH
curl -s https://api.gritiva.com/api/v1/mesh/networks/<network_id>/topology -H "X-API-Key: $GRITIVA_API_KEY"

If the issue persists after re-adding the peer, restart the scope itself from Scopes -> in the panel. This is more invasive — it tears down ALL peer connections for that scope and re-establishes them on start. Brief mesh outage for the scope (~10s).

Fix (durable)#

If you find that scopes 114 / 115 (or similar) keep showing this — they may be mesh-broken at the scope level (the scope's netns doesn't have a wg-gmesh interface to attach peers to). This was the cause of the 2026-05-14 5-day-stuck-peer issue. The scope needs a fresh netns:

  1. Remove the peer entry in Mesh -> your network -> Peers.
  2. Delete the scope in Scopes -> -> Delete (API: DELETE /api/v1/scopes/{id}).
  3. Re-create it in Scopes -> New scope with the same CPU/memory limits (API: POST /api/v1/scopes) — this gives it a fresh netns.
  4. Re-add the mesh peer in Mesh -> your network -> Peers.

Action items still open#

The mesh_watchdog should auto-detect "remote scope has no wg-gmesh interface" and disconnect the peer automatically instead of just logging "manual intervention may be required." Tracked internally — ask our contact form for status.