{"record":{"id":"ec86b3f38be52fbc","repo":"apache/cassandra","slug":"login-config-name-s-specified-for-jmx-auth-but-n","errorCode":null,"errorMessage":"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","messagePattern":"Login config name (.+?) specified for JMX auth, but no configuration is available\\. Please set config location in cassandra\\.yaml or with the '(.+?)' system property","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/utils/JMXServerUtils.java","lineNumber":187,"sourceCode":"        // If authentication is enabled, initialize the appropriate JMXAuthenticator\n        // and stash it in the environment settings.\n        // A JAAS configuration entry takes precedence. If one is supplied, use\n        // Cassandra's own custom JMXAuthenticator implementation which delegates\n        // auth to the LoginModules specified by the JAAS configuration entry.\n        // If no JAAS entry is found, an instance of the JDK's own\n        // JMXPluggableAuthenticator is created. In that case, the admin may have\n        // set a location for the JMX password file which must be added to env\n        // before creating the authenticator. If no password file has been\n        // explicitly set, it's read from the default location\n        // $JAVA_HOME/lib/management/jmxremote.password\n        String configEntry = options.login_config_name;\n        if (configEntry != null)\n        {\n            if (Strings.isNullOrEmpty(CassandraRelevantProperties.JAVA_SECURITY_AUTH_LOGIN_CONFIG.getString()))\n            {\n                if (Strings.isNullOrEmpty(options.login_config_file))\n                {\n                    throw new ConfigurationException(String.format(\"Login config name %s specified for JMX auth, but no \" +\n                                                                   \"configuration is available. Please set config \" +\n                                                                   \"location in cassandra.yaml or with the \" +\n                                                                   \"'%s' system property\",\n                                                                   configEntry,\n                                                                   CassandraRelevantProperties.JAVA_SECURITY_AUTH_LOGIN_CONFIG.getKey()));\n                }\n                else\n                {\n                    CassandraRelevantProperties.JAVA_SECURITY_AUTH_LOGIN_CONFIG.setString(options.login_config_file);\n                }\n            }\n            env.put(JMXConnectorServer.AUTHENTICATOR, new AuthenticationProxy(configEntry));\n        }\n        else\n        {\n            String passwordFile = options.password_file;\n            if (passwordFile != null)\n            {","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/utils/JMXServerUtils.java#L169-L205","documentation":"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.","triggerScenarios":" 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.","commonSituations":"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.","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"],"exampleFix":"// before (cassandra-env.sh)\nJVM_OPTS=\"$JVM_OPTS -Dcassandra.jmx.remote.auth.login.config=CustomLogin\"\n// after\nJVM_OPTS=\"$JVM_OPTS -Dcassandra.jmx.remote.auth.login.config=CustomLogin\"\nJVM_OPTS=\"$JVM_OPTS -Dcassandra.jmx.server.security.login.config=/etc/cassandra/jaas.config\"","handlingStrategy":"validation","validationCode":"String loginConfig = System.getProperty(\"cassandra.jmx.server.security.login.config\");\nif (cassandraYamlSetsJmxAuth && (loginConfig == null || loginConfig.isEmpty()))\n    throw new IllegalStateException(\"JMX auth requires -Dcassandra.jmx.server.security.login.config\");","typeGuard":null,"tryCatchPattern":"try { JMXServerUtils.createJMXServer(...); } catch (ConfigurationException e) { logger.error(\"JMX startup failed: {}\", e.getMessage()); throw e; }","preventionTips":["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"],"tags":["jmx","authentication","configuration","jaas"],"backgroundTag":"missing-required-config-field","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}