2

在 localhost 上安装 aerospike 后,我无法通过 cli 在其中设置任何值。我成功地能够在我安装了 aerospike 的 ec2 实例上运行相同的命令。

krishan@L-krishan-Tech:~/softwares/aerospike-server$ telnet localhost 3000
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.

krishan@L-krishan-Tech:~/softwares/aerospike-server$ cli -h localhost -n test -o set -k Aerospike -b address -v "Mountain View, CA 94043"
Transaction did not complete for some reason:  timed out
Marking bad:  BB9BF10CB55DBE0   ('127.0.0.1', 3000)
cluster says: no good hosts, really
failing request because no good hosts
set failed,  -1


krishan@L-krishan-Tech:~/softwares/aerospike-server$ cli -h <ec2instanceip> -n test -o set -k Aerospike -b address -v "Mountain View, CA 94043"
succeeded:  key = Aerospike  set=   bin= address  value= Mountain View, CA 94043

[aerospike@ip-<ec2instanceip> aerospike-server]$ cli -h localhost -n test -o set -k Aerospike -b address -v "Mountain View, CA 94043"
succeeded:  key = Aerospike  set=   bin= address  value= Mountain View, CA 94043

我发现的唯一区别是,我在本地主机日志中收到此警告,而我的 ec2 实例中没有。

Feb 12 2015 10:43:30 GMT: WARNING (paxos): (paxos.c::526) Different number of namespaces (expected: 1, received in partition sync message: 3) between nodes in same cluster ~~ Please check node configurations
Feb 12 2015 10:43:30 GMT: WARNING (paxos): (paxos.c::2917) unable to apply received state in partition sync request from node bb94e8e61bbf4e

提前致谢。

4

1 回答 1

2
(paxos.c::526) Different number of namespaces (expected: 1, received in partition sync message: 3) between nodes in same cluster ~~ Please check node configurations

此日志行显示在您的环境中运行的多个服务器具有相同的心跳设置。同样的心跳设置告诉节点尝试形成集群,但节点无法形成集群,因为它们的命名空间定义不同。

您应该更改 localhost aerospike 配置上的心跳 IP/端口组合以更改其心跳设置,这样它就不会尝试与其他节点形成集群。

于 2015-02-12T11:15:20.880 回答