Created
April 19, 2017 18:59
Removing rmq node from cluster using reset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# validating the nodes in a cluster from a machine | |
babrams@ip-10-55-250-69:~$ sudo rabbitmqctl cluster_status | grep rmq | cut -d\@ -f2 | grep -Eo "ip\-[0-9]+\-[0-9]+\-[0-9]+\-[0-9]+" | sort | uniq | |
ip-10-55-250-69 | |
ip-10-55-251-128 | |
ip-10-55-252-176 | |
# validating the same from another machine | |
babrams@ip-10-55-251-128:~$ sudo rabbitmqctl cluster_status | grep rmq | cut -d\@ -f2 | grep -Eo "ip\-[0-9]+\-[0-9]+\-[0-9]+\-[0-9]+" | sort | uniq | |
ip-10-55-250-69 | |
ip-10-55-251-128 | |
ip-10-55-252-176 | |
# removing first node from cluster via stop && reset | |
babrams@ip-10-55-251-128:~$ sudo rabbitmqctl stop_app | |
Stopping rabbit application on node 'rmq-9161197e59a9ce560ac6353215c7958aeeefae2cd9370fbc3cd89054026c267a@ip-10-55-251-128' ... | |
babrams@ip-10-55-251-128:~$ sudo rabbitmqctl reset | |
Resetting node 'rmq-9161197e59a9ce560ac6353215c7958aeeefae2cd9370fbc3cd89054026c267a@ip-10-55-251-128' ... | |
babrams@ip-10-55-251-128:~$ | |
# validating it no longer is in any cluster other than self | |
babrams@ip-10-55-251-128:~$ sudo rabbitmqctl cluster_status | grep rmq | cut -d\@ -f2 | grep -Eo "ip\-[0-9]+\-[0-9]+\-[0-9]+\-[0-9]+" | sort | uniq | |
ip-10-55-251-128 | |
# validating another node can no longer see it in the cluster | |
babrams@ip-10-55-250-69:~$ sudo rabbitmqctl cluster_status | grep rmq | cut -d\@ -f2 | grep -Eo "ip\-[0-9]+\-[0-9]+\-[0-9]+\-[0-9]+" | sort | uniq | |
ip-10-55-250-69 | |
ip-10-55-252-176 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment