Error: Failed to connect to ‘127.0.0.1:7199’: Connection refused (Cassandra) [SOLVED]

Cpanel/Whm License $3/mo Plesk License $10/mo Cloudlinux License $5/mo

Pre-Flight Check
  • 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 sxi.io Web Core Managed CentOS 6 and CentOS 7 servers, and I’ll be logged in as root.

Error While Using Cassandra’s ‘nodetool’

This error may occur when using the ‘nodetool’ command, such as in the following example:

nodetool status

For both CentOS 6 and CentOS 7 search the following configuration file:

vim /etc/cassandra/default.conf/cassandra-env.sh

For a refresher on editing files with vim see: New User Tutorial: Overview of the Vim Text Editor

Search for:

JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=

Which for my search resulted in:

# add this if you're having trouble connecting:
# 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 <public name> with 127.0.0.1 resolved the issue, because we are connecting to/from that IP address.

Then exit and save the file with the command :wq .

Be sure to restart Cassandra:

systemctl restart cassandra

Related posts

‘Bash Bug’ a Concern, But Little Threat to Bitcoin Services

SXI ADMIN

How To Set Up a New Email Account on an iPhone, iPad, iOS 9

SXI ADMIN

How to disable bash shell history in Linux

SXI ADMIN

Customer Bitcoins Stolen in Purse Email Breach

SXI ADMIN

How to find out CPU information on Red Hat Linux (RHEL)

SXI ADMIN

Why Rabobank’s Blockchain Cross-Border Tool Isn’t Just a Database

SXI ADMIN

Tether on Strings? Crypto Debates Fresh Round of Manipulation Claims

SXI ADMIN

Blockchain Executives Sign Pledge to Address Governance Issues

SXI ADMIN

Polish Soccer Club to Accept Bitcoin for Tickets and Merchandise

SXI ADMIN

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More