我刚接触卡桑德拉,正在尝试。尽管卡桑德拉显然在跑步和倾听(根据
lsof
)我连不上。
sudo systemctl status cassandr
也报告
active (running)
.
$ sudo lsof -Pnl +M -i4
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
(omitting unrelated services - nothing here about cassandra)
$ sudo lsof -Pnl +M -i6
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sshd 752 0 4u IPv6 16234 0t0 TCP *:22 (LISTEN)
java 23659 300 68u IPv6 158110 0t0 TCP 127.0.0.1:7199 (LISTEN)
java 23659 300 69u IPv6 158122 0t0 TCP 127.0.0.1:36921 (LISTEN)
java 23659 300 84u IPv6 158212 0t0 TCP 127.0.0.1:9160 (LISTEN)
java 23659 300 151u IPv6 158205 0t0 TCP 127.0.0.1:7000 (LISTEN)
$ sudo nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Owns (effective) Host ID Token Rack
UN 127.0.0.1 125.98 KiB 100.0% e0bbc831-8686-43a6-b99c-8ea5596c8581 3840369556391221198 rack1
对于可能正在阅读此内容的NIX用户(对于非NIX用户也很容易理解),我的配置是:
services.cassandra = {
enable = true;
listenAddress = "127.0.0.1";
rpcAddress = "127.0.0.1";
};
我得到的错误是:
$ cqlsh 127.0.0.1 9160
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9160)]. Last error: Connection refused")})