简体   繁体   English

Arangodb群集节点删除

[英]Arangodb Cluster Node Remove

Hello I'm using arangodb version 3.1.18 on Ubuntu 16.04 version I've make cluster of arangodb on two node using docker by the use of ArangoDbStarter now my question is that how can i remove the node from cluster? 您好我在Ubuntu 16.04版本上使用arangodb版本3.1.18我已经通过使用ArangoDbStarter在docker上使用两个节点在一个节点上创建了arangodb群集,现在我的问题是如何从群集中删除该节点? and after removing how can i know that node is removed or not is it shows on web interface? 和删除后我怎样才能知道节点被移除或不为它显示Web界面? kindly request to give me a solution. 恳请给我一个解决方案。

For Centos 6, 对于Centos 6,

When you run below command, you will get the SERVER_ID of the dead co-ordinator. 当您使用以下命令运行时,您将获得无效协调器的SERVER_ID。

curl --dump - http://co-ordinator-ip:8529/_db/_system/_admin/cluster/health curl --dump- http:// co-ordinator-ip:8529 / _db / _system / _admin / cluster / health

Then execute below command to remove the co-ordinator. 然后执行以下命令删除协调器。

curl --dump - http://co-ordinator-ip:8529/_admin/cluster/removeServer -d '"SERVER_ID"' curl --dump- http:// co-ordinator-ip:8529 / _admin / cluster / removeServer -d'“ SERVER_ID”'

This worked for me. 这对我有用。

simple loop can be run after coordinator start: 可以在协调器启动后运行简单循环:

for failed_id in $(curl http://coordinator:PORT/_db/_system/_admin/cluster/health | jq '.Health | to_entries[] | select (.value.CanBeDeleted==true) | select (.value.Status=="FAILED") | select (.value.Role=="Coordinator") | [.key] | .[]') ; do echo " deleting failed coordinator $failed_id" ; curl http://coordinator:PORT/_admin/cluster/removeServer -d ${failed_id} ; done

will remove all deleted coordinator nodes that are hanging after restart 将删除重新启动后挂起的所有已删除协调器节点

To use ArangoDB clustering you need at least 3 nodes. 要使用ArangoDB集群,您至少需要3个节点。 Make sure that your service is not running already. 确保您的服务尚未运行。 Check this by executing sudo service arangodb status . 通过执行sudo service arangodb status If this is active, stop the service. 如果这是活动的,请停止该服务。 On your fist node you can start it by executing the following command: 在第一个节点上,您可以通过执行以下命令来启动它:

arangodb

or to start it as a backgroundprocess: 或将其作为后台进程启动:

arangodb start

On your two other nodes execute the following command and make sure that arangodb service is also stopped: 在其他两个节点上,执行以下命令,并确保arangodb服务也已停止:

arangodb --starter.join xxxx:8528

or to start it as a backgroundprocess: 或将其作为后台进程启动:

arangodb start --starter.join xxxx:8528

where xxxx is the Ip adres of your first node. 其中xxxx是您的第一个节点的IP地址。

You can then access the dashboard by going to any or the 3 Ip addresses to port 8529. There you have a dashboard that will show you the status of your cluster. 然后,您可以通过转到端口8529的任何一个或3个IP地址访问仪表板。那里有一个仪表板,它将显示集群的状态。

To remove a node you can use the following command: 要删除节点,可以使用以下命令:

arangodb stop

If Arangodb was started as a backgroundprocess. 如果Arangodb是作为后台进程启动的。 If it was not like that juist kill the process. 如果不是那样,那位法学家将终止这一进程。 The Webui will now show the removed node in Red and pressing the trash can will remove it from the ui as well. Webui现在将以红色显示已删除的节点,按垃圾桶也可以将其从ui中删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM