Arvind Kandaswamy
Arvind Kandaswamy

Reputation: 2241

Connecting to Cassandra sandbox from Windows

So I have the VMWare image of Cassandra which is running fine. I am trying to connect from the host OS which is Windows 7 and I am getting connection refused. I tried telnet ipaddress 9160 and the port does not seem to be open. Either the service is not running or a firewall is blocking it. Can someone help with troubleshooting?

Upvotes: 1

Views: 1632

Answers (2)

Aaron
Aaron

Reputation: 57748

How is your VM's network configured? And what OS are you running? These are details that we need to know.

I've been able to get Cassandra to run on an Ubuntu VM (on a Windows host) both with the "bridged" and "NAT: Used to share the host's IP address" network options.

enter image description here

Check the IP address on your VM, which on Ubuntu I can do with ifconfig. That's the IP address you should be using to connect with from your Windows host (which should be different from your Windows host IP).

enter image description here

From your Windows application code, you should then be able to connect to Cassandra on your VM's IP address.

Also, check the listen_address and rpc_address values in your cassandra.yaml. These should not be set to localhost, and RPC address should be set to your VM's external IP address. Hope this helps.

Upvotes: 1

ashic
ashic

Reputation: 6495

Try to ssh to the (or a if running a cluster) box and run:

ps auwx | grep java | grep cassandra

If you see something non empty, cassandra is running. You could then go to the cassandra isntallation directory and run i

$install_dir/bin/nodetool status

to get the cluster status.

It does seem likely that it's the firewall.

Upvotes: 0

Related Questions