cql - Trying to login to cassandra's console (cqlsh) and it rejects me -
i trying set user authentication cassandra when had following problem.
first have updated cassandra.yaml
with:
authenticator: passwordauthenticator
then created system_auth keyspace replication_factor of 3 as:
create keyspace system_auth replication = { 'class' : 'simplestrategy', 'replication_factor' : 3};
then re-ran cassandra command:
bin/cassandra
then after that, proceeded , made sure repair node(s) (though not sure if understand why important/necessary):
nodetool repair
even after doing of steps cassandra/java yells @ me with:
traceback (most recent call last): file "/home/tscobb/documents/bm/apache-cassandra-2.0.5/bin/cqlsh", line 2044, in <module> main(*read_options(sys.argv[1:], os.environ)) file "/home/tscobb/documents/bm/apache-cassandra-2.0.5/bin/cqlsh", line 2030, in main display_float_precision=options.float_precision) file "/home/tscobb/documents/bm/apache-cassandra-2.0.5/bin/cqlsh", line 480, in __init__ cql_version=cqlver, transport=transport) file "/home/tscobb/documents/bm/apache-cassandra-2.0.5/bin/../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/connection.py", line 143, in connect file "/home/tscobb/documents/bm/apache-cassandra-2.0.5/bin/../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/connection.py", line 59, in __init__ file "/home/tscobb/documents/bm/apache-cassandra-2.0.5/bin/../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/thrifteries.py", line 157, in establish_connection file "/home/tscobb/documents/bm/apache-cassandra-2.0.5/bin/../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cassandra/cassandra.py", line 465, in login file "/home/tscobb/documents/bm/apache-cassandra-2.0.5/bin/../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cassandra/cassandra.py", line 486, in recv_login cql.cassandra.ttypes.authenticationexception: authenticationexception(why='org.apache.cassandra.exceptions.unavailableexception: cannot achieve consistency level quorum')
honestly, @ point not sure how proceed. if has ideas, appreciated.
i running cassandra 2.0.5 in ubuntu vm. not sure if helps @ all.
also, when run:
nodetool status
the following comes up:
nodetool status datacenter: datacenter1 ======================= status=up/down |/ state=normal/leaving/joining/moving -- address load tokens owns host id rack un 127.0.0.1 1.57 mb 256 100.0% 37ae1d4c-0df5-43d2-9593-4603ac68c34a rack1
'class' : 'simplestrategy', 'replication_factor' : 3
as have 1 node in cluster, setting replication factor of 3 problem. here article describes replication in cassandra. should give quick read through. 1 part in particular applies here:
when replication factor exceeds number of nodes, writes rejected, reads served long desired consistency level can met.
cannot achieve consistency level quorum
cassandra computes "quorum" (replication_factor / 2) + 1. if have replication factor of 3, 2 nodes need running consistency level met.
basically, set replication factor down 1, , should fine.
Comments
Post a Comment