我目前正在用c编写datastax cpp驱动程序,在处理一些示例时遇到了一个非常小的问题。在这里尝试执行基本的身份验证脚本时,我发现出现了这个错误,代码执行被卡住了。
错误:
1587040775.210 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.3 because of the following error: Underlying connection error: Connect error 'connection refused'
1587040775.210 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.2 because of the following error: Underlying connection error: Connect error 'connection refused'
1587040775.211 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.1 because of the following error: Underlying connection error: Received error response 'Invalid or unsupported protocol version (66); supported versions are (3/v3, 4/v4, 5/v5-beta)' (0x0200000A)
1587040775.211 [WARN] (cluster_connector.cpp:289:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Host 127.0.0.1 does not support protocol version DSEv2. Trying protocol version DSEv1...
1587040775.212 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.1 because of the following error: Underlying connection error: Received error response 'Invalid or unsupported protocol version (65); supported versions are (3/v3, 4/v4, 5/v5-beta)' (0x0200000A)
1587040775.212 [WARN] (cluster_connector.cpp:289:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Host 127.0.0.1 does not support protocol version DSEv1. Trying protocol version v4...
我的机器不支持哪些协议?还有,在最后一次警告之后 trying protocol v4
它卡住了。我使用的是casssandra 3.10+,cpp驱动程序2.13。
任何有解决方法或解决方案的人都会很有帮助。提前谢谢
1条答案
按热度按时间yb3bgrhw1#
我已经找了一大堆文件来支持这一点,但我找不到任何,所以这部分是猜测。服务器版本3似乎使用协议v3。看起来服务器版本4(仍处于测试阶段)将使用协议v4。我怀疑v5是一个正在计划中的未来的迭代,但还没有用石头写出来(为什么在警告中它被标记为beta)。
这部分不是猜测。如果在连接到群集之前将此添加到代码中:
所有关于降级到不同协议的警告都应该消失。