Skip to main content

Received tunnel terminate request from server

ERRO[12:00:00] Received tunnel terminate request from server reason=deleted
FATA[12:00:00] Tunnel was deleted

tuna CLI shows this error while the tunnel is running. After it, the client exits and doesn't reconnect on its own. Tuna Desktop stops the tunnel in this case and shows the reason.

Causeโ€‹

The server closed the tunnel and sent the client the reason in the reason field:

reasonSecond lineWhat happened
deletedTunnel was deletedThe tunnel was deleted in the dashboard, via the API, or together with an app
suspendedTunnel was suspendedThe tunnel was suspended
session_limitSession time limit reachedThe session time allowed by your plan ran out. A minute before that, the client warns: Your session will expire in 1m0s. Please save your work!
reconnectTunnel terminated by serverThe same tunnel connected again over another connection, and the old one was closed
session_endedLogin session was ended, run `tuna login` to sign in againThe login session was ended, see session expired or revoked

With session_limit, the line is logged at WARN rather than ERRO. With session_ended, the client first tries to continue with this device's new session: if you've already signed in again, the tunnel restarts without an error.

What to doโ€‹

  • deleted โ€” if the tunnel was deleted by mistake, start it again. If it runs as a service, the service restarts it on its own.
  • session_limit โ€” start the tunnel again. The session length limit depends on your plan.
  • reconnect โ€” make sure this tunnel isn't running twice, for example as a service and by hand. If there's only one client and the error keeps coming back, update it by following the instructions.
  • session_ended โ€” sign in again with tuna login.