背景

idea中的springboot项目,需要连接Cassandra。但是点击测试连接报错: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.TransportException: [localhost/127.0.0.1:9042] Cannot connect)).
在这里插入图片描述

原因

看其他网友说是Cassandra版本问题,我是单纯因为忘记打开Cassandra服务了。在Cassandra的bin目录下双击cassandra.bat,启动服务,成功

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐