from: https://www.cnblogs.com/topicjie/p/7603227.html

缘起

  正在欢乐的逗着孩子玩耍,突然间来了一通电话,值班人员告诉我误重启了一台服务器,是我负责的服务,感觉都要吓飞了,赶紧打开电脑查看次服务器上跑的是什么业务,

不看不知道,一看吓一跳,尼玛,是著名的redis cluster集群中的一台服务器,此时此刻心中一万个草泥马奔腾而过。。。。

剖析

  此集群是26台512G内存搭建的redis cluster,数据量已经达到了4T,每个服务器上篇对应24个实例,每个实例的内存配置为20G。

首先我登录了一台集群中的另外一台服务器B,通过B连接上redis 集群,使用cluster info 命令查看发现集群状态是ok的,显然已经自动failover。不幸中的大幸,辛亏是这个集群,

此集群是有副本的,解决了单点故障问题,若是其它两个集群中的主机后果不敢想象。此时此刻就展示出HA的重要性了,Down掉一台服务器,集群整体不受影响,另外服务请求

可能会出现少量的错误,因为有可能槽位再切换中。

恢复

  我登录刚刚重启的这个服务器之后,使用脚本启动所有的实例,大约过了30分钟,22个实例启动完毕,数据完全加载到内存,并且实例再集群中的状态已经恢复,此过程是自动的,redis cluster 还是很给力从这方面来讲。当我使用 redis-cli -p 6381 cluster nodes|grep fail 的时候发现还有两个实例是fail状态。赶紧检查。

1
2
53faad9cd4257f33eaaa92f40f7439bf2f30db21 10.34.2.15:6396 slave,fail 8269ee58f563a5961755ee7f782794c7f79f8077 1506431668362 1506431655787 908 disconnected
2cc8f7f49bb7f28dc383b6113080bae4f3b2e375 10.34.2.15:6388 slave,fail ceb54aabf39b0c8c88a205294724be76295c4ab9 1506431660074 1506431647510 1272 disconnected

故障主机 10.34.2.15 的 6396redis日志中发现了如下的报错:

1
5927:M 26 Sep 21:39:37.527 # Unrecoverable error: corrupted cluster config file.

  

检查cluster生成的node文件,发现文件中缺失信息,最后一行出现了半行不完整的数据记录。我的处理方法是将所有的都清理掉,只保留myself那行。

然后再次启动redis实例,则加载成功。

反思

  cluster的配置文件出现不完整信息原因是因为服务器硬重启导致,而服务器重启是人为的误操作导致,最根本的还是在人。慢一点可以,但是千万不要搞错啊。。。。

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。 http://www.cnblogs.com/topicjie/

Unrecoverable error: corrupted cluster config file.的更多相关文章

  1. MongoDB_"Error parsing YAML config file: yaml-cpp: error at line 3, column 9: illegal map value"解决方法

    在启动配置文件的时候,系统报错:Error parsing YAML config file: yaml-cpp: error at line 3, column 9: illegal map val ...

  2. Fontconfig error: Cannot load config file "infinality/conf.d"

    reference: https://forums.gentoo.org/viewtopic-t-1079210-start-0.html resolved with following method ...

  3. error in config file "/etc/rabbitmq/rabbitmq.config"

    记录一次RabbitMQ配置文件配置错误 error信息: dill@ubuntu-vm:/usr/share/doc/rabbitmq-server$ sudo /usr/lib/rabbitmq/ ...

  4. ERROR: No pool defined. at least one pool section must be specified in config file

    root@ubuntu:/opt/php7# /opt/php7/sbin/php-fpm [22-Sep-2015 14:29:00] WARNING: Nothing matches the in ...

  5. CRITICAL:yum.cli:Config Error: Error accessing file for config file:///etc/yum.conf

    先试试yum install gcc  , 1,下载最新的yum-3.2.28.tar.gz并解压 #wget http://yum.baseurl.org/download/3.2/yum-3.2. ...

  6. mysql 帮助手册 以及 warning: World-writable config file 以及 ERROR 1840 (HY000) at line 24:

    1. mysql --help 2.报错 报错Warning: World-writable config file http://www.jb51.net/article/99027.htm 最近在 ...

  7. DVWA----DVWA System error - config file not found. Copy config/config.inc.php.dist to config/config.inc.php and configure to your environment.

    DVWA简介:DVWA(Damn Vulnerable Web Application)是一个用来进行安全脆弱性鉴定的PHP/MySQL Web应用,旨在为安全专业人员测试自己的专业技能和工具提供合法 ...

  8. o] TortoiseGit错误 - Could not get all refs. libgit2 returned: corrupted loose reference file

    因无法追溯的同步操作错误或工程文件错误,造成Git 同步时报错: Could not get all refs. libgit2 returned: corrupted loose reference ...

  9. gd-jpeg: JPEG library reports unrecoverable error 解决办法

    Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecov ...

随机推荐

  1. uva 1619 - Feel Good || poj 2796 单调栈

    1619 - Feel Good Time limit: 3.000 seconds   Bill is developing a new mathematical theory for human ...

  2. Codeforces Round #341 (Div. 2) C. Mike and Chocolate Thieves 二分

    C. Mike and Chocolate Thieves time limit per test 2 seconds memory limit per test 256 megabytes inpu ...

  3. 轻量级 HTTP(s) 代理 TinyProxy

      J CentOS 下安装 TinyProxy yum install -y tinyproxy 启动.停止.重启 # 启动service tinyproxy start# 停止service ti ...

  4. Win10配Theano环境和Keras框架

    网络上有各种各样的win7 64bit安装theano的方法,我也试过好多,各种各样的问题.因为之前没了解过MinGw等东西,所以安装起来比较费劲,经过不断的尝试,最终我按照以下过程安装成功. 其实过 ...

  5. php特级课---4、网站服务监控

    php特级课---4.网站服务监控 一.总结 一句话总结:这些是架构师的知识 网络流量监控:cacti,mrtg 邮件报警系统:postfix 压力测试工具:Apache压力测试软件-ab,Mysql ...

  6. 应用性能管理工具PinPoint介绍

    概述: 下面介绍一个开源的 APM (Application Performance Management/应用性能管理)工具 - Pinpoint.一个分布式事务跟踪系统的平台,思路基于google ...

  7. 【Python】日期模块总结

    Time Tuple: 索引 字段 值 0 年(四位数字) 2015 1 月份 1 - 12 2 日期 1 - 31 3 小时 0 - 23 4 分钟 0 - 59 5 秒 0 - 61 (60 或 ...

  8. Bootstrap 可视化布局--拖拽后弹窗进行编辑

    Bootstrap 可视化布局--拖拽后弹窗进行编辑 最近后台想一个需求,使用可视化布局-中文 | en中拖拽表格后,弹窗进行编辑,保存下载后在后台生成pdf格式. 奈何各种问题不断,使用 jquer ...

  9. C# 实现QQ式截图功能

    这个功能一共有两部分组成,第一部分是窗体代码,另外的一部分是一个辅助方法.直接贴出代码,以供大家参考: using System; using System.Collections.Generic; ...

  10. LeetCode OJ:Find Median from Data Stream(找数据流的中数)

    Median is the middle value in an ordered integer list. If the size of the list is even, there is no ...