cassandra连接报错:tried:localhost 127 0 0 1:9042


com datastax driver core exceptions NoHostAvailableException: All host(s) tried for query failed (tried: localhost 127 0 0 1:9042 (com datastax driver core exceptions InvalidQueryException: unconfigured table schema_keyspaces))
我用的是cassandra-3.9版本,出现这个问题是因为连接Cassandra驱动目前只支持到2.x系列版本,而我使用的是3.9。由于Cassandra 3.x版本的所有的meta数据移动到了system_schema,所以后提示找不到keyspace.
解决办法:
第一种是降级,cassandra使用2.2.x或者2.1.x系列的版本
第二种,等spring data支持3.x系列的cassandra
第三种,使用其他的库,如:Achilles 4.1.0 ,driver-mapper 
 

发布了19 篇原创文章 · 获赞 4 · 访问量 17万+

猜你喜欢

转载自blog.csdn.net/u011250186/article/details/105370622
0
今日推荐