I tried setting everything up for Simple Authentication with Cassandra locally on my PC but I can't get everything just right so that it works.
I have authenticator: org.apache.cassandra.auth.SimpleAuthenticator
and authority: org.apache.cassandra.auth.SimpleAuthority specified in the cassandra.yaml file.
I changed the JAVA_OPTS in the cassandra.bat file as follows:
REM ***** JAVA options *****
set JAVA_OPTS=^
-ea^
-javaagent:"%CASSANDRA_HOME%\lib\jamm-0.2.2.jar"^
-Xms1G^
-Xmx1G^
-XX:+HeapDumpOnOutOfMemoryError^
-XX:+UseParNewGC^
-XX:+UseConcMarkSweepGC^
-XX:+CMSParallelRemarkEnabled^
-XX:SurvivorRatio=8^
-XX:MaxTenuringThreshold=1^
-XX:CMSInitiatingOccupancyFraction=75^
-XX:+UseCMSInitiatingOccupancyOnly^
-Dcom.sun.management.jmxremote.port=7199^
-Dcom.sun.management.jmxremote.ssl=false^
-Dcom.sun.management.jmxremote.authenticate=false^
-Dlog4j.configuration=log4j-server.properties^
-Dlog4j.defaultInitOverride=true^
-Dpasswd.properties=%CASSANDRA_HOME%\conf\passwd.properties^
-Daccess.properties=%CASSANDRA_HOME%\conf\access.properties
I have access.properties set up as this:
# Access to Keyspace1 (add/remove column families, etc).
BullfrogArticle.<ro>=toadforcloud
BullfrogArticle.<rw>=evolve24
BullfrogImage.<ro>=toadforcloud
BullfrogImage.<rw>=evolve24
ChartData.<ro>=toadforcloud
ChartData.<rw>=evolve24
# Access to Standard1 (keyspace Keyspace1)
# Keyspace1.Standard1.<rw>=toadforcloud,evolve24
And passwd.properties set up like this:
toadforcloud=password
evolve24=adminpwd
When I run it I get this:
ERROR [pool-2-thread-1] 2013-01-23 09:35:01,454 Cassandra.java (line 2917) Internal error processing login
java.lang.RuntimeException: Unexpected authentication problem
at org.apache.cassandra.auth.SimpleAuthenticator.authenticate(SimpleAuthenticator.java:123)
at org.apache.cassandra.service.ClientState.login(ClientState.java:85)
at org.apache.cassandra.thrift.CassandraServer.login(CassandraServer.java:784)
at org.apache.cassandra.thrift.Cassandra$Processor$login.process(Cassandra.java:2911)
at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: AuthenticationException(why:Given password in password mode PLAIN could not be validated for user "evolve24")
at org.apache.cassandra.auth.SimpleAuthenticator.authenticate(SimpleAuthenticator.java:104)
... 8 more
I have set a break point in my code so I know that the password is being passed in correctly to create the Cluster. Do you have any ideas what I could have set up wrong?
Thank You
