Is this a local install? If so you can set your rpc_address to 127.0.0.1.  The 
rpc_address are the IP addresses that will be allowed to make connections to 
Cassandra. 

I suspect the problem is that you have set your RPC address to your IP address 
with is different from 127.0.0.1. cqlsh by default connects to localhost.

You can set the rpc_address to 0.0.0.0 for allowing anyone to connect. Possible 
option to eliminate Cassandra rejecting connection. Note this is a security 
hole for production deployments.

Cheers,
Warm Regards,
Akhil Mehra
http://abiasforaction.net


> On 29/08/2017, at 10:45 AM, Amir Shahinpour <a...@holisticlabs.net> wrote:
> 
> Hi,
> 
> I am getting an error connecting to cqlsh. I am getting the following error. 
> 
> Connection error: ('Unable to connect to any servers', {'127.0.0.1': 
> error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection 
> refused")})
> 
> I change the Cassandra.yaml file setting for rpc_address to my ip address and 
> listen_address to localhost. 
> 
> 
> listen_address: localhost
> rpc_address: my_IP
> 
> I also tried to change the cassandra-env.sh  to add my IP address but still 
> same error. 
> 
> JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=my_IP"
> Any suggestion?
> 
> 
> 

Reply via email to