This problem is mostly due to the errors that are caused by running multiple Cassandra instances, which can be found in the Cassandra startup script:
# See CASSANDRA-7254 "$JAVA" -cp< Span class= "crayon-h" > $classpath $jvm_opts 2>& 1 | grep -q ' error:exception thrown by the agent: Java.lang.NullPointerException ' if [ < Span class= "Crayon-sy" >$? -ne "1" ]; then Echo unable to bind JMX, is Cassandra already running ? exit 1; fi
The jvm_opts in the conf/cassandra-env.sh file set the JMX port to 7199, so this error occurs when setting up the Java environment,
Use the following method to stop the Cassandra and then restart it to resolve.
# user= ' WhoAmI '
# Pgrep-u $user-F Cassandra | Xargs kill-9
Of course it is possible that other programs take up 7199 ports and can be NETSTAT-ANLT.
Cassandra 2.x Tip "Error: Agent throws exception error: Java.lang.NullPointerException"