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

satvantsingh_190085 avatar image
satvantsingh_190085 asked ·

Manual NodeSync validation returns "TransportException: [/127.0.0.1:9042] Cannot connect"

[FOLLOW UP QUESTION TO #4364]

I was trying a test case on nodesync on my Azure VM's but getting below connection error.-

root@mongoDBpoc1:~/DSE/node1/resources/cassandra/bin# ./nodesync validation submit keyspace1.counter1Error: All host(s) tried for query failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.exceptions.TransportException: [/127.0.0.1:9042] Cannot connect))

I have attached my network settings and test-case-and-error.txt network-settings.txt test case , Could you please verify and suggest what is wrong in my network settings.

nodesync
10 |1000 characters needed characters left characters exceeded

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 ·

@satvantsingh_190085 You need to specify the client IP address when you run the nodesync command or it will default to localhost (127.0.0.1).

The "client IP" is whatever interface applications/clients/drivers use to connect to the nodes remotely. This is typically one of:

  • native_transport_address - if the apps/clients are on the same local network as the nodes (private IP), or
  • broadcast_address- if the nodes can only be accessed by apps/clients through a public IP usually in a cloud environment

In this example where the client CQL port is bound to 102.34.56.78:

$ netstat -ntlp | grep 9042
tcp        0      0 102.34.56.78:9042       0.0.0.0:*               LISTEN      12345/java 

you will need to specify the IP in this syntax:

$ nodesync -h 102.34.56.78 validation submit ks_name.table_name

For more info on the command syntax, see nodesync validation. Cheers!

2 comments Share
10 |1000 characters needed characters left characters exceeded

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

Thanks @Erick Ramirez . It's working.

root@mongoDBpoc1:~/DSE/node1/resources/cassandra/bin# netstat -ntlp | grep 9042
tcp 0 0 10.0.4.5:9042 0.0.0.0:* LISTEN 13830/java
root@mongoDBpoc1:~/DSE/node1/resources/cassandra/bin# ./nodesync -h 10.0.4.5 validation submit keyspace1.counter1
7a81b980-9bfb-11ea-aefd-bf86c1adebba

Thus , we need to run this nodesync command from every node in rolling fashion or just from any single node ?

Also did you get chance to look my network settings (Attached), Can I implement same way at production environment (On Cloud Environment).Kindly suggest.

0 Likes 0 · ·

@satvantsingh_190085 NodeSync will only validate the local token ranges on a node so you will need to run it on all nodes in a cluster one node at a time. Cheers!

0 Likes 0 · ·