Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 84037 invoked from network); 5 May 2010 10:33:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 May 2010 10:33:35 -0000 Received: (qmail 90766 invoked by uid 500); 5 May 2010 10:33:34 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 90689 invoked by uid 500); 5 May 2010 10:33:32 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 90681 invoked by uid 99); 5 May 2010 10:33:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 10:33:31 +0000 X-ASF-Spam-Status: No, hits=2.4 required=10.0 tests=AWL,FILL_THIS_FORM_FRAUD_PHISH,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_FILL_THIS_FORM_SHORT,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of juliocarlos@gmail.com designates 72.14.220.156 as permitted sender) Received: from [72.14.220.156] (HELO fg-out-1718.google.com) (72.14.220.156) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 10:33:25 +0000 Received: by fg-out-1718.google.com with SMTP id e21so1818111fga.7 for ; Wed, 05 May 2010 03:33:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=jLE2Rq8LJOkaEAIV1h13FcrjSHH9XpcRZI7Fpj6c4aY=; b=MxNufFWelyILwb0CqKODAnjzKZ98/QAvJT942ZJ9v5q6498iYSLIbOpwCfk6RihSDv ZOd4MDNe5dqjg9jNbNfBwW0OEsKQddBiNR59KeBDGX9v0hFZiVX7CJENSnPZzzbi0tVL 7YPgZ+MJZPDMG6AwwdHlEM0cSa3/H6s9g45DU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=d9zjzbx1TueYzVwF8jLsnsghXOh9Y/fUmc7yGWH9r170440LTvdvQYlWmwwhl9teg/ 1VhY1kLum6RHe+2Y3sE3X3rewBx7LtDnycUp9Z3bbxX9JHdTjfPHe8B5UWWNs5atCdiQ w3UIqtleL/+OZfbljEvMkIq/YKl/regp7KoUU= MIME-Version: 1.0 Received: by 10.103.84.25 with SMTP id m25mr4197671mul.61.1273055584356; Wed, 05 May 2010 03:33:04 -0700 (PDT) Received: by 10.103.11.8 with HTTP; Wed, 5 May 2010 03:33:04 -0700 (PDT) In-Reply-To: References: Date: Wed, 5 May 2010 12:33:04 +0200 Message-ID: Subject: Re: Login failure with SimpleAuthenticator From: Julio Carlos Barrera Juez To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016e652f6b0e28bcb0485d65985 --0016e652f6b0e28bcb0485d65985 Content-Type: text/plain; charset=ISO-8859-1 Thank you very much! It works! 2010/5/3 roger schildmeijer > You need to define two more properties: passwd.properties and > access.properties (hint > -Dpasswd.properties=/user/schildmeijer/cassandra/conf/passwd.properties and > analogous for access.properties) > > > > // Roger Schildmeijer > > > On Mon, May 3, 2010 at 1:06 PM, Julio Carlos Barrera Juez < > juliocarlos@gmail.com> wrote: > >> 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.(FileInputStream.java:103) >> at java.io.FileInputStream.(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 org.apache.cassandra.auth.SimpleAuthenticator >> 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 >> >> 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 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 >>>> 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: >>>> > >>>> org.apache.cassandra.auth.SimpleAuthenticator >>>> > 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 credentials = new HashMap(); >>>> > 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 >>>> >>> >>> >> > --0016e652f6b0e28bcb0485d65985 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thank you very much! It works!

2010/5/3 r= oger schildmeijer <schildmeijer@gmail.com>

You need to define two more properties: passwd.properties and access.properties (hint -Dpasswd.properties=3D/user/schildmeijer/cassan= dra/conf/passwd.properties and analogous for access.properties)

=A0

// Roger Schildmeijer



On Mon, May 3, 2010 at 1:06 PM, Julio Ca= rlos Barrera Juez <juliocarlos@gmail.com> wrote:
Hi again.

My system log says:

<= div>ERROR [pool-1-thread-1] 2010-05-03 12:54:03,801 Cassandra.java (line 11= 53) Internal error processing login
java.lang.RuntimeException: U= nexpected authentication problem
at org.apache.cassandra.auth.S= impleAuthenticator.login(SimpleAuthenticator.java:113)
at org.apache.cassandra.thrift.CassandraServe= r.login(CassandraServer.java:651)
at org.apache.cassandra.thrift= .Cassandra$Processor$login.process(Cassandra.java:1147)
at org.apache.cassandra.thrift.Cassandra$Pro= cessor.process(Cassandra.java:1125)
at org.apache.thrift.server.TT= hreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
at java.util.concurrent.ThreadPoolExec= utor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.Thread= PoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at java.io.FileInputStream.<init>(FileInputStre= am.java:103)
at java.io.F= ileInputStream.<init>(FileInputStream.java:66)
at org.apache.cassandra.auth.S= impleAuthenticator.login(SimpleAuthenticator.java:82)
... 7 more

Maybe it is a problem with the configuration file. Do I= need to add something more than=A0=A0=A0<Authenticator>org.apache.ca= ssandra.auth.SimpleAuthenticator</Authenticator> line? It seems that = cassandra doesn't found=A0access.properties and=A0passwd.properties fil= es? I have put it in the conf directory, but do I need to put something mor= e in the=A0storage-conf.xml file?

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

2010/4/29 rog= er schildmeijer <schildmeijer@gmail.com>

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

=A0

/ Roger Schildmeijer



On Thu, Apr 29, 2010 at 2:47 PM, Jonatha= n 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=A0org.apache.cassandra.auth.SimpleAuthenticator to use
> authentication in my cluster with one node (with cassandra 0.6.1). I h= ave
> put:
> <Authenticator>org.apache.cassandra.auth.SimpleAuthenticator<= /Authenticator>
> in storage-conf.xml file, and:
> keyspace=3Dusername
> in access.properties file, and:
> username=3Dpassword
> in passwd.properties file.
> When I try to use cassandra client I am using:
> ./cassandra-cli --host localhost --port 9160 --username username --pas= sword
> password --keyspace keyspace --debug
> and it returns this:
> org.apache.thrift.TApplicationException: Internal error processing log= in
> at
> org.apache.thrift.TApplicationException.read(TApplicationException.jav= a:108)
> at
> org.apache.cassandra.thrift.Cassandra$Client.recv_login(Cassandra.java= :300)
> at org.apache.cassandra.thrift.Cassandra$Client.login(Cassandra.java:2= 82)
> 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 =3D new TSocket(ip, port);
> static Cassandra.Client=A0client =3D new Cassandra.Client(new
> TBinaryProtocol(tr));
> Map<String, String> credentials =3D new HashMap<String, Strin= g>();
> 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 log= in
> at
> org.apache.thrift.TApplicationException.read(TApplicationException.jav= a:108)
> at
> org.apache.cassandra.thrift.Cassandra$Client.recv_login(Cassandra.java= :300)
> at org.apache.cassandra.thrift.Cassandra$Client.login(Cassandra.java:2= 82)
> ...
> What I am doing wrong?



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




--0016e652f6b0e28bcb0485d65985--