Cassandra启动问题
我在启动 Cassandra 时遇到问题。以下是我尝试发出启动命令时的终端输出:
root@gestion:~# cassandra -f
线程“main”中的异常 java.lang.ExceptionInInitializerError 引起的原因: java.lang.RuntimeException:无法弄清楚 log4j 配置。 在 org.apache.cassandra.service.AbstractCassandraDaemon。(AbstractCassandraDaemon.java:75) 找不到主类: org.apache.cassandra.thrift.CassandraDaemon。
程序将退出。
我导出了 JAVA_HOME 路径。我使用的是 10.04 Lucid 机器。有人可以帮我吗?
I have problems starting Cassandra. The follow is my terminal output when I try to issue a start command:
root@gestion:~# cassandra -f
Exception in thread "main"
java.lang.ExceptionInInitializerError Caused by:
java.lang.RuntimeException: Couldn't figure out log4j configuration.
at
org.apache.cassandra.service.AbstractCassandraDaemon.(AbstractCassandraDaemon.java:75)
Could not find the main class:
org.apache.cassandra.thrift.CassandraDaemon.
Program will exit.
I exported the JAVA_HOME path. I am on an 10.04 Lucid machine. Can anyone please help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
实际上,问题是 cassandra 无法启动,因为它在其配置目录中找不到名为“log4j-server.properties”的文件,要解决您遇到的问题,无需再次重新安装,只需执行以下操作要解决此问题:
1) 从 这里。
2)解压:
3)检查cassandra的配置路径在哪里。您可以从名为“/usr/share/cassandra/cassandra.in.sh”的文件中获取配置路径,查看名为“CASSANDRA_CONF”的密钥。
4) 从名为“conf”的目录中手动复制解压包(步骤 2)中缺少的文件
提示:
了解更多信息。如何安装 cassandra debian 软件包,请检查这个
欲了解更多信息。如何从存储库安装 cassandra,请检查此
如果您想重新安装它,只需执行以下操作:
Actually the issue is that cassandra could not start up as it is not finding the file named "log4j-server.properties" in its configuration directory, to resolve the issue you have there, no need to reinstall it again but instead simply do the following to resolve the issue:
1) Download the tarball file from here.
2) Extract it:
3) Check where is the configuration path of cassandra. you could get the config path from file named "/usr/share/cassandra/cassandra.in.sh", check out the key named "CASSANDRA_CONF".
4) copy the missing files manually from the extracted package (step 2) from a directory named "conf"
Hints:
For more info. how to install cassandra debian package, check this
For more info. how to install cassandra from their repository, check this
If you want to re-install it, simply you could do the following:
我认为错误位于 $CASSANDRA_HOME/conf/log4j-server.properties 文件中。也许您定义了一个不存在的附加程序(log4j.appender.R)
I think the error is in the $CASSANDRA_HOME/conf/log4j-server.properties file. Maybe you have defined an appender which does not exist (log4j.appender.R)
请参阅https://issues.apache.org/jira/browse/CASSANDRA-2383 有关 log4j 初始化的一些讨论。
“无法弄清楚 log4j 配置”意味着 Cassandra 无法将您的 -Dlog4j.configuration 属性转换为有效的 log4j 配置文件名。这并不意味着 log4j 配置文件本身有错误。
See https://issues.apache.org/jira/browse/CASSANDRA-2383 for some discussion of the log4j initialization.
"Couldn't figure out log4j configuration" means that Cassandra couldn't convert your -Dlog4j.configuration property to a valid log4j config filename. It doesn't mean there's an error in the log4j config file itself.