我的笔记本电脑上有一个基本的 cassandra 设置,它启动了,我可以使用命令行工具连接到它,但是在 java 中,以下失败:
Cluster cluster = new Cluster.Builder().addContactPoints("localhost").withPort(9160).build();
任何线索都会非常有帮助,谢谢!错误是:
com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: localhost/127.0.0.1 ([localhost/127.0.0.1] Unexpected error during transport initialization (com.datastax.driver.core.TransportException: [localhost/127.0.0.1] Channel has been closed)))
at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:186)