Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

pramod.dba31_92912 avatar image
pramod.dba31_92912 asked Erick Ramirez answered

Cannot connect to DSE cluster with encryption enabled using cqlsh, getting "[SSL: WRONG_VERSION_NUMBER] wrong version number"

DSE version being used: 6.0.13

Java Version:

-bash-4.2$ java -version
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)

Getting error:

-bash-4.2$ cqlsh `hostname -i` --ssl
Connection error: ('Unable to connect to any servers', {'10.136.54.246:9142': error(1, u"Tried connecting to [('10.136.54.246', 9142)]. Last error: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:618)")})

Debug message:

-bash-4.2$ cqlsh `hostname -i` --ssl --debug
Using CQL driver: <module 'dse' from '/usr/share/dse/cassandra/lib/dse-driver-internal-only-2.11.1.zip/dse-driver-2.11.1/dse/__init__.py'>
Using connect timeout: 5 seconds
Using 'utf-8' encoding
Using ssl: True
Attempted to use DSEGSSAPIAuthProvider(service=dse, qops=auth)
    Attempt failed because: The kerberos library has not been installed
Connection error: ('Unable to connect to any servers', {'10.136.54.246:9142': error(1, u"Tried connecting to [('10.136.54.246', 9142)]. Last error: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:618)")})
dseencryption
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered

The WRONG_VERSION_NUMBER indicates that your cluster is configured with TLS version 1.2.

cqlsh connects to clusters using the Python SSL library and you need to configure your cqlshrc file to use the TLS protocol which is SSL version SSLv23:

[ssl]
version = SSLv23

If you're still running into issues, please log a ticket with DataStax Support so one of our engineers can take a look at your configuration. Cheers!

Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.