当我安装时,我得到以下内容。我该如何解决?
service cassandra start
xss = -ea -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms1001M -Xmx1001M -Xmn100M -XX:+HeapDumpOnOutOfMemoryError -Xss128k
root@i-157-16647-VM:~# service cassandra status
xss = -ea -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms1001M -Xmx1001M -Xmn100M -XX:+HeapDumpOnOutOfMemoryError -Xss128k
* Cassandra is not running
我在一台有2台RAM的机器上运行。以下是我在虚拟机上安装的方法。
sudo vi /etc/apt/sources.list
#add sources.list
deb http://debian.datastax.com/community stable main
deb http://us.archive.ubuntu.com/ubuntu/ precise main contrib non-free
curl -L http://debian.datastax.com/debian/repo_key | sudo apt-key add -
sudo apt-get update
sudo apt-get install python-cql dsc1.1
root@i-157-16647-VM:~# java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.3) (6b24-1.11.3-1ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
/var/log/cassandra/output.log
Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: i-157-16647-VM: i-157-16647-VM
Service exit with a return value of 1
Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: i-157-16647-VM: i-157-16647-VM
Service exit with a return value of 1
答案 0 :(得分:8)
JAVA VM(128k)的分配内存不足。
修改下面的行(..." 128k" ...)以在文件中达到至少160k的堆栈大小
/opt/cassandra/conf/cassandra-env.sh
或/etc/dse/cassandra/cassandra-env.sh
JVM_OPTS="$JVM_OPTS -Xss160k"
答案 1 :(得分:1)
在我的情况下做 sudo chown -R cassandra:cassandra / var / lib / cassandra和 sudo chown -R cassandra:cassandra / var / log / cassandra帮助启动了Cassandra。 https://issues.apache.org/jira/browse/CASSANDRA-4058#comment-13662604详细了解可能导致这种情况的原因
答案 2 :(得分:1)
答案 3 :(得分:0)
这很可能是由于JDK。 我遇到了与IBM JDK类似的错误,一旦我用Oracle JDK替换了IBM JDK,它就可以运行。