apache/cassandra · error · ConfigurationException
Login config name %s specified for JMX auth, but no configur
Error message
Login config name %s specified for JMX auth, but no configuration is available. Please set config location in cassandra.yaml or with the '%s' system property
What it means
When JMX authentication is configured (cassandra.yaml jmx remote auth specifies a login module/config name) but no JAAS login configuration file location is provided, JMXServerUtils.configureJmxAuthentication throws ConfigurationException at server startup. The config name alone is unusable without the JAAS config file.
Source
Thrown at src/java/org/apache/cassandra/utils/JMXServerUtils.java:187
// If authentication is enabled, initialize the appropriate JMXAuthenticator
// and stash it in the environment settings.
// A JAAS configuration entry takes precedence. If one is supplied, use
// Cassandra's own custom JMXAuthenticator implementation which delegates
// auth to the LoginModules specified by the JAAS configuration entry.
// If no JAAS entry is found, an instance of the JDK's own
// JMXPluggableAuthenticator is created. In that case, the admin may have
// set a location for the JMX password file which must be added to env
// before creating the authenticator. If no password file has been
// explicitly set, it's read from the default location
// $JAVA_HOME/lib/management/jmxremote.password
String configEntry = options.login_config_name;
if (configEntry != null)
{
if (Strings.isNullOrEmpty(CassandraRelevantProperties.JAVA_SECURITY_AUTH_LOGIN_CONFIG.getString()))
{
if (Strings.isNullOrEmpty(options.login_config_file))
{
throw new ConfigurationException(String.format("Login config name %s specified for JMX auth, but no " +
"configuration is available. Please set config " +
"location in cassandra.yaml or with the " +
"'%s' system property",
configEntry,
CassandraRelevantProperties.JAVA_SECURITY_AUTH_LOGIN_CONFIG.getKey()));
}
else
{
CassandraRelevantProperties.JAVA_SECURITY_AUTH_LOGIN_CONFIG.setString(options.login_config_file);
}
}
env.put(JMXConnectorServer.AUTHENTICATOR, new AuthenticationProxy(configEntry));
}
else
{
String passwordFile = options.password_file;
if (passwordFile != null)
{View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Set the system property -Dcassandra.jmx.server.security.login.config=/path/to/jaas.config
- Pass the login config file via the JMX server startup option (login_config_file)
- Remove/comment the login config name in cassandra.yaml if JMX auth is not intended
Example fix
// before (cassandra-env.sh) JVM_OPTS="$JVM_OPTS -Dcassandra.jmx.remote.auth.login.config=CustomLogin" // after JVM_OPTS="$JVM_OPTS -Dcassandra.jmx.remote.auth.login.config=CustomLogin" JVM_OPTS="$JVM_OPTS -Dcassandra.jmx.server.security.login.config=/etc/cassandra/jaas.config"
Defensive patterns
Strategy: validation
Validate before calling
String loginConfig = System.getProperty("cassandra.jmx.server.security.login.config");
if (cassandraYamlSetsJmxAuth && (loginConfig == null || loginConfig.isEmpty()))
throw new IllegalStateException("JMX auth requires -Dcassandra.jmx.server.security.login.config"); Try / catch
try { JMXServerUtils.createJMXServer(...); } catch (ConfigurationException e) { logger.error("JMX startup failed: {}", e.getMessage()); throw e; } Prevention
- When enabling JMX auth in cassandra.yaml, always also set the JAAS config file property
- Keep cassandra.yaml and cassandra-env.sh changes in the same deployment change
- Smoke-test JMX connectivity (nodetool status) after auth config changes
When it happens
Trigger: cassandra.yaml sets jmx remote authentication (login config name) but neither JAVA_SECURITY_AUTH_LOGIN_CONFIG system property (-Dcassandra.jmx.server.security.login.config) nor the login_config_file startup option is set.
Common situations: Enabling JMX auth in cassandra.yaml but forgetting -Dcassandra.jmx.server.security.login.config=... or the --login-config-file option; migrating JMX setups between versions where the property name changed; operator sets the config name but not the file.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- JAAS login configuration missing for JMX authenticator setup
- Authentication error
- Unrecognized Callback:
- Configure either jmx_server_options in cassandra.yaml and co
- Could not set new local compaction strategy: <cause message>
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/ec86b3f38be52fbc.
Report an issue: GitHub.