gpt4 book ai didi

java - Cassandra 不启动 : encountered during startup: Expecting URI in variable: [cassandra. 配置]。找到[cassandra.yaml]

转载 作者:行者123 更新时间:2023-12-01 23:09:20 25 4
gpt4 key购买 nike

我昨天正常使用 Cassandra,但安装 Maven 并重新启动计算机后,启动 CQLSH 时收到此错误消息:

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

启动此命令行时:

sudo cassandra -R

我收到此错误消息:

Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Expecting URI in variable: [cassandra.config]. Found[cassandra.yaml]. Please prefix the file with [file:///] for local files and [file://<server>/] for remote files. If you are executing this from an external tool, it needs to set Config.setClientMode(true) to avoid loading configuration.
org.apache.cassandra.exceptions.ConfigurationException: Expecting URI in variable: [cassandra.config]. Found[cassandra.yaml]. Please prefix the file with [file:///] for local files and [file://<server>/] for remote files. If you are executing this from an external tool, it needs to set Config.setClientMode(true) to avoid loading configuration.
at org.apache.cassandra.config.YamlConfigurationLoader.getStorageConfigURL(YamlConfigurationLoader.java:80)
at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:100)
at org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:268)
at org.apache.cassandra.config.DatabaseDescriptor.daemonInitialization(DatabaseDescriptor.java:147)
at org.apache.cassandra.config.DatabaseDescriptor.daemonInitialization(DatabaseDescriptor.java:132)
at org.apache.cassandra.service.CassandraDaemon.applyConfig(CassandraDaemon.java:665)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:609)
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:732)
22:28:18.449 [main] ERROR o.a.c.service.CassandraDaemon - Exception encountered during startup
org.apache.cassandra.exceptions.ConfigurationException: Expecting URI in variable: [cassandra.config]. Found[cassandra.yaml]. Please prefix the file with [file:///] for local files and [file://<server>/] for remote files. If you are executing this from an external tool, it needs to set Config.setClientMode(true) to avoid loading configuration.
at org.apache.cassandra.config.YamlConfigurationLoader.getStorageConfigURL(YamlConfigurationLoader.java:80) ~[apache-cassandra-3.11.4.jar:3.11.4]
at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:100) ~[apache-cassandra-3.11.4.jar:3.11.4]
at org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:268) ~[apache-cassandra-3.11.4.jar:3.11.4]
at org.apache.cassandra.config.DatabaseDescriptor.daemonInitialization(DatabaseDescriptor.java:147) ~[apache-cassandra-3.11.4.jar:3.11.4]
at org.apache.cassandra.config.DatabaseDescriptor.daemonInitialization(DatabaseDescriptor.java:132) ~[apache-cassandra-3.11.4.jar:3.11.4]
at org.apache.cassandra.service.CassandraDaemon.applyConfig(CassandraDaemon.java:665) [apache-cassandra-3.11.4.jar:3.11.4]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:609) [apache-cassandra-3.11.4.jar:3.11.4]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:732) [apache-cassandra-3.11.4.jar:3.11.4]

Cassandra 有什么问题吗?

我什至卸载了它并重新安装,但没有成功。

我怀疑 Maven 安装了另一个 Java 版本或其他东西......希望你能帮助解决这个问题。

Cassandra Version: 3.11.4

Java version:

openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~16.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)

OS:
Ubuntu 16.04

最佳答案

这些变量的值在/etc/cassandra/jvm.options中定义。您可以更改 cassandra.confi 的值以指向 cassandra.yaml 文件的实际位置。它应该以 file:// 开头,使其成为有效的 URI。

关于java - Cassandra 不启动 : encountered during startup: Expecting URI in variable: [cassandra. 配置]。找到[cassandra.yaml],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58384389/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com