Cassandra 启动问题 [英] Cassandra starting issue

查看:30
本文介绍了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 配置.在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) 从 这里.

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 包,请查看 this欲了解更多信息.如何从他们的存储库安装 cassandra,请查看 this

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天全站免登陆