question

Bosies avatar image
Bosies asked Erick Ramirez commented

Unable to connect to cluster for Application Connectivity unit of DS201

I was working through the DS201 "Application Connectivity" course and "Drivers" exercise and I had trouble creating a Cassandra session based on the cluster information provided:

connection-issue.png

I also verified the version of Cassandra-Driver installed as well:

cassandra-driver-version.png

Any help would be appreciated - thanks in advance.

ds201
2 comments
10 |1000

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

steve.lacerda avatar image steve.lacerda ♦ commented ·
Can you connect with cqlsh to your cluster?
0 Likes 0 ·
Bosies avatar image Bosies steve.lacerda ♦ commented ·

Apologies for the late response - no I cannot

0 Likes 0 ·

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered Erick Ramirez commented

The NoHostAvailable exception indicates that the driver was not able to connect to any nodes.

You will need to verify that Cassandra is running on the local node(localhost aka 127.0.0.1) and is listening for client connections on port 9042. If it isn't, you will need to start it as instructed in the previous step. Cheers!

3 comments 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.

Bosies avatar image Bosies commented ·
Turns out, at some point I had removed the node folder where the dse tar file was meant to be extracted. I am currently re-setting up my environment and will see if this works.
0 Likes 0 ·
Bosies avatar image Bosies commented ·

After reinstalling everything, I was able to successfully create a cluster and start a session. Turns out, my 'node' folder somehow was removed at some point, so all the config information was gone as well.

0 Likes 0 ·
Erick Ramirez avatar image Erick Ramirez ♦♦ Bosies commented ·

I'm glad you worked it out.

It might seem frustrating at first but it's a good learning opportunity when this sort of things happen. Cheers!

0 Likes 0 ·