DSBulk loader version 1.8 : error in loading and connecting to Apache Cassandra

909 Views Asked by At

I installed Apache Cassandra and DSBulk loader as manual and all it's ok, but when I try to load data with DSBulk it seems to be a problem of connession between the db and the DSBulk. Someone can say to me what happened and how can I solve? That's strange, it's the first time I saw this error. Until today this has never happened to me.

Here the error:

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.

After trying the reinstallation of DSBulk, it still remains. Maybe is it something happen with java?

I think that is the first post about, and the problem is very bothersome.

Thank you

According with the first answer received

  1. The nodetool status is ok

    Datacenter: 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```
    
    
    
  2. both listen_address and rpc_address are : localhost

1

There are 1 best solutions below

5
On

So when I see things like this:

Error connecting to Node(endPoint=/127.0.0.1:9042

...it's almost always because of one of two things.

  1. The node is not running. Validate with nodetool status.

  2. The cassandra.yaml on the local node has a listen_address or rpc_address is not set to localhost. Note that once Cassandra is listening on a specific IP, attempts to reach it using localhost (even locally) will fail. So double-check the address, and try that.

Edit:

I think you're running into this:

https://datastax-oss.atlassian.net/browse/JAVA-2936

Either way, this is going to require explicitly setting the native protocol version:

advanced.protocol.version=V5