question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Usage of replication_factor > 1

See original GitHub issue

Maybe, it isn’t an issue, but misconfiguration or incorrect usage of replication.

cassandra-migrate-abc.yml

keyspace: abc
profiles:
  dev:
    replication:
      class: SimpleStrategy
      replication_factor: 2
migrations_path: ./migrations-abc

migrations-abc/v001-users.cql

CREATE TABLE abc.users (
    user_id text PRIMARY KEY,
    email text,
    first_name text,
    last_name text,
    phone text,
    roles text,
    status text,
    pwd_salt text,
    pwd_hash text
);

cassandra-migrate -H docker-dev -c cassandra-migrate-abc.yml -m dev migrate

And result:

Traceback (most recent call last):
  File "/usr/local/bin/cassandra-migrate", line 18, in <module>
    main()
  File "/Library/Python/2.7/site-packages/cassandra_migrate/cli.py", line 99, in main
    cmd_method(opts)
  File "/Library/Python/2.7/site-packages/cassandra_migrate/migrator.py", line 461, in migrate
    ignore_failed=opts.force)
  File "/Library/Python/2.7/site-packages/cassandra_migrate/migrator.py", line 263, in _verify_migrations
    'SELECT * FROM "{keyspace}"."{table}"'))
  File "/Library/Python/2.7/site-packages/cassandra_migrate/migrator.py", line 195, in _execute
    return self.session.execute(query, *args, **kwargs)
  File "cassandra/cluster.py", line 2016, in cassandra.cluster.Session.execute (cassandra/cluster.c:35491)
  File "cassandra/cluster.py", line 3826, in cassandra.cluster.ResponseFuture.result (cassandra/cluster.c:74365)
cassandra.cluster.NoHostAvailable: ('Unable to complete the operation against any hosts', {<Host: 10.133.0.20 europe-west1>: Unavailable('Error from server: code=1000 [Unavailable exception] message="Cannot achieve consistency level ALL" info={\'required_replicas\': 2, \'alive_replicas\': 1, \'consistency\': \'ALL\'}',)})

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
holgerwcommented, Jul 13, 2017

@sierpito does your Cassandra development cluster consiste of 2+ nodes? I am not 100% sure, but it should be correct for Cassandra to fail with a keyspace creation, if the demanded replication_factor is larger then the number of nodes.

0reactions
sierpitocommented, Jul 14, 2017

Thank you. Closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How does Replication Factor works in Kafka? - eduCBA
Replication Factor in Kafka is basically the multiple copies of data over the multiple brokers. Replication is done to ensure the high availability...
Read more >
Kafka Replication Factor: A Comprehensive Guide - Hevo Data
Apache Kafka uses the concept of data replication to ensure high availability of data at all times via the Replication Factor Kafka.
Read more >
About Cassandra Replication Factor and Consistency Level
A replication factor of one means that there is only one copy of each row in the Cassandra cluster. A replication factor of...
Read more >
Replication Factor - ScyllaDB University
The Replication Factor (RF) is equivalent to the number of nodes where data (rows and partitions) are replicated. Data is replicated to multiple...
Read more >
Kafka Topic Replication - javatpoint
A replication factor is the number of copies of data over multiple brokers. The replication factor value should be greater than 1 always...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found