SANDHYA SINGH
SANDHYA SINGH

Reputation: 151

connection refused while connecting to Cassandra

I am trying to run cassandra but everytime it is giving same error while connecting ... is there anything i need to edit in config file or property file

('Unable to connect to any servers', {'127.0.0.1:9042': error(61, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})

There is error while starting cassandra

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000106116a8c, pid=27359, tid=0x0000000000006e03
#
# JRE version: OpenJDK Runtime Environment (8.0_275) (build 1.8.0_275-bre_2020_11_16_16_16-b00)
# Java VM: OpenJDK 64-Bit Server VM (25.275-b00 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.dylib+0x564a8c]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/sandhyasingh/hs_err_pid27359.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
Abort trap: 6

Upvotes: 0

Views: 399

Answers (2)

shnewto
shnewto

Reputation: 386

Came here with a completely different application but an exact match on build 1.8.0_275-bre_2020_11_16_16_16-b00. After changing Java versions (went to 1.8.0_292) the "fatal error" went away.

Upvotes: 1

Erick Ramirez
Erick Ramirez

Reputation: 16293

It means that you're trying to connect to localhost but either:

  • Cassandra isn't running, or
  • you've set rpc_address to something other than localhost

Run this command to see which IP address CQL port 9042 is bound to:

$ sudo lsof -nPi -sTCP:LISTEN

You need to connect to the IP that the server is listening for clients. Cheers!

Upvotes: 1

Related Questions