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
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • 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
    • Tutorials
    • 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
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • 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
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Cassandra – TLS – NoHostAvailableException

Solved1.54K 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

You are viewing 1 out of 3 answers, click here to view all answers.
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

Recent questions

How to implement bearer token refresh? 0 Answers | 2 Votes
Web Applications exception in Cube due to invalid certificate 0 Answers | 1 Vote
Redundancy Groups and Alarming – Duplicate Alarms 0 Answers | 0 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (151) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
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

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin