ubuntu - DSBulk 加载程序 1.8 版:加载和连接到 Apache Cassandra 时出错
问题描述
我手动安装了 Apache Cassandra 和 DSBulk 加载程序,一切正常,但是当我尝试使用 DSBulk 加载数据时,似乎是 db 和 DSBulk 之间的连接问题。有人可以告诉我发生了什么,我该如何解决?奇怪,第一次看到这个错误。直到今天,这从未发生在我身上。
这里的错误:
dsbulk load -url test.csv -k key1 -t tab1 -delim "," -header false
Operation directory: /home/User/Desktop/logs/LOAD_20210505-115826-488329
[driver] Error connecting to Node(endPoint=/127.0.0.1:9042, hostId=null, hashCode=73f04b1b), trying next node (ConnectionInitException: [driver|control|id: 0x435f7dc8, L:/127.0.0.1:57946 - R:/127.0.0.1:9042] Protocol initialization request, step 1 (OPTIONS): unexpected failure (java.lang.IllegalArgumentException: Unsupported request opcode: 0 in protocol 6))
Operation LOAD_20210505-115826-488329 failed: Could not reach any contact point, make sure you've provided valid addresses (showing first 1 nodes, use getAllErrors() for more): Node(endPoint=/127.0.0.1:9042, hostId=null, hashCode=73f04b1b): [com.datastax.oss.driver.api.core.connection.ConnectionInitException: [driver|control|id: 0x435f7dc8, L:/127.0.0.1:57946 - R:/127.0.0.1:9042] Protocol initialization request, step 1 (OPTIONS): unexpected failure (java.lang.IllegalArgumentException: Unsupported request opcode: 0 in protocol 6)].
Suppressed: [driver|control|id: 0x435f7dc8, L:/127.0.0.1:57946 - R:/127.0.0.1:9042] Protocol initialization request, step 1 (OPTIONS): unexpected failure (java.lang.IllegalArgumentException: Unsupported request opcode: 0 in protocol 6).
Caused by: Unsupported request opcode: 0 in protocol 6.
尝试重新安装 DSBulk 后,它仍然存在。也许是java发生了什么?
我认为这是第一次发帖,这个问题很麻烦。
谢谢
根据收到的第一个答案
nodetool 状态正常
数据中心:datacenter1
|/ State=Normal/Leaving/Joining/Moving -- Address Load Tokens Owns (effective) Host ID Rack UN 127.0.0.1 139,99 KiB 16 100,0% b3d1b971-59e0-43c7-9392-8dfe1fc2fdeb rack1```
listen_address 和 rpc_address 都是:localhost
解决方案
所以当我看到这样的事情时:
Error connecting to Node(endPoint=/127.0.0.1:9042
...几乎总是因为两件事之一。
节点未运行。用 验证
nodetool status
。本地节点上的
cassandra.yaml
具有listen_address
或未rpc_address
设置为localhost
。请注意,一旦 Cassandra 正在侦听特定 IP,尝试使用localhost
(甚至在本地)访问它将会失败。所以仔细检查地址,然后尝试。
编辑:
我认为你遇到了这个:
https://datastax-oss.atlassian.net/browse/JAVA-2936
无论哪种方式,这都需要明确设置本机协议版本:
advanced.protocol.version=V5
推荐阅读
- matlab - 是否可以在没有深度学习工具箱的情况下将 KERAS 模型导入 Matlab?
- docker - Docker 容器无法在 localhost 和同一网段中访问
- flutter - 如何使用 Flutter 从 Amplify Datastore 中的关系中检索数据
- python-3.x - 如何在 5 个元组中的元组列表中随机将变量质量更改为正负 delta
- c# - 改变 C# 中的事件的可见性?
- flutter - Flutter/Dart 从 JSON 中获取键的所有值
- mysql - 将信息从表添加到另一个
- java - Maven API search doesn't retrieve Google dependcies
- node.js - 缺少 `pino-pretty` 模块:`pino-pretty` 必须单独安装
- c# - 我使用用户帐户安全性在 Visual Studio 2022 中创建了一个新的 mvc 项目,但我使用了数据库脚手架命令来获取表