我有同样的问题,并发现以下内容:
$ cassandra -f
xss = -ea -javaagent:/usr/share/cassandra/lib/jamm-0.2.5.jar -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms826M -Xmx826M -Xmn100M -XX:+HeapDumpOnOutOfMemoryError -Xss180k
Segmentation fault (core dumped)
好的,怎么样:
$ sudo cassandra -f
xss = -ea -javaagent:/usr/share/cassandra/lib/jamm-0.2.5.jar -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms826M -Xmx826M -Xmn100M -XX:+HeapDumpOnOutOfMemoryError -Xss180k
..这次没有分段错误,也许'xss'部分在那种情况下只是一个模糊的调试消息?
$ ps -Af | grep cass
ubuntu 5687 959 0 15:42 pts/0 00:00:00 grep --color=auto cass
嗯,虽然没有进程启动。
对我有用的是:
$ sudo /etc/init.d/cassandra start
xss = -ea -javaagent:/usr/share/cassandra/lib/jamm-0.2.5.jar -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms826M -Xmx826M -Xmn100M -XX:+HeapDumpOnOutOfMemoryError -Xss180k
$ ps -Af | grep cass
root 5789 1 0 15:45 ? 00:00:00 jsvc.exec -user cassandra -home [blah blah blah] org.apache.cassandra.thrift.CassandraDaemon
106 5791 5789 13 15:45 ? 00:00:06 jsvc.exec -user cassandra -home [blah blah blah] org.apache.cassandra.thrift.CassandraDaemon
...尽管我意识到这并没有像预期的那样在前台运行它cassandra -f
。
我最终放弃并重新开始,通过从 DataStax 社区 AMI 启动 EC2 实例来避免手动安装:https ://aws.amazon.com/amis/datastax-auto-clustering-ami-2-2
但是......我刚刚在这里找到了真正的答案:https ://stackoverflow.com/a/12941854/202168