无法连接到localhost上的Aerospike

时间:2015-02-12 10:49:44

标签: aerospike nosql

在localhost上安装aerospike后,我无法在其中设置任何值。 我成功地能够在安装了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

我发现的唯一区别是,我在我的localhost日志中收到此警告,这在我的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

提前致谢。

1 个答案:

答案 0 :(得分: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 /端口组合以更改其心跳设置,这样它就不会尝试与其他节点形成群集。