我正在努力使用“ccm start”命令启动 Cassandra 集群。
我创建了一个名为 Gdelt 的集群,有 3 个节点,如下所示
ccm status
:
Cluster: 'Gdelt'
-------------------
node1: DOWN (Not initialized)
node3: DOWN (Not initialized)
node2: DOWN (Not initialized)
node4: DOWN (Not initialized)
但ccm start
引发以下错误:
Traceback (most recent call last):
File "/usr/local/bin/ccm", line 112, in <module>
cmd.run()
File "/usr/local/lib/python2.7/dist-packages/ccmlib/cmds/cluster_cmds.py", line 510, in run
allow_root=self.options.allow_root) is None:
File "/usr/local/lib/python2.7/dist-packages/ccmlib/cluster.py", line 390, in start
common.assert_socket_available(itf)
File "/usr/local/lib/python2.7/dist-packages/ccmlib/common.py", line 521, in assert_socket_available
raise UnavailableSocketError("Inet address %s:%s is not available: %s; a cluster may already be running or you may need to add the loopback alias" % (addr, port, msg))
ccmlib.common.UnavailableSocketError: Inet address 127.0.0.1:9042 is not available: [Errno 98] Address already in use; a cluster may already be running or you may need to add the loopback alias
Traceback (most recent call last):
File "/usr/local/bin/ccm", line 112, in <module>
cmd.run()
File "/usr/local/lib/python2.7/dist-packages/ccmlib/cmds/cluster_cmds.py", line 510, in run
allow_root=self.options.allow_root) is None:
File "/usr/local/lib/python2.7/dist-packages/ccmlib/cluster.py", line 390, in start
common.assert_socket_available(itf)
File "/usr/local/lib/python2.7/dist-packages/ccmlib/common.py", line 521, in assert_socket_available
raise UnavailableSocketError("Inet address %s:%s is not available: %s; a cluster may already be running or you may need to add the loopback alias" % (addr, port, msg))
ccmlib.common.UnavailableSocketError: Inet address 127.0.0.1:9042 is not available: [Errno 98] Address already in use; a cluster may already be running or you may need to add the loopback alias
我尝试使用以下 bash 脚本创建环回别名并执行它:
#!/bin/bash
sudo ifconfig lo0 alias 127.0.0.2 up
sudo ifconfig lo0 alias 127.0.0.3 up
sudo ifconfig lo0 alias 127.0.0.4 up
sudo ifconfig lo0 alias 127.0.0.5 up
sudo ifconfig lo0 alias 127.0.0.6 up
这会在执行 bash 脚本时引发以下错误:
alias: Host name lookup failure
ifconfig: `--help' gives usage information.
我已经在命令行中直接尝试了 ifconfig,如下所示:
sudo ifconfig lo:0 127.0.0.1 up
这给出了以下错误:
SIOCSIFADDR: File exists
SIOCSIFFLAGS: Cannot assign requested address
SIOCSIFFLAGS: Cannot assign requested address
这清楚吗,如果没有请告诉我,以便我澄清更多
我最终不知道如何在 Cassandra 中运行我的集群。非常感谢您的帮助。哈比卜