0
votes

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? and after removing how can i know that node is removed or not is it shows on web interface? kindly request to give me a solution.

3

3 Answers

1
votes

For Centos 6,

When you run below command, you will get the SERVER_ID of the dead co-ordinator.

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"'

This worked for me.

1
votes

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

0
votes

To use ArangoDB clustering you need at least 3 nodes. Make sure that your service is not running already. Check this by executing 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 --starter.join x.x.x.x:8528

or to start it as a backgroundprocess:

arangodb start --starter.join x.x.x.x:8528

where x.x.x.x is the Ip adres of your first node.

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.

To remove a node you can use the following command:

arangodb stop

If Arangodb was started as a backgroundprocess. 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.