Hi again.

My system log says:

ERROR [pool-1-thread-1] 2010-05-03 12:54:03,801 Cassandra.java (line 1153) Internal error processing login
java.lang.RuntimeException: Unexpected authentication problem
at org.apache.cassandra.auth.SimpleAuthenticator.login(SimpleAuthenticator.java:113)
at org.apache.cassandra.thrift.CassandraServer.login(CassandraServer.java:651)
at org.apache.cassandra.thrift.Cassandra$Processor$login.process(Cassandra.java:1147)
at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:1125)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
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:619)
Caused by: java.lang.NullPointerException
at java.io.FileInputStream.<init>(FileInputStream.java:103)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at org.apache.cassandra.auth.SimpleAuthenticator.login(SimpleAuthenticator.java:82)
... 7 more

Maybe it is a problem with the configuration file. Do I need to add something more than   <Authenticator>org.apache.cassandra.auth.SimpleAuthenticator</Authenticator> line? It seems that cassandra doesn't found access.properties and passwd.properties files? I have put it in the conf directory, but do I need to put something more in the storage-conf.xml file?

Keyspace name and user names and password are false, it is only for the example.

2010/4/29 roger schildmeijer <schildmeijer@gmail.com>

Are you sure that your keyspace is named "keyspace", and not "Keyspace1" (default)?

 

/ Roger Schildmeijer



On Thu, Apr 29, 2010 at 2:47 PM, Jonathan Ellis <jbellis@gmail.com> wrote:
If you're getting an internalerror, you need to check the server logs
for the exception that caused it

On Wed, Apr 28, 2010 at 6:20 AM, Julio Carlos Barrera Juez
<juliocarlos@gmail.com> wrote:
> Hi all!
> I am using org.apache.cassandra.auth.SimpleAuthenticator to use
> authentication in my cluster with one node (with cassandra 0.6.1). I have
> put:
> <Authenticator>org.apache.cassandra.auth.SimpleAuthenticator</Authenticator>
> in storage-conf.xml file, and:
> keyspace=username
> in access.properties file, and:
> username=password
> in passwd.properties file.
> When I try to use cassandra client I am using:
> ./cassandra-cli --host localhost --port 9160 --username username --password
> password --keyspace keyspace --debug
> and it returns this:
> org.apache.thrift.TApplicationException: Internal error processing login
> at
> org.apache.thrift.TApplicationException.read(TApplicationException.java:108)
> at
> org.apache.cassandra.thrift.Cassandra$Client.recv_login(Cassandra.java:300)
> at org.apache.cassandra.thrift.Cassandra$Client.login(Cassandra.java:282)
> at org.apache.cassandra.cli.CliMain.connect(CliMain.java:109)
> at org.apache.cassandra.cli.CliMain.main(CliMain.java:239)
> Login failure. Did you specify 'keyspace', 'username' and 'password'?
> When I try the same process with Java Thrift API:
> TTransport tr = new TSocket(ip, port);
> static Cassandra.Client client = new Cassandra.Client(new
> TBinaryProtocol(tr));
> Map<String, String> credentials = new HashMap<String, String>();
> credentials.put(SimpleAuthenticator.USERNAME_KEY, username);
> credentials.put(SimpleAuthenticator.PASSWORD_KEY, password);
> try {
> tr.open();
> client.login(KEY_SPACE, new AuthenticationRequest(credentials));
> catch{...}
> ..
> I get:
> org.apache.thrift.TApplicationException: Internal error processing login
> at
> org.apache.thrift.TApplicationException.read(TApplicationException.java:108)
> at
> org.apache.cassandra.thrift.Cassandra$Client.recv_login(Cassandra.java:300)
> at org.apache.cassandra.thrift.Cassandra$Client.login(Cassandra.java:282)
> ...
> What I am doing wrong?



--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com