Cassandra VirtualBox错误无法建立连接,因为目标机主动拒绝了它
我在VirtualBox上安装了Cassandra,并使用地址连接到C#应用程序,正确的数据中心名称,但仍然会出现错误。我想念和需要检查的东西吗?
public ISession session;
private string IP = "127.0.0.1";
private string Datacenter = "datacenter1";
public ISession getConnect()
{
return session = Cluster.Builder()
.AddContactPoints(IP)
.WithPort(9042)
.WithLoadBalancingPolicy(new DCAwareRoundRobinPolicy(Datacenter))
.Build()
.Connect();
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在Cassandra正在侦听的VirtualBox中检查:NetStat -TLNP | GREP 9042
尝试使用telnet建立连接:telnet< ip-addr> 9042
更多详细信息:
Check in virtualbox where Cassandra is listening: netstat -tlnp | grep 9042
try establish a connection using telnet: telnet <ip-addr> 9042
more detail here:
https://community.datastax.com/questions/9242/native-transport-port-open-or-not.html