gpt4 book ai didi

java - 为什么我不能连接到 Cassandra

转载 作者:搜寻专家 更新时间:2023-11-01 02:11:29 24 4
gpt4 key购买 nike

<分区>

我的笔记本电脑上有一个基本的 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)

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com