- These instructions are intended specifically for solving the error: Failed to connect to ‘127.0.0.1:7199’: Connection refused.
- I’ll be working from both Liquid Web Core Managed CentOS 6 and CentOS 7 servers, and I’ll be logged in as root.
This error may occur when using the ‘nodetool’ command, such as in the following example:
For both CentOS 6 and CentOS 7 search the following configuration file:
For a refresher on editing files with vim see: New User Tutorial: Overview of the Vim Text Editor
Which for my search resulted in:
# JVM_OPTS=”$JVM_OPTS -Djava.rmi.server.hostname=<public name>”
Uncomment the second line, and add the hostname of your server, or the IP address which you’re connecting to/from. In this case, replacing
Then exit and save the file with the command
Be sure to restart Cassandra:
systemctl restart cassandra
Tagged with: cassandra • cassandra 2 • centos 6 • centos 7 • errors • nodetool