Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 96977 invoked from network); 29 Apr 2010 13:33:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Apr 2010 13:33:06 -0000 Received: (qmail 48317 invoked by uid 500); 29 Apr 2010 13:33:05 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 48301 invoked by uid 500); 29 Apr 2010 13:33:05 -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 48293 invoked by uid 99); 29 Apr 2010 13:33:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Apr 2010 13:33:05 +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 schildmeijer@gmail.com designates 209.85.218.222 as permitted sender) Received: from [209.85.218.222] (HELO mail-bw0-f222.google.com) (209.85.218.222) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Apr 2010 13:32:59 +0000 Received: by bwz22 with SMTP id 22so14425888bwz.25 for ; Thu, 29 Apr 2010 06:32:38 -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=6NgzRpcywqGkZ24vH77I4ph9tnKhsqFC//rTd3+SFC4=; b=V2VChemF5WieJUZcRvkEDJVm0HYHjS/KeprvF+CQqQfREOZeWNAETUBJ9bJ50L1eR1 lwj9PotU9e2MGNZkfC5/CSpHiYd1oLLmsNhvd+xb6T/5PaI7hFkTCjkJWMg5jd/cw6B1 QD0dKvwnCDv6JCNnCoBGY7erQ4dbucviBGXjQ= 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=qf07Dv5/r+PV74HOY8kV7PsxY8rBPFyZdHQBiqhAbw4862rLycE2k8FOFlPpq7KduI O5i2pIZeHpyvXRHwyizASQoT/wLO2J+rFe1JLhmN06qN8OUp6bUALVMDJrH2wZ0Gc5TS iA7nXVAK8XuEsmu28opky4cuB/BAwYtcZidDs= MIME-Version: 1.0 Received: by 10.103.79.19 with SMTP id g19mr5147518mul.75.1272547957953; Thu, 29 Apr 2010 06:32:37 -0700 (PDT) Received: by 10.103.169.19 with HTTP; Thu, 29 Apr 2010 06:32:37 -0700 (PDT) In-Reply-To: References: Date: Thu, 29 Apr 2010 15:32:37 +0200 Message-ID: Subject: Re: Login failure with SimpleAuthenticator From: roger schildmeijer To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016e65b5dd6fe55d3048560288d --0016e65b5dd6fe55d3048560288d Content-Type: text/plain; charset=ISO-8859-1 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 > --0016e65b5dd6fe55d3048560288d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

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

--0016e65b5dd6fe55d3048560288d--