Riak不允许添加节点,因为它在自己的集群中

(这是从栈溢出我的问题的转发,这是在那里,这里是正确的地方去问)

我正在尝试在Raspberry Pi上构build一个Riak集群。 用Erland和Riak创build一个图像,单个节点似乎正常工作。 然后我为了我的不同的Pi而克隆了这张图片:

[email protected] [email protected] [email protected] 

它们具有完全相同的configuration,唯一不同的是vm.argsapp.config中的静态IP。

现在的问题是,我正在从[email protected]开始构build集群,添加了一个节点[email protected] ,它似乎是[email protected]

 # ./riak-admin member-status ================================= Membership ================================== Status Ring Pending Node ------------------------------------------------------------------------------- valid 100.0% 50.0% '[email protected]' valid 0.0% 50.0% '[email protected]' ------------------------------------------------------------------------------- 

有一次,我尝试添加第三个节点( [email protected] ),我得到以下错误信息:

 # ./riak-admin cluster join [email protected] Failed: This node is already a member of a cluster 

为什么我没有这个问题[email protected] ? 这似乎只发生在[email protected]节点。

我不能强制从集群中删除[email protected] ,因为它说:

 # ./riak-admin cluster force-remove [email protected] Failed: '[email protected]' is the claimant (see: riak-admin ring_status). The claimant is the node responsible for initiating cluster changes, and cannot forcefully remove itself. You can use 'riak-admin down' to mark the node as offline, which will trigger a new claimant to take over. However, this will clear any staged changes. 

要么

 # ./riak-admin cluster leave Failed: '[email protected]' is the only member. 

我无法理解,我想我需要一个新的观点。 我还想补充一点,我遵循文档中的所有步骤:

http://docs.basho.com/riak/latest/ops/building/basic-cluster-setup/

还参加了树莓派的计数教程(但我不是Raspbian,我在ArchLinux上)。

http://basho.com/building-a-riak-cluster-on-raspberry-pi/

我还会补充说,networking工作正常,我可以从每个节点ping和ssh到每个节点。

我指望你的build议。 干杯!

编辑:

如前所述,他们build议使用riak-admin down <node>命令来阻止这个节点成为claimant ,这也是行不通的。

 # ./riak-admin down [email protected] Failed: [email protected] is up 

我不能阻止它,因为它是…但是,如果我尝试相同的时候Riak不起来,我得到:

 # ./riak-admin down [email protected] Node is not running! 

这很混乱。 显然我不明白这是怎么回事,希望有人能澄清一下。

试试这些步骤:

  • riak stop在所有节点上riak stop
  • 所有节点上的rm -rf /var/lib/riak/ring/*
  • 请仔细检查/etc/riak/vm.args以确保-name参数使用正确的IP地址
  • riak start所有节点riak start
  • 在其他两个节点上重新运行riak-admin cluster join [email protected]命令。 记住所有其他节点join相同的“启动器”节点 – 在这种情况下[email protected]是很重要的
  • 运行riak-admin cluster plan[email protected]节点上validation
  • [email protected]节点运行[email protected] riak-admin cluster commit

没有必要停止所有的节点和删除环数据。 标记为已停止的申请人节点之后,可以完成像join节点那样的群集操作。 3节点群集和索赔失败的示例步骤如下: https : //gist.github.com/shino/dd9a75e84b2b5792a079 。