Apache cassandra Connection refused

1.1k Views Asked by At

I've tried every single combination of configuration for apache cassandra and I am not able to get it running. Every single time I am getting nodetool: Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused (Connection refused)'.

I am running ubuntu 16.04 on DigitalOcean.

I've set the listen_address to my public ip, I've set the broadcast_rpc_address to my public ip.. I've uncommented the JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname= line and added my public ip there. I've tried setting thr LOCAL_JMX variable = no in the cassandra-env.sh file.

I have allowed ports 22, 7000, 7001, 7199, 9042, 9160, 9142 in my firewall.

I have no idea what to try anymore. I've even tried to set the rpc_address to my public ip.

I've tried telling nodetool to point on the correct addres with sudo nodetool -h XX.XXX.XXX.XX status.

Does anyone have any ideas? Thanks.

1

There are 1 best solutions below

2
On

Okay, so after a lot of time, I've discovered the problem. Buy droplets with more ram.

It turned out that you cannot run apache cassandra on a server with 512mb ram.I've expanded the ram to 1GB and it started working, immediately.