连接到 Cassandra 时连接被拒绝

时间:2020-12-19 07:24:11

标签: cassandra

我正在尝试运行 cassandra,但每次在连接时都出现相同的错误...是否需要在配置文件或属性文件中编辑任何内容

('无法连接到任何服务器', {'127.0.0.1:9042': error(61, "尝试连接到 [('127.0.0.1', 9042)]。最后一个错误:连接被拒绝")} )

启动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

2 个答案:

答案 0 :(得分:1)

这意味着您正在尝试连接到 localhost,但是:

  • Cassandra 没有运行,或者
  • 您已将 rpc_address 设置为 localhost 以外的值

运行此命令以查看 CQL 端口 9042 绑定到的 IP 地址:

$ sudo lsof -nPi -sTCP:LISTEN

您需要连接到服务器正在侦听客户端的 IP。干杯!

答案 1 :(得分:1)

来到这里时使用了一个完全不同的应用程序,但在 build 1.8.0_275-bre_2020_11_16_16_16-b00 上完全匹配。更改 Java 版本(转到 1.8.0_292)后,“致命错误”消失了。

相关问题