Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9265AED76 for ; Mon, 28 Jan 2013 19:56:25 +0000 (UTC) Received: (qmail 98262 invoked by uid 500); 28 Jan 2013 19:56:23 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 98192 invoked by uid 500); 28 Jan 2013 19:56:23 -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 98182 invoked by uid 99); 28 Jan 2013 19:56:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jan 2013 19:56:22 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a79.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jan 2013 19:56:15 +0000 Received: from homiemail-a79.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a79.g.dreamhost.com (Postfix) with ESMTP id 8F6727D4074 for ; Mon, 28 Jan 2013 11:55:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h= content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; s= thelastpickle.com; bh=LAgTvDS4RPraQoLCvLwEVyPX6bg=; b=BvnzizDuyS QDekiviKCzzDHLbO0RElLNHuWdmGFHPV+gWJBsokSaWIASk5qtT+07MT1+ZlNEJU RbCqSHynP70+SvOcrRcnLihGmqYi5eFXzsWBMrte9Waf0olV/AQme2aqdtPZNhyk 9X1Mk/VZDu1wtRHXUzLDgnkG/XAqz4Z1I= Received: from [172.16.1.8] (unknown [203.86.207.101]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a79.g.dreamhost.com (Postfix) with ESMTPSA id 034D47D4059 for ; Mon, 28 Jan 2013 11:55:37 -0800 (PST) Content-Type: text/plain; charset=windows-1251 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Issues with CQLSH in Cassandra 1.2 From: aaron morton In-Reply-To: <51020B7E.9090805@gmail.com> Date: Tue, 29 Jan 2013 08:55:52 +1300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <51016F75.80005@gmail.com> <51019224.7040301@gmail.com> <51019BEC.7000205@gmail.com> <2E30381F-E093-4779-9F80-6CBCF9113841@thelastpickle.com> <51020B7E.9090805@gmail.com> To: user@cassandra.apache.org X-Mailer: Apple Mail (2.1499) X-Virus-Checked: Checked by ClamAV on apache.org I was able to replicate it=85 $ bin/nodetool -h 127.0.0.1 -p 7100 describering foo Schema Version:253da4a3-e277-35b5-8d04-dbeeb3c9508e TokenRange:=20 TokenRange(start_token:3074457345618258602, = end_token:-9223372036854775808, endpoints:[], rpc_endpoints:[], = endpoint_details:[]) TokenRange(start_token:-3074457345618258603, = end_token:3074457345618258602, endpoints:[], rpc_endpoints:[], = endpoint_details:[]) TokenRange(start_token:-9223372036854775808, = end_token:-3074457345618258603, endpoints:[], rpc_endpoints:[], = endpoint_details:[]) Will dig into it later on to see if it's a bug.=20 Cheers ----------------- Aaron Morton Freelance Cassandra Developer New Zealand @aaronmorton http://www.thelastpickle.com On 25/01/2013, at 5:35 PM, Gabriel Ciuloaica = wrote: > Hi Aaron, >=20 > I'm using PropertyFileSnitch, an my cassandra-topology.propertis looks = like this: >=20 > # Cassandra Node IP=3DData Center:Rack >=20 > # default for unknown nodes > default=3DDC1:RAC1 >=20 > # all known nodes > 10.11.1.108=3DDC1:RAC1 > 10.11.1.109=3DDC1:RAC2 > 10.11.1.200=3DDC1:RAC3 >=20 > Cheers, > Gabi >=20 >=20 >=20 >=20 > On 1/25/13 4:38 AM, aaron morton wrote: >> Can you provide details of the snitch configuration and the number of = nodes you have?=20 >>=20 >> Cheers >>=20 >> ----------------- >> Aaron Morton >> Freelance Cassandra Developer >> New Zealand >>=20 >> @aaronmorton >> http://www.thelastpickle.com >>=20 >> On 25/01/2013, at 9:39 AM, Gabriel Ciuloaica = wrote: >>=20 >>> Hi Tyler, >>>=20 >>> No, it was just a typo in the email, I changed names of DC in the = email after copy/paste from output of the tools. >>> It is quite easy to reproduce (assuming you have a correct = configuration for NetworkTopologyStrategy, with vNodes(default, 256)): >>>=20 >>> 1. launch cqlsh and create the keyspace >>>=20 >>> create keyspace foo with replication=3D = {'class':'NetworkTopologyStrategy','DC1':3}; >>>=20 >>> 2. exit cqlsh, run >>>=20 >>> nodetool describering foo >>>=20 >>> you'll see something like this: >>>=20 >>> TokenRange(start_token:2318224911779291128, = end_token:2351629206880900296, endpoints:[], rpc_endpoints:[], = endpoint_details:[]) >>> TokenRange(start_token:-8291638263612363845, = end_token:-8224756763869823639, endpoints:[], rpc_endpoints:[], = endpoint_details:[]) >>>=20 >>> 3. start cqlsh,=20 >>>=20 >>> drop keyspace foo; >>>=20 >>> 4. Exit cqlsh, start cassandra-cli >>> create keyspace foo with placement_strategy =3D = 'NetworkTopologyStrategy' AND strategy_options=3D{DC1}; >>>=20 >>> if you run nodetool describering foo you'll see: >>>=20 >>> TokenRange(start_token:2318224911779291128, = end_token:2351629206880900296, endpoints:[10.11.1.200, 10.11.1.109, = 10.11.1.108], rpc_endpoints:[10.11.1.200, 10.11.1.109, 10.11.1.108], = endpoint_details:[EndpointDetails(host:10.11.1.200, datacenter:DC1, = rack:RAC3), EndpointDetails(host:10.11.1.109, datacenter:DC1, = rack:RAC2), EndpointDetails(host:10.11.1.108, datacenter:DC1, = rack:RAC1)]) >>> TokenRange(start_token:-8291638263612363845, = end_token:-8224756763869823639, endpoints:[10.11.1.200, 10.11.1.109, = 10.11.1.108], rpc_endpoints:[10.11.1.200, 10.11.1.109, 10.11.1.108], = endpoint_details:[EndpointDetails(host:10.11.1.200, datacenter:DC1, = rack:RAC3), EndpointDetails(host:10.11.1.109, datacenter:DC1, = rack:RAC2), EndpointDetails(host:10.11.1.108, datacenter:DC1, = rack:RAC1)]) >>>=20 >>> Br, >>> Gabi >>>=20 >>>=20 >>> On 1/24/13 10:22 PM, Tyler Hobbs wrote: >>>> Gabriel, >>>>=20 >>>> It looks like you used "DC1" for the datacenter name in your = replication strategy options, while the actual datacenter name was = "DC-1" (based on the nodetool status output). Perhaps that was causing = the problem? >>>>=20 >>>>=20 >>>> On Thu, Jan 24, 2013 at 1:57 PM, Gabriel Ciuloaica = wrote: >>>> I do not think that it has anything to do with Astyanax, but after = I have recreated the keyspace with cassandra-cli, everything is = working fine. >>>> Also, I have mention below that not even "nodetool describering = foo", did not showed correct information for the tokens, = encoding_details, if the keyspace was created with cqlsh. >>>>=20 >>>> Thanks, >>>> Gabi >>>>=20 >>>>=20 >>>> On 1/24/13 9:21 PM, Ivan Velykorodnyy wrote: >>>>> Hi, >>>>>=20 >>>>> Astyanax is not 1.2 compatible yet = https://github.com/Netflix/astyanax/issues/191 >>>>> Eran planned to make it in 1.57.x >>>>>=20 >>>>> =F7=E5=F2=E2=E5=F0=E3, 24 =FF=ED=E2=E0=F0=FF 2013 =E3. = =EF=EE=EB=FC=E7=EE=E2=E0=F2=E5=EB=FC Gabriel Ciuloaica =EF=E8=F1=E0=EB: >>>>> Hi, >>>>>=20 >>>>> I have spent half of the day today trying to make a new Cassandra = cluster to work. I have setup a single data center cluster, using = NetworkTopologyStrategy, DC1:3. >>>>> I'm using latest version of Astyanax client to connect. After many = hours of debug, I found out that the problem may be in cqlsh utility. >>>>>=20 >>>>> So, after the cluster was up and running: >>>>> [me@cassandra-node1 cassandra]$ nodetool status >>>>> Datacenter: DC-1 >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>> Status=3DUp/Down >>>>> |/ State=3DNormal/Leaving/Joining/Moving >>>>> -- Address Load Tokens Owns (effective) Host ID = Rack >>>>> UN 10.11.1.109 59.1 KB 256 0.0% = 726689df-edc3-49a0-b680-370953994a8c RAC2 >>>>> UN 10.11.1.108 67.49 KB 256 0.0% = 73cd86a9-4efb-4407-9fe8-9a1b3a277af7 RAC1 >>>>> UN 10.11.1.200 59.84 KB 64 0.0% = d6d700d4-28aa-4722-b215-a6a7d304b8e7 RAC3 >>>>>=20 >>>>> I went to create the keyspace: >>>>> 1. First I have tried using cqlsh: >>>>> create keyspace foo with replication=3D = {'class':'NetworkTopologyStrategy','DC1':3}; >>>>>=20 >>>>> after this, I have checked that the keyspace was properly created = by running=20 >>>>>=20 >>>>> cqlsh> select * from system.schema_keyspaces; >>>>> keyspace_name | durable_writes | strategy_class = | strategy_options >>>>> = ---------------+----------------+-----------------------------------------= -------------+---------------------------- >>>>> system_auth | True | = org.apache.cassandra.locator.SimpleStrategy | {"replication_factor":"1"} >>>>> foo | True | = org.apache.cassandra.locator.NetworkTopologyStrategy | = {"dc1":"3"} >>>>> system | True | = org.apache.cassandra.locator.LocalStrategy | {} >>>>> system_traces | True | = org.apache.cassandra.locator.SimpleStrategy | {"replication_factor":"1"} >>>>>=20 >>>>> but if I run nodetool describering foo, it will not show anything = into endpoint, or endpoint_details fields. >>>>>=20 >>>>> In this situation, Astyanax client will throw exception with = NoAvailableHostsException. I have used following configuration: >>>>> withAstyanaxConfiguration(new AstyanaxConfigurationImpl() >>>>> =20 >>>>> =20 >>>>> .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE) >>>>>=20 >>>>> =20 >>>>> .setConnectionPoolType(ConnectionPoolType.TOKEN_AWARE) >>>>>=20 >>>>> First option did not worked at all. >>>>>=20 >>>>> 2. I've dropped the keyspace crated with cqlsh and re-created with = cassandra-cli. This time, the nodetool describering foo, shows = information into endpoint and endpoint_details columns, and also the = Astyanax client works properly. >>>>>=20 >>>>> Hope it will avoid others to avoid spending time to figure out how = to go around this issue. >>>>>=20 >>>>> Br, >>>>> Gabi >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>> --=20 >>>> Tyler Hobbs >>>> DataStax >>>=20 >>=20 >=20