prestodb/presto · error · RuntimeException
Failed to create Controller auth provider
Error message
Failed to create Controller auth provider
What it means
Mirror of the broker case for the controller: PinotControllerAuthenticationProvider resolves controller session credential getters via reflection and wraps a NoSuchMethodException in a RuntimeException 'Failed to create Controller auth provider'.
Source
Thrown at presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/auth/PinotControllerAuthenticationProvider.java:49
@Inject
public PinotControllerAuthenticationProvider(PinotConfig pinotConfig)
{
String type = pinotConfig.getControllerAuthenticationType();
switch (type) {
case "NONE":
this.delegate = PinotEmptyAuthenticationProvider.instance();
break;
case "PASSWORD":
try {
this.delegate = new PinotPasswordAuthenticationProvider(
pinotConfig.getControllerAuthenticationUser(),
pinotConfig.getControllerAuthenticationPassword(),
PinotSessionProperties.class.getMethod("getControllerAuthenticationUser", ConnectorSession.class),
PinotSessionProperties.class.getMethod("getControllerAuthenticationPassword", ConnectorSession.class));
}
catch (NoSuchMethodException e) {
throw new RuntimeException("Failed to create Controller auth provider", e);
}
break;
default:
throw new RuntimeException("Unknown authentication type - " + type);
}
}
private PinotControllerAuthenticationProvider(PinotAuthenticationProvider delegate)
{
this.delegate = requireNonNull(delegate, "Delegate controller authentication provider is required");
}
@Override
public Optional<String> getAuthenticationToken()
{
return delegate.getAuthenticationToken();
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Rebuild/redeploy the connector so all classes are consistent
- Update the reflective lookup names to the current method names or replace reflection with direct calls
- Check for recent renames of the controller session property getters
- Confirm controller auth type config requires this provider before it is constructed
Example fix
// before
PinotSessionProperties.class.getMethod("getControllerAuthenticationUser", ConnectorSession.class)
// after
session -> PinotSessionProperties.getControllerAuthenticationUser(session) Defensive patterns
Strategy: try-catch
Validate before calling
// pre-flight reflective check for controller getters
try {
PinotSessionProperties.class.getMethod("getControllerAuthenticationUser", ConnectorSession.class);
PinotSessionProperties.class.getMethod("getControllerAuthenticationPassword", ConnectorSession.class);
} catch (NoSuchMethodException e) {
throw new IllegalStateException("Connector build lacks controller auth session properties", e);
} Try / catch
try {
provider = new PinotControllerAuthenticationProvider(pinotConfig);
} catch (RuntimeException e) {
if (e.getMessage() != null && e.getMessage().contains("Failed to create Controller auth provider")) {
log.error("Controller auth provider init failed; check build consistency", e);
provider = PinotAuthenticationProvider.none();
} else throw e;
} Prevention
- Ensure all connector classes come from the same build artifact
- Replace reflection with compile-checked references in connector code
- Run connector startup integration tests with controller auth enabled
- Monitor renames of controller session property methods
When it happens
Trigger: Constructing the controller auth provider with controller authentication enabled; PinotSessionProperties.getMethod("getControllerAuthenticationUser"/"...Password", ConnectorSession.class) throws NoSuchMethodException because those methods don't exist in the loaded class.
Common situations: Method renames in PinotSessionProperties; mixed jar versions in the deployment; refactor removed controller session properties while auth config still requests user/password mode.
Related errors
- Failed to create Broker auth provider
- PINOT_UNAUTHENTICATED_EXCEPTION
- Unknown authentication type -
- Unknown authentication type -
- UNEXPECTED_ACCUMULO_ERROR
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/949f6ebbfdc27cb4.
Report an issue: GitHub.