This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Big Table and the fly likes Problems using org.apache.cassandra.auth.SimpleAuthenticator with Windows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » Big Table
Bookmark "Problems using org.apache.cassandra.auth.SimpleAuthenticator with Windows" Watch "Problems using org.apache.cassandra.auth.SimpleAuthenticator with Windows" New topic
Author

Problems using org.apache.cassandra.auth.SimpleAuthenticator with Windows

Ray Clark
Ranch Hand

Joined: Aug 16, 2012
Posts: 52
I have everything set up but I can't seem to get authentication to work. I think my problem might be how to tell Cassandra where the access.properties and passwd.properties files are. Here is what I've tried in the cassandra.bat file:

I first tried specifying it on the CASSANDRA_PARAMS line as this:

set CASSANDRA_PARAMS=-Dcassandra -Dcassandra-foreground=yes -Dpasswd.properties=%CASSANDRA_HOME%\conf\passwd.properties -Daccess.properties=%CASSANDRA_HOME%\conf\access.properties

I then tried specifying it on the JAVA_OPTS line as follows:

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

No matter what I try I keep getting this:



I am calling HFactory.createCluster as follows:



I ran it in debug and I know the correct username and password are being passed in so I'm guessing that Cassandra can't find the properties files.

Any ideas?

Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problems using org.apache.cassandra.auth.SimpleAuthenticator with Windows