使用C#驱动程序连接到虚拟盒Ubuntu DataStax Cassandra DSE

时间:2013-07-22 23:25:11

标签: datastax-enterprise

我正在尝试使用Windows 7机箱上的Datastax C#客户端驱动程序连接到在虚拟机(Ubuntu)上运行的DSE Cassandra。 这是我的代码:

Cluster _cluster = Cluster.Builder()
                      .WithPort(9042)
                      .AddContactPoint("192.168.1.136")
                      .Build();

我收到此错误:所有尝试查询的主机都出错(尝试过:192.168.1.136)

我认为问题是远程机器(在这种情况下是虚拟盒子)不接受连接。

是否有任何人从Windows 7上的c#驱动程序连接到在虚拟机上运行的远程Ubuntu?

1 个答案:

答案 0 :(得分:5)

终于明白了。在cassandra.yaml上设置rpc_address:192.168.1.136,现在可以正常工作。

相关问题