DataStax Help Center

dse commands on clusters with JMX authentication fail with "Authentication failed! Credentials required"

Summary

dse commands fail to execute when JMX authentication has been enabled on the cluster.

Symptoms

As an example, when attempting to stop Cassandra:

$ dse -u jmx_user -p ******** cassandra-stop

the command fails to execute. An example error from DSE 4.6.0 is as follows:

Exception in thread "main" java.lang.SecurityException: Authentication failed! Credentials required 
at com.sun.jmx.remote.security.JMXPluggableAuthenticator.authenticationFailure(JMXPluggableAuthenticator.java:211) 
at com.sun.jmx.remote.security.JMXPluggableAuthenticator.authenticate(JMXPluggableAuthenticator.java:163) 
at sun.management.jmxremote.ConnectorBootstrap$AccessFileCheckerAuthenticator.authenticate(ConnectorBootstrap.java:219) 
at javax.management.remote.rmi.RMIServerImpl.doNewClient(RMIServerImpl.java:232) 
at javax.management.remote.rmi.RMIServerImpl.newClient(RMIServerImpl.java:199) 
...

Cause

The issue is due to incorrect flags used when running the dse command and the JMX credentials are not passed to DSE.

Solution

The correct flags to use for passing JMX credentials are -a and -b for the JMX username and password, respectively.

The correct usage format is:

dse [-u <username> -p <password>] [-a <jmx_username> -b <jmx_password>] <command> [command-args]

In the example above, the correct command is:

$ dse -a jmx_user -b ******** cassandra-stop

See also

DataStax 4.7 documentation - dse commands.

KB article - Step by step instructions for securing JMX authentication for nodetool utility, OpsCenter and JConsole.

KB article - Using special characters in JMX passwords causes agent connectivity issues.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk