cassandra do not launch:启动期间遇到:变量:[cassandra.config]中应为uri找到[cassandra.yaml]

ui7jx7zq  于 2021-06-14  发布在  Cassandra
关注(0)|答案(1)|浏览(411)

我上一天正常使用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
yqhsw0fo

yqhsw0fo1#

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

相关问题