Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error during inserting data: NoHostAvailable:

I try to learn basics of Apache Cassandra. I found this simple example of application at https://docs.datastax.com/en/cql/3.1/cql/ddl/ddl_music_service_c.html

So I created a keyspace, then I created a table, and now I am trying to add some data to the database.

But when I try to Insert data I have got an error: "NoHostAvailable:" That's it. No more information.

NoHostAvailable

So far I've tried to update python driver (NoHostAvailable exception connecting to Cassandra from python) but it didn't work.

What I do wrong? Or is it a problem with cqlsh?

like image 956
doubleB Avatar asked Oct 06 '16 20:10

doubleB


1 Answers

OK. I've found the answer. The NetworkTopologyStrategy is not suited for running on a single node. After changing replication strategy on SimpleStrategy everything started to work.

like image 52
doubleB Avatar answered Oct 13 '22 11:10

doubleB