我已成功安装ccm
并创建了测试群集
ccm list
*tutorial
ccm status
node1: DOWN (Not initialized)
node1:DOWN异常: 我还是试过
ccm start
Traceback (most recent call last):
File "/Users/Documents/virtualenvs/cqlengCass/bin/ccm", line 5, in <module>
pkg_resources.run_script('ccm==1.1', 'ccm')
File "/Users/Documents/virtualenvs/cqlengCass/lib/python2.7/site-packages/pkg_resources.py", line 487, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/Users/Documents/virtualenvs/cqlengCass/lib/python2.7/site-packages/pkg_resources.py", line 1344, in run_script
exec(script_code, namespace, namespace)
File "/Users/Documents/virtualenvs/cqlengCass/lib/python2.7/site-packages/ccm-1.1-py2.7.egg/EGG-INFO/scripts/ccm", line 72, in <module>
File "build/bdist.macosx-10.9-intel/egg/ccmlib/cmds/cluster_cmds.py", line 432, in run
File "build/bdist.macosx-10.9-intel/egg/ccmlib/cluster.py", line 232, in start
File "build/bdist.macosx-10.9-intel/egg/ccmlib/node.py", line 377, in start
File "build/bdist.macosx-10.9-intel/egg/ccmlib/common.py", line 272, in check_socket_available
ccmlib.common.UnavailableSocketError: Inet address 127.0.0.1:9042 is not available: [Errno 48] Address already in use
我通读了这个post.,但并不完全清楚需要节点的内容:
答案 0 :(得分:2)
有两件事需要考虑:
CCM
会自动启动cassandra
个实例。所以你不必自己做。如果您已经启动它,请使用kill PID(PID是您可以通过在POSIX机器上的命令行中键入ps aux | grep cassandra
获得的进程ID)
您必须设置CASSANDRA_HOME
。
这就是它看起来像我的.bash_profile。您可以输入.bashrc
或.bash_profile
。但source
它可以设置为当前环境
export CASSANDRA_HOME=/Users/Documents/cassandra