I set rpc_port to the public IP address, and now I can connect to Cassandra just fine from an outside server.
However, I cannot connect from the Cassandra server itself, using cqlsh
I am getting an error.Thar are:
Connection error: Could not connect to localhost:9160
Is there a configuration, I can change to be able to connect from the server itself ?
for
2.0.5
the following works for me ..Consider changing /etc/cassandra-env.sh:
sudo service cassandra restart
How to change default port 9042 in Cassandra ?
I resolved issue using below steps :
1) Stop cassandara services
2) Take backup and Change port from 9042 to 9035
3) Start Cassandra services
4) create cqlshrc file.
Use this command
to start cassandra and then use
You need to connect to cassandra through the
rpc_address
defined incassandra.yaml
. For example, I usecqlsh 10.0.80.49 9160
.cassandra.yaml
file on the line withrpc_port :
normally by default= 9160
cassandra
cqlsh 127.0.0.1 9160
: should be ok in any casecqlsh [IP of host] 9160
: if ok thencassandra
reachable from lan, if ok thencassandra
is not reachable fromlan
but onlylocalhost 127.0.0.1