无法将CQL连接到Cassandra 2.0.10

无法将CQL连接到Cassandra 2.0.10,cassandra,cql,cassandra-2.0,cql3,datastax,Cassandra,Cql,Cassandra 2.0,Cql3,Datastax,在服务器配置中,我禁用了thrift(start\u rpc:false),因为这可能是遗留的。服务器启动正常: INFO 12:23:09658开始在localhost/127.0.0.1:9042上侦听CQL客户端。。。 信息12:23:09668未按请求启动RPC服务器。使用JMX(StorageService->startRPCServer())或nodetool(enablethrift)启动它 如果我随后尝试启动CQL,则会出现以下错误: C:\Program Files\Data

在服务器配置中,我禁用了thrift(
start\u rpc:false
),因为这可能是遗留的。服务器启动正常:

INFO 12:23:09658开始在localhost/127.0.0.1:9042上侦听CQL客户端。。。
信息12:23:09668未按请求启动RPC服务器。使用JMX(StorageService->startRPCServer())或nodetool(enablethrift)启动它

如果我随后尝试启动CQL,则会出现以下错误:

C:\Program Files\DataStax Community\apache cassandra\bin>\cqlsh.bat
连接错误:无法连接到本地主机:9160

端口9160是旧货港。我假设CQL应该在本机格式上运行

如果我尝试强制端口:

C:\Program Files\DataStax Community\apache cassandra\bin>\cqlsh.bat localhost 9042

我明白了:

回溯(最近一次呼叫最后一次):
文件“C:\Program Files\DataStax Community\apache cassandra\bin\..\..\..\apache cassandra\bin\cqlsh”,第2092行,在
main(*读取选项(sys.argv[1:],os.environ))
文件“C:\Program Files\DataStax Community\apache cassandra\bin\..\..\..\apache cassandra\bin\cqlsh”,第2075行,主目录
单个_语句=options.execute)
文件“C:\Program Files\DataStax Community\apache cassandra\bin\..\..\..\apache cassandra\bin\cqlsh”,第490行,在__
密码=密码,cql\u版本=cqlver,传输=传输)
文件“C:\Program Files\DataStax Community\apache cassandra\bin\..\lib\cql-internal-only-1.4.1.zip\cql-1.4.1\cql\connection.py”,第143行,在connect中
文件“C:\Program Files\DataStax Community\apache cassandra\bin\..\lib\cql-internal-only-1.4.1.zip\cql-1.4.1\cql\connection.py”,第59行,在u init中__
文件“C:\Program Files\DataStax Community\apache cassandra\bin\..\lib\cql-internal-only-1.4.1.zip\cql-1.4.1\cql\thrifties.py”,第159行,位于建立连接中
文件“C:\Program Files\DataStax Community\apache cassandra\bin\..\lib\cql-internal-only-1.4.1.zip\cql-1.4.1\cql\cassandra\cassandra.py”,描述版本第1265行
recv\U描述版本中的文件“C:\Program Files\DataStax Community\apache cassandra\bin\..\lib\cql-internal-only-1.4.1.zip\cql-1.4.1\cql\cassandra\cassandra.py”第1275行
readMessageBegin中的文件“C:\Program Files\DataStax Community\apache cassandra\bin\..\lib\thrift-python-internal-only-0.9.1.zip\thrift\protocol\TBinaryProtocol.py”,第126行
文件“C:\Program Files\DataStax Community\apache cassandra\bin\..\lib\thrift-python-internal-only-0.9.1.zip\thrift\protocol\TBinaryProtocol.py”,第206行,在readI32中
文件“C:\Program Files\DataStax Community\apache cassandra\bin\..\lib\thrift-python-internal-only-0.9.1.zip\thrift\transport\tttransport.py”,第63行,readAll格式
伊奥费罗

cqlsh for Cassandra 2.0.x使用节俭与服务器通信


我认为这意味着即使cqlsh声称使用3.1.1版,我也不能真正使用CQL3功能?你可以。cqlsh使用所谓的“cql过度节俭”,我感到困惑。我在别处看到过,这是Jira问题的标题,CQL3数据与节俭不兼容。那么解决方案是什么呢?新的Cassandra版本(v2.2):
start\u native\u transport:true
使用端口9042。并且thrift rpc服务器在默认情况下处于禁用状态(
start\u rpc:false
)。我可以使用CQL3.3:D,默认情况下,cqlsh使用端口9042连接到Cassandra。也就是说,您应该切换到Cassandra 2.2以获得Cassandra的全部功能。