Question

I am trying to increase my replication factor in cassandra because it is neccesary for security related reasons according to:

http://www.datastax.com/docs/datastax_enterprise3.0/security/security_keyspace_replication#security-keyspace-replication

When I do the command:

ALTER KEYSPACE "system_auth" WITH REPLICATION { 'class' : 'SimpleStrategy', 'replication_factor' : 2}; 

I get the error:

Bad Request: line 1:46 missing '=' at {

Does someone know why this is? I am confused about this

Was it helpful?

Solution

alter KEYSPACE system_auth WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 2};

http://cassandra.apache.org/doc/cql3/CQL.html#createKeyspaceStmt

OTHER TIPS

I was receiving similar errors, and here are the steps I went through to get things working for me.

A little about my setup: running four Cassandra servers in AWS. They're named (unoriginally) cass1 through cass4.

  1. Changed cassandra.yaml on cass1. I set authenticator: PasswordAuthenticator and authorizer: CassandraAuthorizer.
  2. Restarted Cassandra on cass1.
  3. Logged in using cqlsh -u cassandra -p cassandra
  4. Ran a different ALTER TABLE than @mikhail-stepura recommended. I used: alter KEYSPACE system_auth WITH replication = { 'class' : 'NetworkTopologyStrategy', 'us-east' : 4};
    • Running his, I found that I couldn't authenticate on cass2 through cass4. I would get one of two error messages: either
      • Connection error: ('Unable to connect to any servers', {'127.0.0.1': AuthenticationFailed(u'Failed to authenticate to 127.0.0.1: code=0100 [Bad credentials] message="org.apache.cassandra.exceptions.UnavailableException: Cannot achieve consistency level QUORUM"',)}) or
      • Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, 'ECONNREFUSED')})
  5. I duplicated my changes to cassandra.yaml on cass2 through cass4, and restarted Cassandra on each server.
  6. Voila! I could log in to Cassandra on all servers.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top