Redis Cluster Cluster Restart shutdown example Introduction

Source: Internet
Author: User
Tags redis redis cluster


Searched the official documents of the Redis cluster and found no way to restart and shutdown the cluster. Why not, guess Redis cluster at least three nodes to run, three at the same time hanging off the possibility of relatively small, as long as not hung up at the same time, hung up after the machine to join the cluster, the cluster can be a good operation, in case of hanging off, data and no backup, there will be big trouble.

The nodes in the Redis cluster cluster are basically peers, without management nodes. If you want all nodes to shut down, you can only shut down the process. # pkill-9 Redis
All the clusters are closed and then restarted, and the following error is reported
# redis-trib.rb Create--replicas 1 xxx.xxx.xxx.xxx:6379 etc
will report the following error,
[ERR] Node 192.168.10.219:6379 is not empty. Either the node already knows other nodes (check with CLUSTER nodes) or contains some key in database 0.

The first time the cluster started,/etc/redis only redis.conf, so I would like to remove all other files except redis.conf, in the boot must be OK, but the cluster is data, so keep the configuration file and data files.


# Cd/etc/redis

# rm-f *.aof nodes-63*

# ll//retention of configuration files and data files

Total Dosage 204
-rw-r--r--1 root 18 May 7 11:21 Dump-6379.rdb
-rw-r--r--1 root 18 May 7 11:21 Dump-6380.rdb
-rw-r--r--1 root 18 May 7 11:21 Dump-6381.rdb
-rw-r--r--1 root 41412 April 23:30 redis-6379.conf
-rw-r--r--1 root 41412 April 23:39 redis-6380.conf
-rw-r--r--1 root 41412 April 23:39 redis-6381.conf

This can be started, but the original data is still lost, do not know is their own ideas, or Redis cluster did not consider, all nodes will be hung out of the situation.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.