Connection lost, reconnecting
WARN[12:00:00] Connection lost, reconnecting: https://myapp.a.2na.am
INFO[12:00:01] Attempting reconnect: https://myapp.a.2na.am
INFO[12:00:02] Connection restored: https://myapp.a.2na.am -> http://127.0.0.1:3000
These lines appear in the tuna CLI log; in the terminal UI, the tunnel status changes to reconnecting. The client doesn't exit: it reconnects on its own, and the pause between attempts grows up to 15 seconds. If the tunnel isn't up within 30 seconds, the client logs one more line and starts connecting from scratch:
ERRO[12:00:30] Timed out, retrying in 1s
Causeโ
The client lost its connection to a Tuna node or couldn't get connection settings. Most often it's the network: a Wi-Fi switch, a laptop going to sleep, a VPN, a firewall, IPv6 issues. Less often it's the server: a node is restarting or overloaded, as with Server is busy and Node not found.
The regular log doesn't show the underlying cause. Run with --log-level=debug to see it: the error field of the Reconnect attempt details line contains the original error.
What to doโ
If the connection came back (Connection restored), do nothing: this is a routine drop. The tunnel keeps its address after reconnecting.
If the client keeps reconnecting in a loop:
- Run
tuna diagnose: self-diagnosis shows whether the client can reach the API and the nodes. - On a corporate network, allow Tuna's addresses in the firewall using the list.
- If the host has IPv6, try
TUNA_FORCE_IPV4=1โ see Tunnel fails to connect because of IPv6. - Update the client to the latest version by following the instructions.
- Start the tunnel with
--log-level=debugand check theerrorfield: if it holds an error from the catalog, follow that error's page.