You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Gabriel Ciuloaica <gc...@gmail.com> on 2013/01/24 18:29:25 UTC

Issues with CQLSH in Cassandra 1.2

Hi,

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.

So, after the cluster was up and running:
[me@cassandra-node1 cassandra]$ nodetool status
Datacenter: DC-1
======================
Status=Up/Down
|/ State=Normal/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

I went to create the keyspace:
1. First I have tried using cqlsh:
create keyspace foo with replication= 
{'class':'NetworkTopologyStrategy','DC1':3};

after this, I have checked that the keyspace was properly created by 
running

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"}

but if I run nodetool describering foo, it will not show anything into 
endpoint, or endpoint_details fields.

In this situation, Astyanax client will throw exception with 
/NoAvailableHostsException/. I have used following configuration:

withAstyanaxConfiguration(new  AstyanaxConfigurationImpl()       
         .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
         .setConnectionPoolType(ConnectionPoolType.TOKEN_AWARE)


First option did not worked at all.

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.

Hope it will avoid others to avoid spending time to figure out how to go 
around this issue.

Br,
Gabi

Re: Issues with CQLSH in Cassandra 1.2

Posted by Gabriel Ciuloaica <gc...@gmail.com>.
Right, at that point either, cassandra-cli or cqlsh will not see any 
endpoint. Only after you drop the keyspace and re-create it with 
cassandra-cli will properly work.

Thanks,
Gabi
On 2/3/13 2:15 AM, Manu Zhang wrote:
> On Tue 29 Jan 2013 03:55:52 AM CST, aaron morton wrote:
>> I was able to replicate it…
>>
>> $ bin/nodetool -h 127.0.0.1 -p 7100  describering foo
>> Schema Version:253da4a3-e277-35b5-8d04-dbeeb3c9508e
>> TokenRange:
>>     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.
>>
>> Cheers
>>
>> -----------------
>> Aaron Morton
>> Freelance Cassandra Developer
>> New Zealand
>>
>> @aaronmorton
>> http://www.thelastpickle.com
>>
>> On 25/01/2013, at 5:35 PM, Gabriel Ciuloaica <gc...@gmail.com> 
>> wrote:
>>
>>> Hi Aaron,
>>>
>>> I'm using PropertyFileSnitch, an my cassandra-topology.propertis 
>>> looks like this:
>>>
>>> # Cassandra Node IP=Data Center:Rack
>>>
>>> # default for unknown nodes
>>> default=DC1:RAC1
>>>
>>> # all known nodes
>>>    10.11.1.108=DC1:RAC1
>>>    10.11.1.109=DC1:RAC2
>>>    10.11.1.200=DC1:RAC3
>>>
>>> Cheers,
>>> Gabi
>>>
>>>
>>>
>>>
>>> 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?
>>>>
>>>> Cheers
>>>>
>>>> -----------------
>>>> Aaron Morton
>>>> Freelance Cassandra Developer
>>>> New Zealand
>>>>
>>>> @aaronmorton
>>>> http://www.thelastpickle.com
>>>>
>>>> On 25/01/2013, at 9:39 AM, Gabriel Ciuloaica <gc...@gmail.com> 
>>>> wrote:
>>>>
>>>>> Hi Tyler,
>>>>>
>>>>> 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)):
>>>>>
>>>>> 1. launch cqlsh and create the keyspace
>>>>>
>>>>> create keyspace foo with replication= 
>>>>> {'class':'NetworkTopologyStrategy','DC1':3};
>>>>>
>>>>> 2. exit cqlsh, run
>>>>>
>>>>> nodetool describering foo
>>>>>
>>>>> you'll see something like this:
>>>>>
>>>>> TokenRange(start_token:2318224911779291128, 
>>>>> end_token:2351629206880900296, endpoints:[], rpc_endpoints:[], 
>>>>> endpoint_details:[])
>>>>> TokenRange(start_token:-8291638263612363845, 
>>>>> end_token:-8224756763869823639, endpoints:[], rpc_endpoints:[], 
>>>>> endpoint_details:[])
>>>>>
>>>>> 3. start  cqlsh,
>>>>>
>>>>> drop keyspace foo;
>>>>>
>>>>> 4. Exit cqlsh, start cassandra-cli
>>>>> create keyspace foo with placement_strategy = 
>>>>> 'NetworkTopologyStrategy' AND strategy_options={DC1};
>>>>>
>>>>> if you run nodetool describering foo you'll see:
>>>>>
>>>>>      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)])
>>>>>
>>>>> Br,
>>>>> Gabi
>>>>>
>>>>>
>>>>> On 1/24/13 10:22 PM, Tyler Hobbs wrote:
>>>>>> Gabriel,
>>>>>>
>>>>>> 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?
>>>>>>
>>>>>>
>>>>>> On Thu, Jan 24, 2013 at 1:57 PM, Gabriel Ciuloaica 
>>>>>> <gc...@gmail.com> 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.
>>>>>>
>>>>>> Thanks,
>>>>>> Gabi
>>>>>>
>>>>>>
>>>>>> On 1/24/13 9:21 PM, Ivan Velykorodnyy wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> Astyanax is not 1.2 compatible yet 
>>>>>>> https://github.com/Netflix/astyanax/issues/191
>>>>>>> Eran planned to make it in 1.57.x
>>>>>>>
>>>>>>> четверг, 24 января 2013 г. пользователь Gabriel Ciuloaica писал:
>>>>>>> Hi,
>>>>>>>
>>>>>>> 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.
>>>>>>>
>>>>>>> So, after the cluster was up and running:
>>>>>>> [me@cassandra-node1 cassandra]$ nodetool status
>>>>>>> Datacenter: DC-1
>>>>>>> ======================
>>>>>>> Status=Up/Down
>>>>>>> |/ State=Normal/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
>>>>>>>
>>>>>>> I went to create the keyspace:
>>>>>>> 1. First I have tried using cqlsh:
>>>>>>> create keyspace foo with replication= 
>>>>>>> {'class':'NetworkTopologyStrategy','DC1':3};
>>>>>>>
>>>>>>> after this, I have checked that the keyspace was properly 
>>>>>>> created by running
>>>>>>>
>>>>>>> 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"}
>>>>>>>
>>>>>>> but if I run nodetool describering foo, it will not show 
>>>>>>> anything into endpoint, or endpoint_details fields.
>>>>>>>
>>>>>>> In this situation, Astyanax client will throw exception with 
>>>>>>> NoAvailableHostsException. I have used following configuration:
>>>>>>> withAstyanaxConfiguration(new AstyanaxConfigurationImpl()
>>>>>>>
>>>>>>>
>>>>>>> .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
>>>>>>>
>>>>>>>
>>>>>>> .setConnectionPoolType(ConnectionPoolType.TOKEN_AWARE)
>>>>>>>
>>>>>>> First option did not worked at all.
>>>>>>>
>>>>>>> 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.
>>>>>>>
>>>>>>> Hope it will avoid others to avoid spending time to figure out 
>>>>>>> how to go around this issue.
>>>>>>>
>>>>>>> Br,
>>>>>>> Gabi
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> Tyler Hobbs
>>>>>> DataStax
>>>>>
>>>>
>>>
>>
>
>
> tried out on a single node, but the cassandra-cli way showed no 
> endpoint details either


Re: Issues with CQLSH in Cassandra 1.2

Posted by Manu Zhang <ow...@gmail.com>.
On Tue 29 Jan 2013 03:55:52 AM CST, aaron morton wrote:
> I was able to replicate it…
>
> $ bin/nodetool -h 127.0.0.1 -p 7100  describering foo
> Schema Version:253da4a3-e277-35b5-8d04-dbeeb3c9508e
> TokenRange:
> 	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.
>
> Cheers
>
> -----------------
> Aaron Morton
> Freelance Cassandra Developer
> New Zealand
>
> @aaronmorton
> http://www.thelastpickle.com
>
> On 25/01/2013, at 5:35 PM, Gabriel Ciuloaica <gc...@gmail.com> wrote:
>
>> Hi Aaron,
>>
>> I'm using PropertyFileSnitch, an my cassandra-topology.propertis looks like this:
>>
>> # Cassandra Node IP=Data Center:Rack
>>
>> # default for unknown nodes
>> default=DC1:RAC1
>>
>> # all known nodes
>>    10.11.1.108=DC1:RAC1
>>    10.11.1.109=DC1:RAC2
>>    10.11.1.200=DC1:RAC3
>>
>> Cheers,
>> Gabi
>>
>>
>>
>>
>> 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?
>>>
>>> Cheers
>>>
>>> -----------------
>>> Aaron Morton
>>> Freelance Cassandra Developer
>>> New Zealand
>>>
>>> @aaronmorton
>>> http://www.thelastpickle.com
>>>
>>> On 25/01/2013, at 9:39 AM, Gabriel Ciuloaica <gc...@gmail.com> wrote:
>>>
>>>> Hi Tyler,
>>>>
>>>> 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)):
>>>>
>>>> 1. launch cqlsh and create the keyspace
>>>>
>>>> create keyspace foo with replication= {'class':'NetworkTopologyStrategy','DC1':3};
>>>>
>>>> 2. exit cqlsh, run
>>>>
>>>> nodetool describering foo
>>>>
>>>> you'll see something like this:
>>>>
>>>> TokenRange(start_token:2318224911779291128, end_token:2351629206880900296, endpoints:[], rpc_endpoints:[], endpoint_details:[])
>>>> TokenRange(start_token:-8291638263612363845, end_token:-8224756763869823639, endpoints:[], rpc_endpoints:[], endpoint_details:[])
>>>>
>>>> 3. start  cqlsh,
>>>>
>>>> drop keyspace foo;
>>>>
>>>> 4. Exit cqlsh, start cassandra-cli
>>>> create keyspace foo with placement_strategy = 'NetworkTopologyStrategy' AND strategy_options={DC1};
>>>>
>>>> if you run nodetool describering foo you'll see:
>>>>
>>>>      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)])
>>>>
>>>> Br,
>>>> Gabi
>>>>
>>>>
>>>> On 1/24/13 10:22 PM, Tyler Hobbs wrote:
>>>>> Gabriel,
>>>>>
>>>>> 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?
>>>>>
>>>>>
>>>>> On Thu, Jan 24, 2013 at 1:57 PM, Gabriel Ciuloaica <gc...@gmail.com> 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.
>>>>>
>>>>> Thanks,
>>>>> Gabi
>>>>>
>>>>>
>>>>> On 1/24/13 9:21 PM, Ivan Velykorodnyy wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Astyanax is not 1.2 compatible yet https://github.com/Netflix/astyanax/issues/191
>>>>>> Eran planned to make it in 1.57.x
>>>>>>
>>>>>> четверг, 24 января 2013 г. пользователь Gabriel Ciuloaica писал:
>>>>>> Hi,
>>>>>>
>>>>>> 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.
>>>>>>
>>>>>> So, after the cluster was up and running:
>>>>>> [me@cassandra-node1 cassandra]$ nodetool status
>>>>>> Datacenter: DC-1
>>>>>> ======================
>>>>>> Status=Up/Down
>>>>>> |/ State=Normal/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
>>>>>>
>>>>>> I went to create the keyspace:
>>>>>> 1. First I have tried using cqlsh:
>>>>>> create keyspace foo with replication= {'class':'NetworkTopologyStrategy','DC1':3};
>>>>>>
>>>>>> after this, I have checked that the keyspace was properly created by running
>>>>>>
>>>>>> 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"}
>>>>>>
>>>>>> but if I run nodetool describering foo, it will not show anything into endpoint, or endpoint_details fields.
>>>>>>
>>>>>> In this situation, Astyanax client will throw exception with NoAvailableHostsException. I have used following configuration:
>>>>>> withAstyanaxConfiguration(new AstyanaxConfigurationImpl()
>>>>>>
>>>>>>
>>>>>> .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
>>>>>>
>>>>>>
>>>>>> .setConnectionPoolType(ConnectionPoolType.TOKEN_AWARE)
>>>>>>
>>>>>> First option did not worked at all.
>>>>>>
>>>>>> 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.
>>>>>>
>>>>>> Hope it will avoid others to avoid spending time to figure out how to go around this issue.
>>>>>>
>>>>>> Br,
>>>>>> Gabi
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Tyler Hobbs
>>>>> DataStax
>>>>
>>>
>>
>


tried out on a single node, but the cassandra-cli way showed no 
endpoint details either

Re: Issues with CQLSH in Cassandra 1.2

Posted by aaron morton <aa...@thelastpickle.com>.
I was able to replicate it…

$ bin/nodetool -h 127.0.0.1 -p 7100  describering foo
Schema Version:253da4a3-e277-35b5-8d04-dbeeb3c9508e
TokenRange: 
	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. 

Cheers

-----------------
Aaron Morton
Freelance Cassandra Developer
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 25/01/2013, at 5:35 PM, Gabriel Ciuloaica <gc...@gmail.com> wrote:

> Hi Aaron,
> 
> I'm using PropertyFileSnitch, an my cassandra-topology.propertis looks like this:
> 
> # Cassandra Node IP=Data Center:Rack
> 
> # default for unknown nodes
> default=DC1:RAC1
> 
> # all known nodes
>   10.11.1.108=DC1:RAC1
>   10.11.1.109=DC1:RAC2
>   10.11.1.200=DC1:RAC3
> 
> Cheers,
> Gabi
> 
> 
> 
> 
> 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? 
>> 
>> Cheers
>> 
>> -----------------
>> Aaron Morton
>> Freelance Cassandra Developer
>> New Zealand
>> 
>> @aaronmorton
>> http://www.thelastpickle.com
>> 
>> On 25/01/2013, at 9:39 AM, Gabriel Ciuloaica <gc...@gmail.com> wrote:
>> 
>>> Hi Tyler,
>>> 
>>> 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)):
>>> 
>>> 1. launch cqlsh and create the keyspace
>>> 
>>> create keyspace foo with replication= {'class':'NetworkTopologyStrategy','DC1':3};
>>> 
>>> 2. exit cqlsh, run
>>> 
>>> nodetool describering foo
>>> 
>>> you'll see something like this:
>>> 
>>> TokenRange(start_token:2318224911779291128, end_token:2351629206880900296, endpoints:[], rpc_endpoints:[], endpoint_details:[])
>>> TokenRange(start_token:-8291638263612363845, end_token:-8224756763869823639, endpoints:[], rpc_endpoints:[], endpoint_details:[])
>>> 
>>> 3. start  cqlsh, 
>>> 
>>> drop keyspace foo;
>>> 
>>> 4. Exit cqlsh, start cassandra-cli
>>> create keyspace foo with placement_strategy = 'NetworkTopologyStrategy' AND strategy_options={DC1};
>>> 
>>> if you run nodetool describering foo you'll see:
>>> 
>>>     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)])
>>> 
>>> Br,
>>> Gabi
>>> 
>>> 
>>> On 1/24/13 10:22 PM, Tyler Hobbs wrote:
>>>> Gabriel,
>>>> 
>>>> 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?
>>>> 
>>>> 
>>>> On Thu, Jan 24, 2013 at 1:57 PM, Gabriel Ciuloaica <gc...@gmail.com> 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.
>>>> 
>>>> Thanks,
>>>> Gabi
>>>> 
>>>> 
>>>> On 1/24/13 9:21 PM, Ivan Velykorodnyy wrote:
>>>>> Hi,
>>>>> 
>>>>> Astyanax is not 1.2 compatible yet https://github.com/Netflix/astyanax/issues/191
>>>>> Eran planned to make it in 1.57.x
>>>>> 
>>>>> четверг, 24 января 2013 г. пользователь Gabriel Ciuloaica писал:
>>>>> Hi,
>>>>> 
>>>>> 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.
>>>>> 
>>>>> So, after the cluster was up and running:
>>>>> [me@cassandra-node1 cassandra]$ nodetool status
>>>>> Datacenter: DC-1
>>>>> ======================
>>>>> Status=Up/Down
>>>>> |/ State=Normal/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
>>>>> 
>>>>> I went to create the keyspace:
>>>>> 1. First I have tried using cqlsh:
>>>>> create keyspace foo with replication= {'class':'NetworkTopologyStrategy','DC1':3};
>>>>> 
>>>>> after this, I have checked that the keyspace was properly created by running 
>>>>> 
>>>>> 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"}
>>>>> 
>>>>> but if I run nodetool describering foo, it will not show anything into endpoint, or endpoint_details fields.
>>>>> 
>>>>> In this situation, Astyanax client will throw exception with NoAvailableHostsException. I have used following configuration:
>>>>> withAstyanaxConfiguration(new AstyanaxConfigurationImpl()
>>>>>       
>>>>>         
>>>>> .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
>>>>> 
>>>>>         
>>>>> .setConnectionPoolType(ConnectionPoolType.TOKEN_AWARE)
>>>>> 
>>>>> First option did not worked at all.
>>>>> 
>>>>> 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.
>>>>> 
>>>>> Hope it will avoid others to avoid spending time to figure out how to go around this issue.
>>>>> 
>>>>> Br,
>>>>> Gabi
>>>> 
>>>> 
>>>> 
>>>> 
>>>> -- 
>>>> Tyler Hobbs
>>>> DataStax
>>> 
>> 
> 


Re: Issues with CQLSH in Cassandra 1.2

Posted by Gabriel Ciuloaica <gc...@gmail.com>.
Hi Aaron,

I'm using PropertyFileSnitch, an my cassandra-topology.propertis looks 
like this:

/# Cassandra Node IP=Data Center:Rack//
//
//# default for unknown nodes//
//default=DC1:RAC1//
//
//# all known nodes//
//  10.11.1.108=DC1:RAC1//
//  10.11.1.109=DC1:RAC2//
//  10.11.1.200=DC1:RAC3

/Cheers,
Gabi/
////
/


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?
>
> Cheers
>
> -----------------
> Aaron Morton
> Freelance Cassandra Developer
> New Zealand
>
> @aaronmorton
> http://www.thelastpickle.com
>
> On 25/01/2013, at 9:39 AM, Gabriel Ciuloaica <gciuloaica@gmail.com 
> <ma...@gmail.com>> wrote:
>
>> Hi Tyler,
>>
>> 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)):
>>
>> 1. launch cqlsh and create the keyspace
>>
>> create keyspace foo with replication= 
>> {'class':'NetworkTopologyStrategy','DC1':3};
>>
>> 2. exit cqlsh, run
>>
>> nodetool describering foo
>>
>> you'll see something like this:
>>
>> TokenRange(start_token:2318224911779291128, 
>> end_token:2351629206880900296, endpoints:[], rpc_endpoints:[], 
>> endpoint_details:[])
>> TokenRange(start_token:-8291638263612363845, 
>> end_token:-8224756763869823639, endpoints:[], rpc_endpoints:[], 
>> endpoint_details:[])
>>
>> 3. start  cqlsh,
>>
>> drop keyspace foo;
>>
>> 4. Exit cqlsh, start cassandra-cli
>> create keyspace foo with placement_strategy = 
>> 'NetworkTopologyStrategy' AND strategy_options={DC1};
>>
>> if you run nodetool describering foo you'll see:
>>
>>     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)])
>>
>> Br,
>> Gabi
>>
>>
>> On 1/24/13 10:22 PM, Tyler Hobbs wrote:
>>> Gabriel,
>>>
>>> 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?
>>>
>>>
>>> On Thu, Jan 24, 2013 at 1:57 PM, Gabriel Ciuloaica 
>>> <gciuloaica@gmail.com <ma...@gmail.com>> 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.
>>>
>>>     Thanks,
>>>     Gabi
>>>
>>>
>>>     On 1/24/13 9:21 PM, Ivan Velykorodnyy wrote:
>>>>     Hi,
>>>>
>>>>     Astyanax is not 1.2 compatible yet
>>>>     https://github.com/Netflix/astyanax/issues/191
>>>>     Eran planned to make it in 1.57.x
>>>>
>>>>     четверг, 24 января 2013 г. пользователь Gabriel Ciuloaica писал:
>>>>
>>>>         Hi,
>>>>
>>>>         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.
>>>>
>>>>         So, after the cluster was up and running:
>>>>         [me@cassandra-node1 cassandra]$ nodetool status
>>>>         Datacenter: DC-1
>>>>         ======================
>>>>         Status=Up/Down
>>>>         |/ State=Normal/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
>>>>
>>>>         I went to create the keyspace:
>>>>         1. First I have tried using cqlsh:
>>>>         create keyspace foo with replication=
>>>>         {'class':'NetworkTopologyStrategy','DC1':3};
>>>>
>>>>         after this, I have checked that the keyspace was properly
>>>>         created by running
>>>>
>>>>         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"}
>>>>
>>>>         but if I run nodetool describering foo, it will not show
>>>>         anything into endpoint, or endpoint_details fields.
>>>>
>>>>         In this situation, Astyanax client will throw exception
>>>>         with /NoAvailableHostsException/. I have used following
>>>>         configuration:
>>>>
>>>>         withAstyanaxConfiguration(new  AstyanaxConfigurationImpl()       
>>>>                  .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
>>>>                  .setConnectionPoolType(ConnectionPoolType.TOKEN_AWARE)
>>>>
>>>>
>>>>         First option did not worked at all.
>>>>
>>>>         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.
>>>>
>>>>         Hope it will avoid others to avoid spending time to figure
>>>>         out how to go around this issue.
>>>>
>>>>         Br,
>>>>         Gabi
>>>>
>>>
>>>
>>>
>>>
>>> -- 
>>> Tyler Hobbs
>>> DataStax <http://datastax.com/>
>>
>


Re: Issues with CQLSH in Cassandra 1.2

Posted by aaron morton <aa...@thelastpickle.com>.
Can you provide details of the snitch configuration and the number of nodes you have? 

Cheers

-----------------
Aaron Morton
Freelance Cassandra Developer
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 25/01/2013, at 9:39 AM, Gabriel Ciuloaica <gc...@gmail.com> wrote:

> Hi Tyler,
> 
> 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)):
> 
> 1. launch cqlsh and create the keyspace
> 
> create keyspace foo with replication= {'class':'NetworkTopologyStrategy','DC1':3};
> 
> 2. exit cqlsh, run
> 
> nodetool describering foo
> 
> you'll see something like this:
> 
> TokenRange(start_token:2318224911779291128, end_token:2351629206880900296, endpoints:[], rpc_endpoints:[], endpoint_details:[])
> TokenRange(start_token:-8291638263612363845, end_token:-8224756763869823639, endpoints:[], rpc_endpoints:[], endpoint_details:[])
> 
> 3. start  cqlsh, 
> 
> drop keyspace foo;
> 
> 4. Exit cqlsh, start cassandra-cli
> create keyspace foo with placement_strategy = 'NetworkTopologyStrategy' AND strategy_options={DC1};
> 
> if you run nodetool describering foo you'll see:
> 
>     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)])
> 
> Br,
> Gabi
> 
> 
> On 1/24/13 10:22 PM, Tyler Hobbs wrote:
>> Gabriel,
>> 
>> 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?
>> 
>> 
>> On Thu, Jan 24, 2013 at 1:57 PM, Gabriel Ciuloaica <gc...@gmail.com> 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.
>> 
>> Thanks,
>> Gabi
>> 
>> 
>> On 1/24/13 9:21 PM, Ivan Velykorodnyy wrote:
>>> Hi,
>>> 
>>> Astyanax is not 1.2 compatible yet https://github.com/Netflix/astyanax/issues/191
>>> Eran planned to make it in 1.57.x
>>> 
>>> четверг, 24 января 2013 г. пользователь Gabriel Ciuloaica писал:
>>> Hi,
>>> 
>>> 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.
>>> 
>>> So, after the cluster was up and running:
>>> [me@cassandra-node1 cassandra]$ nodetool status
>>> Datacenter: DC-1
>>> ======================
>>> Status=Up/Down
>>> |/ State=Normal/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
>>> 
>>> I went to create the keyspace:
>>> 1. First I have tried using cqlsh:
>>> create keyspace foo with replication= {'class':'NetworkTopologyStrategy','DC1':3};
>>> 
>>> after this, I have checked that the keyspace was properly created by running 
>>> 
>>> 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"}
>>> 
>>> but if I run nodetool describering foo, it will not show anything into endpoint, or endpoint_details fields.
>>> 
>>> In this situation, Astyanax client will throw exception with NoAvailableHostsException. I have used following configuration:
>>> withAstyanaxConfiguration(new AstyanaxConfigurationImpl()      
>>>         .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
>>>         .setConnectionPoolType(ConnectionPoolType.TOKEN_AWARE)
>>> 
>>> First option did not worked at all.
>>> 
>>> 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.
>>> 
>>> Hope it will avoid others to avoid spending time to figure out how to go around this issue.
>>> 
>>> Br,
>>> Gabi
>> 
>> 
>> 
>> 
>> -- 
>> Tyler Hobbs
>> DataStax
> 


Re: Issues with CQLSH in Cassandra 1.2

Posted by Gabriel Ciuloaica <gc...@gmail.com>.
Hi Tyler,

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)):

1. launch cqlsh and create the keyspace

create keyspace foo with replication= 
{'class':'NetworkTopologyStrategy','DC1':3};

2. exit cqlsh, run

nodetool describering foo

you'll see something like this:

TokenRange(start_token:2318224911779291128, 
end_token:2351629206880900296, endpoints:[], rpc_endpoints:[], 
endpoint_details:[])
TokenRange(start_token:-8291638263612363845, 
end_token:-8224756763869823639, endpoints:[], rpc_endpoints:[], 
endpoint_details:[])

3. start  cqlsh,

drop keyspace foo;

4. Exit cqlsh, start cassandra-cli
create keyspace foo with placement_strategy = 'NetworkTopologyStrategy' 
AND strategy_options={DC1};

if you run nodetool describering foo you'll see:

     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)])

Br,
Gabi


On 1/24/13 10:22 PM, Tyler Hobbs wrote:
> Gabriel,
>
> 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?
>
>
> On Thu, Jan 24, 2013 at 1:57 PM, Gabriel Ciuloaica 
> <gciuloaica@gmail.com <ma...@gmail.com>> 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.
>
>     Thanks,
>     Gabi
>
>
>     On 1/24/13 9:21 PM, Ivan Velykorodnyy wrote:
>>     Hi,
>>
>>     Astyanax is not 1.2 compatible yet
>>     https://github.com/Netflix/astyanax/issues/191
>>     Eran planned to make it in 1.57.x
>>
>>     четверг, 24 января 2013 г. пользователь Gabriel Ciuloaica писал:
>>
>>         Hi,
>>
>>         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.
>>
>>         So, after the cluster was up and running:
>>         [me@cassandra-node1 cassandra]$ nodetool status
>>         Datacenter: DC-1
>>         ======================
>>         Status=Up/Down
>>         |/ State=Normal/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
>>
>>         I went to create the keyspace:
>>         1. First I have tried using cqlsh:
>>         create keyspace foo with replication=
>>         {'class':'NetworkTopologyStrategy','DC1':3};
>>
>>         after this, I have checked that the keyspace was properly
>>         created by running
>>
>>         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"}
>>
>>         but if I run nodetool describering foo, it will not show
>>         anything into endpoint, or endpoint_details fields.
>>
>>         In this situation, Astyanax client will throw exception with
>>         /NoAvailableHostsException/. I have used following configuration:
>>
>>         withAstyanaxConfiguration(new  AstyanaxConfigurationImpl()       
>>                  .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
>>                  .setConnectionPoolType(ConnectionPoolType.TOKEN_AWARE)
>>
>>
>>         First option did not worked at all.
>>
>>         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.
>>
>>         Hope it will avoid others to avoid spending time to figure
>>         out how to go around this issue.
>>
>>         Br,
>>         Gabi
>>
>
>
>
>
> -- 
> Tyler Hobbs
> DataStax <http://datastax.com/>


Re: Issues with CQLSH in Cassandra 1.2

Posted by Tyler Hobbs <ty...@datastax.com>.
Gabriel,

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?


On Thu, Jan 24, 2013 at 1:57 PM, Gabriel Ciuloaica <gc...@gmail.com>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.
>
> Thanks,
> Gabi
>
>
> On 1/24/13 9:21 PM, Ivan Velykorodnyy wrote:
>
> Hi,
>
>  Astyanax is not 1.2 compatible yet
> https://github.com/Netflix/astyanax/issues/191
> Eran planned to make it in 1.57.x
>
> четверг, 24 января 2013 г. пользователь Gabriel Ciuloaica писал:
>
>>  Hi,
>>
>> 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.
>>
>> So, after the cluster was up and running:
>> [me@cassandra-node1 cassandra]$ nodetool status
>> Datacenter: DC-1
>> ======================
>> Status=Up/Down
>> |/ State=Normal/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
>>
>> I went to create the keyspace:
>> 1. First I have tried using cqlsh:
>> create keyspace foo with replication=
>> {'class':'NetworkTopologyStrategy','DC1':3};
>>
>> after this, I have checked that the keyspace was properly created by
>> running
>>
>> 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"}
>>
>> but if I run nodetool describering foo, it will not show anything into
>> endpoint, or endpoint_details fields.
>>
>> In this situation, Astyanax client will throw exception with *
>> NoAvailableHostsException*. I have used following configuration:
>>
>> withAstyanaxConfiguration(new AstyanaxConfigurationImpl()
>>         .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
>>         .setConnectionPoolType(ConnectionPoolType.TOKEN_AWARE)
>>
>>
>> First option did not worked at all.
>>
>> 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.
>>
>> Hope it will avoid others to avoid spending time to figure out how to go
>> around this issue.
>>
>> Br,
>> Gabi
>>
>
>


-- 
Tyler Hobbs
DataStax <http://datastax.com/>

Re: Issues with CQLSH in Cassandra 1.2

Posted by Gabriel Ciuloaica <gc...@gmail.com>.
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.

Thanks,
Gabi

On 1/24/13 9:21 PM, Ivan Velykorodnyy wrote:
> Hi,
>
> Astyanax is not 1.2 compatible yet 
> https://github.com/Netflix/astyanax/issues/191
> Eran planned to make it in 1.57.x
>
> четверг, 24 января 2013 г. пользователь Gabriel Ciuloaica писал:
>
>     Hi,
>
>     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.
>
>     So, after the cluster was up and running:
>     [me@cassandra-node1 cassandra]$ nodetool status
>     Datacenter: DC-1
>     ======================
>     Status=Up/Down
>     |/ State=Normal/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
>
>     I went to create the keyspace:
>     1. First I have tried using cqlsh:
>     create keyspace foo with replication=
>     {'class':'NetworkTopologyStrategy','DC1':3};
>
>     after this, I have checked that the keyspace was properly created
>     by running
>
>     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"}
>
>     but if I run nodetool describering foo, it will not show anything
>     into endpoint, or endpoint_details fields.
>
>     In this situation, Astyanax client will throw exception with
>     /NoAvailableHostsException/. I have used following configuration:
>
>     withAstyanaxConfiguration(new  AstyanaxConfigurationImpl()       
>              .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
>              .setConnectionPoolType(ConnectionPoolType.TOKEN_AWARE)
>
>
>     First option did not worked at all.
>
>     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.
>
>     Hope it will avoid others to avoid spending time to figure out how
>     to go around this issue.
>
>     Br,
>     Gabi
>


Re: Issues with CQLSH in Cassandra 1.2

Posted by Ivan Velykorodnyy <iv...@gmail.com>.
Hi,

Astyanax is not 1.2 compatible yet
https://github.com/Netflix/astyanax/issues/191
<https://github.com/Netflix/astyanax/issues/191>Eran planned to make it
in 1.57.x

четверг, 24 января 2013 г. пользователь Gabriel Ciuloaica писал:

>  Hi,
>
> 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.
>
> So, after the cluster was up and running:
> [me@cassandra-node1 cassandra]$ nodetool status
> Datacenter: DC-1
> ======================
> Status=Up/Down
> |/ State=Normal/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
>
> I went to create the keyspace:
> 1. First I have tried using cqlsh:
> create keyspace foo with replication=
> {'class':'NetworkTopologyStrategy','DC1':3};
>
> after this, I have checked that the keyspace was properly created by
> running
>
> 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"}
>
> but if I run nodetool describering foo, it will not show anything into
> endpoint, or endpoint_details fields.
>
> In this situation, Astyanax client will throw exception with *
> NoAvailableHostsException*. I have used following configuration:
>
> withAstyanaxConfiguration(new AstyanaxConfigurationImpl()
>         .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE)
>         .setConnectionPoolType(ConnectionPoolType.TOKEN_AWARE)
>
>
> First option did not worked at all.
>
> 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.
>
> Hope it will avoid others to avoid spending time to figure out how to go
> around this issue.
>
> Br,
> Gabi
>