在一个数字海洋液滴上,使用Ubuntu14.04 x64,我安装了DSC 2.0软件包。服务不保持启动,服务状态返回could not access pidfile for Cassandra。日志文件中没有错误。ps aux | grep cassandra也没有返回任何内容。
这建议执行sudo chmod 750 /var/run/cassandra或删除文件夹。这两样都不管用。我可以简单地让status命令读取pid,如果我执行chmod -R 777 /var/run/cassandra/,但是很快就会失败,开始返回could not read...错误。
步骤(作为根):
sudo apt-get update & sudo apt-get install dsc20sudo service cassandra status获得could not access pidfile for Cassandranodetool status获得Failed to connect to '127.0.0.1:7199': Connection refusedps aux | grep cassandra只获得返回的grep行。发布于 2014-08-14 21:31:44
正如您所注意到的,最小的数字海洋水滴不能为Cassandra提供足够的RAM来完成启动。如果您查看日志/var/log/cassandra/system.log,它通常会在某个随机点被切断。
对于任何真正的开发数字海洋,我通常选择1或2GB的RAM配置。
通过一些尝试和错误,您可以手动降低Cassandra内存的使用率以使其正常工作。在文件/etc/cassandra/cassandra-env.sh中,我设置了以下内容:
MAX_HEAP_SIZE="150M"
HEAP_NEWSIZE="40M"在我的测试中,这个值足够低,可以在512 MB的环境中运行。我不确定它有多有用,但它会运行:)
https://stackoverflow.com/questions/25173295
复制相似问题