错误:无法连接到cassandra服务器。未配置表 [英] Error: unable to connect to cassandra server. Unconfigured table

查看:122
本文介绍了错误:无法连接到cassandra服务器。未配置表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用此简单代码通过python的cassandra-driver连接到在本地桌面上运行的cassandra。

I am trying to connect to cassandra, which is running on local desktop, via cassandra-driver for python using this simple code.

 from cassandra.cluster import Cluster
 cluster = Cluster()
 session = cluster.connect()

并显示此错误: NoHostAvailable:('无法连接到任何服务器',{'127.0.0.1':InvalidRequest(u'code = 2200 [Invalid query] message = unconfigured table schema_keyspaces',)})

and getting this error: NoHostAvailable: ('Unable to connect to any servers', {'127.0.0.1': InvalidRequest(u'code=2200 [Invalid query] message="unconfigured table schema_keyspaces"',)})

从cassandra的日志中,我看到它是如何建立连接的,但是会出现以下错误:

From the logs of cassandra, I see how it does establish connection, but it gets this errors:

DEBUG 05:51:00 Responding: ERROR INVALID: unconfigured table schema_columnfamilies, v=4
DEBUG 05:51:00 Responding: ERROR INVALID: unconfigured table schema_usertypes, v=4
DEBUG 05:51:00 Responding: ERROR INVALID: unconfigured table schema_columns, v=4
DEBUG 05:51:00 Responding: ERROR INVALID: unconfigured table schema_functions, v=4
DEBUG 05:51:00 Responding: ERROR INVALID: unconfigured table schema_aggregates, v=4
DEBUG 05:51:00 Responding: ERROR INVALID: unconfigured table schema_triggers, v=4

对于使用未配置表解决此问题的任何帮助,将不胜感激。

Any help to solve this problem with unconfigured tables will be appreciated.

推荐答案

您是否可能使用驱动程序连接到Cassandra 3.0.0-alpha1?如果是这样,则需要运行通过此提交安装的驱动程序:

Are you possibly using the driver to connect to Cassandra 3.0.0-alpha1? If so, you'd need to be running the driver installed from this commit:

https://github.com/datastax/python-driver/tree/1a480f196ade42798596f5257d2cbeffcadf154f

或者:


  • 如果您只是在进行实验,那么今天发布的驱动程序可以与所有Cassandra 1.2-2.2.0版一起使用

  • DataStax已准备好与Cassandra 3.0.0-alpha1一起使用的3.0.0a1版本驱动程序,它将很快在pypi中提供。

按如下所示安装3.0.0 alpha版本的驱动程序:

install the 3.0.0 alpha version of the driver as follows:

pip install --pre cassandra-driver

pip install --pre cassandra-driver

pip install --pre --upgrade cassandra-driver

pip install --pre --upgrade cassandra-driver

这篇关于错误:无法连接到cassandra服务器。未配置表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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