插入数据时出错:NoHostAvailable: [英] Error during inserting data: NoHostAvailable:

查看:126
本文介绍了插入数据时出错:NoHostAvailable:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试学习Apache Cassandra的基础知识。我在



到目前为止,我一直在尝试更新python驱动程序( NoHostAvailable异常从python连接到Cassandra ),但它没有



我做错了什么?还是cqlsh有问题?

解决方案

确定。我找到了答案。 NetworkTopologyStrategy不适合在单个节点上运行。在SimpleStrategy上更改复制策略后,一切开始起作用。


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.

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?

解决方案

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.

这篇关于插入数据时出错:NoHostAvailable:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆