Getting "unable to complete the request: one or more nodes were unavailable" when executing the insert statement using cqlsh

I'm trying to paste with a new installation of Cassandra 2, and although I was able to configure the new keyspace and table just, I get the eror mentioned above when I try to paste.

I don't have any fancy setup of multiple servers, it just starts up one computer with test db, so my confusion with node configuration

Commands used to create the specified elements:

CREATE KEYSPACE demodb WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'DC1' : 3 };
USE demodb;
CREATE TABLE users (user_name varchar, state varchar, birth_year bigint, PRIMARY KEY (user_name));
INSERT INTO users (user_name, state, birth_year) VALUES ('canadiancreed', 'PA', 1976);
+4
source share
2 answers
CREATE KEYSPACE demodb WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'DC1' : 3 };

, . , demodb DC1 3 . node DC1, . , DC1, 1, , acknolegdment.

, - ( nodetool), . , , .

---- ----

, Cassandra. , . , - . , .

- , . Keyspace , . NetworkTopologyStrategy, basat basat. ( ), " ... ".

, Keyspace "DC1", 3 . , 3 DC1, . , Cassandra. , C * yaml.

nodetool , node . C * .

Datacenter: Cassandra
=====================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load       Owns (effective)  Host ID                               Token                                    Rack
UN  127.0.0.1  93.37 KB   100.0%            50be3bec-7e30-4385-bd4a-918055a29292  4731866028208108826                      rack1

, node, "Cassandra". , , , , , . ( , , , DC , , , , .)

, ,

cqlsh:demodb> ALTER KEYSPACE demodb WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'Cassandra' : 1 };

demoDB 1 Cassandra. beacuase, nodetool, node Cassandra. , .

cqlsh:demodb> INSERT INTO users (user_name, state, birth_year) VALUES ('canadiancreed', 'PA', 1976);
cqlsh:demodb> select * from users where user_name = 'canadiancreed' ;

 user_name     | birth_year | state
---------------+------------+-------
 canadiancreed |       1976 |    PA

(1 rows)

script,

CREATE KEYSPACE demodb WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'Cassandra' : 1 };
+24

Google, , , ALL ( QUORUM ), .

.

( : , ).

+1

Source: https://habr.com/ru/post/1530762/


All Articles