redis/jedis · critical · JedisAuthenticationException
AuthXManager failed to start!
Error message
AuthXManager failed to start!
What it means
AuthXManager coordinates periodic re-authentication using token managers (e.g. for IAM/OIDC-style identity tokens). start() submits the token manager start task and waits; if that task fails (InterruptedException or ExecutionException), it logs and rethrows as JedisAuthenticationException.
Solutions
- Inspect the logged cause (e.getCause()) for the token manager's root failure.
- Verify identity/token provider endpoint, credentials, and network reachability.
- Retry client construction after fixing credentials/endpoint.
- Check for premature thread interruption in your shutdown code.
Example fix
// before AuthXManager m = new AuthXManager(badTokenManagerConfig); m.start(); // JedisAuthenticationException // after // fix tokenManager config: correct endpoint + valid credentials, then AuthXManager m = new AuthXManager(correctConfig); m.start();
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-check token manager reachability
try (Socket s = new Socket(tokenHost, tokenPort)) { /* reachable */ } Try / catch
try {
authXManager.start();
} catch (JedisAuthenticationException e) {
Throwable root = e.getCause();
log.error("Token manager startup failed", root);
} Prevention
- Validate token provider endpoint/credentials before startup
- Inspect e.getCause() for the root failure
- Ensure network/proxy allows the token endpoint
- Avoid interrupting startup threads during shutdown
When it happens
Trigger: The underlying token manager fails to initialize/fetch its first token: unreachable identity/credentials provider, invalid credentials, network timeouts, or the start thread is interrupted.
Common situations: Wrong OIDC/IAM endpoint configured, expired or missing credentials, corporate proxy blocking the token endpoint, container DNS failures, JDK interruption during shutdown.
Related errors
- Failed to evict connections from pool
- Range must not be null.
- binary ft.search is not implemented with resp3.
- TS.NRANGE/TS.NREVRANGE require at least one key
- DIALECT=0 cannot be set.
AI-assisted analysis of redis/jedis@6dac31d4c2 (2026-09-08).
Data as JSON: /api/errors/06224b40362ea813.
Report an issue: GitHub.
Appendix: source
Thrown at src/main/java/redis/clients/jedis/authentication/AuthXManager.java:52
private final List<Consumer<Token>> postAuthenticateHooks = new ArrayList<>();
private final AtomicReference<CompletableFuture<Void>> uniqueStarterTask = new AtomicReference<>();
protected AuthXManager(TokenManager tokenManager) {
this.tokenManager = tokenManager;
}
public AuthXManager(TokenAuthConfig tokenAuthConfig) {
this(new TokenManager(tokenAuthConfig.getIdentityProviderConfig().getProvider(),
tokenAuthConfig.getTokenManagerConfig()));
}
public void start() {
Future<Void> safeStarter = safeStart(this::tokenManagerStart);
try {
safeStarter.get();
} catch (InterruptedException | ExecutionException e) {
log.error("AuthXManager failed to start!", e);
throw new JedisAuthenticationException("AuthXManager failed to start!",
(e instanceof ExecutionException) ? e.getCause() : e);
}
}
private Future<Void> safeStart(Runnable starter) {
if (uniqueStarterTask.compareAndSet(null, new CompletableFuture<Void>())) {
try {
starter.run();
uniqueStarterTask.get().complete(null);
} catch (Exception e) {
uniqueStarterTask.get().completeExceptionally(e);
}
}
return uniqueStarterTask.get();
}
private void tokenManagerStart() {
tokenManager.start(new TokenListener() {View on GitHub (pinned to 6dac31d4c2)