Cassandra起始问题 [英] Cassandra starting issue

查看:330
本文介绍了Cassandra起始问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在启动Cassandra时遇到问题。以下是我尝试发出启动命令时的终端输出:

I have problems starting Cassandra. The follow is my terminal output when I try to issue a start command:


root @ gestion:〜#cassandra -f

线程main中的异常
java.lang.ExceptionInInitializerError导致:
java.lang.RuntimeException:无法找出log4j配置。
at
org.apache.cassandra.service.AbstractCassandraDaemon(AbstractCassandraDaemon.java:75)
找不到主类:
org.apache.cassandra.thrift.CassandraDaemon 。

程序将退出。

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.

我导出了JAVA_HOME路径。我在一个10.04 Lucid机器。

I exported the JAVA_HOME path. I am on an 10.04 Lucid machine. Can anyone please help me?

推荐答案

实际上,问题是,cassandra无法启动,因为它找不到名为 log4j-server.properties,以解决您在那里的问题,无需重新安装它,而只需执行以下操作来解决问题:

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)从此处下载tarball文件

2)解压缩:

$ tar -xzvf apache-cassandra-1.2.5.tar.bin.gz 

3) Cassandra的配置路径。您可以从名为/usr/share/cassandra/cassandra.in.sh的文件中获取配置路径,请检查名为CASSANDRA_CONF的键。

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".

$ gedit /usr/share/cassandra/cassandra.in.sh

4)从名为conf的目录中手动复制缺失的文件(步骤2)

4) copy the missing files manually from the extracted package (step 2) from a directory named "conf"

$ sudo cp extracted_cassandra/conf/cassandra.yaml /etc/cassandra

$ sudo cp extracted_cassandra/conf/log4j-server.properties /etc/cassandra

提示:

有关详情。如何安装cassandra debian软件包,请检查
更多信息。如何从其存储库安装cassandra,请检查

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:

$ sudo apt-get remove cassandra 

$ sudo apt-get install cassandra

这篇关于Cassandra起始问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆