Veera
Veera

Reputation: 1805

Trouble connecting the cassandra database via remote access through JAVA

I have started the Cassandra server, before that I have changed "rpc_address" in cassandra.yaml.I can access the cassandra from the same machine but I could not access the cassandra from remote machine through Java application using Hector Client. Please help me, Thanks in advance.

Upvotes: 1

Views: 1124

Answers (1)

Lyuben Todorov
Lyuben Todorov

Reputation: 14163

I could ping the machine. But I could not access the machine using telnet in windows. The servers is linux machine. Do you have any idea ?

Your firewall is blocking off the telnet port and probably the rest of the ports cassandra needs. You need to add an exception telling the firewall to open port 9160 (the client port). 9160 is the only port you really need to have open unless you want remote jmx management etc.

To add an exception to your linux firewall:

iptables -I INPUT -p tcp --dport 9160 --syn -j ACCEPT

And if you want to save the state:

service iptables save

Upvotes: 2

Related Questions