By fstafai
Hi All,
I want to ask for your help on how i can connect to my cassandra DB on my droplet from remote machine. I did everything that is written in this article: Install Cassandra but when I try to connect from my C# code:
cluster = Cassandra.Cluster.Builder().WithCredentials("abc", "abc")
.AddContactPoints(new[] { "12.34.56.78" })
.WithPort(9168)
.Build();
var session = cluster.Connect();
var keyspace = "Test";
session.CreateKeyspaceIfNotExists(keyspace);
session.ChangeKeyspace(keyspace);
I’m getting-> Exception thrown: ‘Cassandra.NoHostAvailableException’ in Cassandra.dll
Additional information: None of the hosts tried for query are available (tried: 12.34.56.78:9168)
I also tried from other Cassandra GUI Clients like DBeaver but I;m getting the same error.
My Droplet is Ubuntu 14.04. From localhost I have no problem with Casandra my only problem is from remote.
Thank you in advance.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
*Not ready to Connect to a Cassandra Remote Server? Contact to Cassandra Database Consulting and Support **
The capacities of Cassandra database are astonishing in light of the fact that Cassandra can deal with vast measure of database with no multifaceted nature. In the mean time we get loads of inquiries and issues in regards to those clients who face issue with respect to Cassandra remote server since they are not ready to associate with Cassandra remote server. To dispose of these specialized hiccups we give full help by means of Cognegic’s Cassandra Technical Support or Cassandra Database Support. Get in touch with us through this number 1-800-450-8670 and settle everything Cassandra related issues. **For More Info: https://cognegicsystems.com/ Contact Number: 1-800-450-8670 Email Address- info@cognegicsystems.com Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801 **
Hi @fstafai,
It sounds like either your local droplet firewall rules, or your cassandra configuration are blocking this. The easiest way to check is to look in your cassandra configuration for the listen_address, or listen_interface directives (as described in : https://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html) and confirm that it’s listening on the right interface, and the right address.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.