Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Cassandra – TLS – NoHostAvailableException

Solved1.60K views14th February 2023Cassandra certificate TLS
8
Piotr Borowski [DevOps Member]550 1st February 2023 0 Comments

In our Cassandra cluster there is one – the same cert for each node – so for all Cassandra nodes it is one cert with CN: dma-cassandra.comp.local

And I got NoHostAvailableException when I enable TLS communication <TLSEnabled>true</TLSEnabled>

2023/02/01 13:18:57.410|SLDBConnection|CassandraConnection::Connect|ERR|0|1|Cassandra.NoHostAvailableException: All hosts tried for query failed (tried 10.44.222.171:9042: AuthenticationException ‘The remote certificate is invalid according to the validation procedure.’; 10.44.222.172:9042: AuthenticationException ‘The remote certificate is invalid according to the validation procedure.’; …), see Errors property for more info

Can I use one cert with one CN for all DB nodes or each Cassandra node must have separate cert and its CN must always match the machine’s hostname?
Could you please give me a hint regarding this?

====07.02.2023===== I added Wireshark screenshot

Piotr Borowski [DevOps Member] Selected answer as best 14th February 2023

3 Answers

  • Active
  • Voted
  • Newest
  • Oldest
9
Jeremiah Allen [SLC] [DevOps Advocate]704 Posted 1st February 2023 3 Comments

Hey Piotr,

These errors might occur when the IP/hostname of the Cassandra node is not included as a Subject Alternative Name (SAN) in your cert. The SAN field is what is used for verification and using Common Name (CN) to verify certs is deprecated (see RFC 6125).

The typical DB.xml configuration uses IPs, so DataMiner will try and match the IP to a SAN in the cert. If the IP isn’t present verification will fail. You can check your certificate SAN by simply opening the .crt/.cer file and going to the details tab. Or using keytool -printcert and checking the command output for SubjectAlternativeName.

If you find it isn’t present you will have to recreate your certificates and be sure to include -ext “san=ip:<NODE IP>” when creating the keystore and CSR. After this you would continue with the process of signing -> importing your certificates into the keystore. See below example.

Node hostname: node1.skyline.com
Node IP: 10.123.227.35

  1. Generate keystore
    keytool -genkeypair -keyalg RSA -alias node1.skyline.com -keystore node1.jks -storepass PW -keypass PW -validity 365 -keysize 2048 -dname “CN=node1.skyline.com, OU=DMS, O=Skyline, C=US” -ext “san=ip:10.123.227.35”
  2. Generate CSR
    keytool -certreq -keystore node1.jks -alias node1.skyline.com -file node1.csr -keypass PW -storepass PW -ext “san=ip:10.123.227.35”

Regarding using one cert for all nodes, this isn’t recommended. Using one cert for all nodes is less secure than uniquely identifying each node using its own cert.

Hope this helps!

Regards,

Piotr Borowski [DevOps Member] Selected answer as best 14th February 2023
Piotr Borowski [DevOps Member] commented 7th February 2023

Hi Jeremiah,

We have many Cassandra and elastic nodes, we prefer to generate one certificate for all nodes. I did as you said – I added ip of each node to SAN (I put Wireshark screenshot in my post) and I still have problem with dma connection to Cassandra cluster.

SLDBConnection|CassandraConnection::Connect|ERR|0|1|Cassandra.NoHostAvailableException: All hosts tried for query failed (tried 10.x.x.x:9042: AuthenticationException ‘The remote certificate is invalid according to the validation procedure.’;

I will add that using the same certificates, it connects correctly by Datastax dev Center client.

Jeremiah Allen [SLC] [DevOps Advocate] commented 7th February 2023

Hey Piotr,
What does the Cassandra logging (system.log) show regarding connections? Maybe there is a problem with cipher suites between the servers.

Piotr Borowski [DevOps Member] commented 14th February 2023

Hi Jeremiah,
after I set in SAN for each node:
DNSName
IPAddress
it is working fine
thx

BTW
even if I set in
cassandra-env.sh
JVM_OPTS=”$JVM_OPTS -Djavax.net.debug=ssl”
I do not see any handshake with teh DMA client in system.log

4
Michiel Saelen [SLC] [DevOps Enabler]5.63K Posted 1st February 2023 2 Comments

Hi,

I would recommend doing a WireShark capture between the DMA and the Cassandra nodes. From there you will see the certificate that the Cassandra node(s) are sending to DataMiner. Depending on what is configured in your certificate (e.g. alternative names etc.) your certificate will be valid or not. What is used by DataMiner (hostname or IP) should match what is in the certificate.

[EDIT]
Example:

Michiel Saelen [SLC] [DevOps Enabler] Posted new comment 3rd February 2023
Piotr Borowski [DevOps Member] commented 2nd February 2023

Hi Michiel,
thx

at the end of the handshake I got reset

Client -> Server [Client Hello]
Client <- Server [Server Hello]
Client Server [ClientKeyExchange][ChangeCipherSpec]
Client <- Server [ChangeCipherSpec][Encrypted Handshake Message]
Client <- Server [RST, ACK]

I also tried to enable debug info on Cassandra
cassandra-env.sh
JVM_OPTS=”$JVM_OPTS -Djavax.net.debug=ssl”

Michiel Saelen [SLC] [DevOps Enabler] commented 3rd February 2023

Hi Piotr,
I uploaded an example capture where you can see the certificates from the capture. This might help you to identify if the right certificates are used and what is in there.

3
Piotr Borowski [DevOps Member]550 Posted 14th February 2023 0 Comments

At the beginning Jeremiah and Michiel thank you very much, your answer helped me to diagnose this case. Bellow short summary

If we have many cassandra nodes and we want to have one certificate for all nodes, we need add two values in Subject Alternative Name (SAN) for each node:
DNSName
IPAddress

Piotr Borowski [DevOps Member] Answered question 14th February 2023
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs