Join Token Authentication Failure in Teleport Node Agent
0 reputation · 20 May 2025, 07:42 UTC
0 reputation · 20 May 2025, 07:42 UTC
When deploying a Teleport Node agent, the service may fail to establish a connection with the Auth Server during the initial join process. While the agent logs indicate repeated connection attempts and authentication errors, the specific cause of the failure is often ambiguous when viewing only the agent-side logs.
The primary constraint is that the agent's stderr output frequently presents the same symptoms—reconnection loops—regardless of whether the Auth Server is unreachable due to network constraints or if the join token provided is invalid or mismatched with the Auth Server's configuration.
To resolve the deployment failure, it is necessary to determine if the issue resides in the network path or the authentication credentials. This requires correlating the agent's logs with the Auth Server's process logs and audit events.
The agent’s log output can tell you whether the failure happened before any authentication exchange (network problem) or after a successful TLS handshake (token problem).
If the agent cannot reach the Auth/Proxy join endpoint, it logs connection‑level errors such as timeouts or refused connections. If the connection succeeds but the join token is invalid, expired, or lacks the Node role, the agent logs an authentication‑related gRPC error after the TLS handshake.
teleport start -d) and reproduce the join attempt.context deadline exceeded, i/o timeout, connection refused, or TLS handshake timeout before any line mentioning "join" or "auth", the problem is network‑level.handshake complete) followed by an error containing Unauthenticated, PermissionDenied, bad token, or token expired, the problem is the join token.Query the audit log around the timestamp of the agent’s attempt:
tctl get audit --event join --start --end
Look for entries with:
event: join.failure (or similar T3xx code)token_name, requested_roles, reason (e.g., "token expired", "token does not grant node role", "invalid token").Are you joining the Node agent directly to the Auth Server or through the Teleport Proxy? This determines which port (3025 for direct Auth, 443/3080 via Proxy) and which log set to inspect, and it influences the network‑reachability test you should run.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.