首页 > 解决方案 > 如何修复“nodetool:无法连接到'localhost:7199' - ConnectException:'连接被拒绝(连接被拒绝)'。”

问题描述

我安装了 Cassandra,它之前工作正常,但是一旦我将 java 1.8 更新到 java 16,即使我运行了,我也会收到这个错误

systemctl status cassandra

它说 Unit cassandra.service 找不到

这是cassandra的日志

2021-07-29 04:20:18 INFO  PropertiesUtil:65 - loadProperties - file does not exist, skipping ... /opt/apigee/customer//pod/default.properties
2021-07-29 04:20:18 INFO  PropertiesUtil:65 - loadProperties - file does not exist, skipping ... /opt/apigee/customer//pod/default.properties
2021-07-29 04:20:18 INFO  PropertiesUtil:65 - loadProperties - file does not exist, skipping ... /opt/apigee/customer//org/default.properties
2021-07-29 04:20:18 INFO  PropertiesUtil:65 - loadProperties - file does not exist, skipping ... /opt/apigee/customer//org/default.properties
2021-07-29 04:20:18 INFO  PropertiesUtil:65 - loadProperties - file does not exist, skipping ... /opt/apigee/customer//host/default.properties
2021-07-29 04:20:18 INFO  PropertiesUtil:65 - loadProperties - file does not exist, skipping ... /opt/apigee/customer//host/node-2.properties
2021-07-29 04:20:18 INFO  Tokenizer:104 - Tokenization Done
2021-07-29 04:20:18 INFO  ZipCompare:59 - Comparing /opt/apigee/data/apigee-cassandra/config_backup_20210729_042017.zip with /opt/apigee/data/apigee-cassandra/newconfig_backup_20210729_042018.zip:
2021-07-29 04:20:18 INFO  ZipCompare:111 - 19 entries matched
2021-07-29 04:20:18 INFO  ConfigUtil:74 - Removing old backup files as there is no change /opt/apigee/data/apigee-cassandra/config_backup_20210729_042017.zip

如果我运行nodetool status 它说nodetool: Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused (Connection refused)'.

如果我使用“apigee-all restart”重新启动服务 死的

感谢您的任何指导或帮助

标签: javacassandra

解决方案


Cassandra 不适用于 Java 16。

Cassandra 4.0 之前的版本仅支持 Java 8。Cassandra 4.0 支持标记为“实验性”的 Java 8 + Java 11(尽管有关于采用完全支持的积极讨论)。干杯!


推荐阅读