Token limit reached: active tunnels
FATA[12:00:00] Failed to get connection settings: Token limit reached: active tunnels
Code: BadRequest
Request ID: 7a2e9c05f4b1d863e0a7c2f95b4d1e38
Variants of the message:
Token limit reached: created tunnels
TCP tunnels are not allowed for this token
HTTP tunnels are not allowed for this token
tuna CLI and Tuna Desktop show this error when you start a tunnel. The client doesn't reconnect and exits right away.
Causeโ
The tunnel was started with an API key that got restrictions when it was created. These are limits of the key, not of your plan:
Token limit reached: active tunnelsmeans the key is already running as many tunnels at once as it's allowed;Token limit reached: created tunnelsmeans the key has already created as many tunnels as it's allowed over its lifetime. Stopping tunnels doesn't decrease this counter;TCP tunnels are not allowed for this tokenandHTTP tunnels are not allowed for this tokenmean the key isn't allowed to start this type of tunnel.
Such restrictions apply to API keys created with limits, temporal tokens from Terraform, background service keys, and Kubernetes operator tokens. A service key and an operator token start tunnels of one type only: HTTP or TCP.
What to doโ
- Check which key started the tunnel: the
--api-keyflag, theTUNA_API_KEYvariable, or a key saved withtuna login --with-api-key. - For
active tunnels, stop the tunnels started with this key. The list of active tunnels is in the dashboard. - For
created tunnels, issue a new key: the counter of created tunnels doesn't reset. - For a blocked protocol, start the tunnel with a key that allows this type, or issue a new key. For a background service of a different type, create a separate service.