发现个问题:redis集群所在服务器,磁盘空间很快就被占满,使用 “du -sh *”查看每个文件夹的大小,发现redis集群三个从节点的日志文件占用空间很大。

下面记录问题排查及解决办法:


1. redis集群从节点日志文件

2. 查看redis集群从节点日志文件信息

32947:S 12 Dec 2022 11:12:17.970 * Retrying with SYNC...
32947:S 12 Dec 2022 11:12:17.970 # MASTER aborted replication with an error: NOAUTH Authentication required.
32947:S 12 Dec 2022 11:12:17.970 * Reconnecting to MASTER 192.168.0.120:6691 after failure
32947:S 12 Dec 2022 11:12:17.970 * MASTER <-> REPLICA sync started
32947:S 12 Dec 2022 11:12:17.970 * Non blocking connect for SYNC fired the event.
32947:S 12 Dec 2022 11:12:17.970 * Master replied to PING, replication can continue...
32947:S 12 Dec 2022 11:12:17.970 * (Non critical) Master does not understand REPLCONF listening-port: -NOAUTH Authentication required.
32947:S 12 Dec 2022 11:12:17.970 * (Non critical) Master does not understand REPLCONF capa: -NOAUTH Authentication required.
32947:S 12 Dec 2022 11:12:17.970 * Partial resynchronization not possible (no cached master)
32947:S 12 Dec 2022 11:12:17.971 # Unexpected reply to PSYNC from master: -NOAUTH Authentication required.
32947:S 12 Dec 2022 11:12:17.971 * Retrying with SYNC...
32947:S 12 Dec 2022 11:12:17.971 # MASTER aborted replication with an error: NOAUTH Authentication required.
32947:S 12 Dec 2022 11:12:17.971 * Reconnecting to MASTER 192.168.0.120:6691 after failure
32947:S 12 Dec 2022 11:12:17.971 * MASTER <-> REPLICA sync started
32947:S 12 Dec 2022 11:12:17.971 * Non blocking connect for SYNC fired the event.
32947:S 12 Dec 2022 11:12:17.971 * Master replied to PING, replication can continue...
32947:S 12 Dec 2022 11:12:17.971 * (Non critical) Master does not understand REPLCONF listening-port: -NOAUTH Authentication required.
32947:S 12 Dec 2022 11:12:17.971 * (Non critical) Master does not understand REPLCONF capa: -NOAUTH Authentication required.
32947:S 12 Dec 2022 11:12:17.971 * Partial resynchronization not possible (no cached master)
32947:S 12 Dec 2022 11:12:17.971 # Unexpected reply to PSYNC from master: -NOAUTH Authentication required.
32947:S 12 Dec 2022 11:12:17.971 * Retrying with SYNC...
32947:S 12 Dec 2022 11:12:17.971 # MASTER aborted replication with an error: NOAUTH Authentication required.
32947:S 12 Dec 2022 11:12:17.971 * Reconnecting to MASTER 192.168.0.120:6691 after failure
32947:S 12 Dec 2022 11:12:17.971 * MASTER <-> REPLICA sync started
32947:S 12 Dec 2022 11:12:17.971 * Non blocking connect for SYNC fired the event.
32947:S 12 Dec 2022 11:12:17.971 * Master replied to PING, replication can continue...
32947:S 12 Dec 2022 11:12:17.971 * (Non critical) Master does not understand REPLCONF listening-port: -NOAUTH Authentication required.
32947:S 12 Dec 2022 11:12:17.971 * (Non critical) Master does not understand REPLCONF capa: -NOAUTH Authentication required.
32947:S 12 Dec 2022 11:12:17.971 * Partial resynchronization not possible (no cached master)
32947:S 12 Dec 2022 11:12:17.971 # Unexpected reply to PSYNC from master: -NOAUTH Authentication required.

3. 问题原因

  原因是master节点设置了密码,而在从节点的配置中,没有配置masterauth参数导致的。

  当进行主从配置的时候,如果master节点开启了安全机制并设置了密码的话,就需要在从节点配置文件中配置masterauth参数,该参数就是master节点的密码(即master节点中requirepass参数的值),否则的话,master节点会拒绝同步请求。redis一直抛异常,文件不断增大,直至磁盘空间占满。

4. 解决办法

  三个从节点的masterauth参数均配置密码后,重启redis集群,问题解决。

redis集群:MASTER aborted replication with an error: NOAUTH Authentication required.的更多相关文章

  1. redis安全 (error) NOAUTH Authentication required

    Redis 安全 我们可以通过 redis 的配置文件设置密码参数,这样客户端连接到 redis 服务就需要密码验证,这样可以让你的 redis 服务更安全. 实例 我们可以通过以下命令查看是否设置了 ...

  2. Redis报错 : (error) NOAUTH Authentication required.

    原文:Redis报错 : (error) NOAUTH Authentication required. 这个错误是因为没有用密码登陆认证 , 先输入密码试试 . 127.0.0.1:6379> ...

  3. Redis (error) NOAUTH Authentication required.

    首先查看redis设置密码没 127.0.0.1:6379> config get requirepass 1) "requirepass" 2) "" ...

  4. Redis集群master选举时长测试

    在一台物理机上启动6个Redis实例,组成3主3从集群,端口号依次为:1379 ~ 1384,端口号1379.1380和1384三个为master,端口1379的进程ID为17620.现将进程1762 ...

  5. Redis (error) NOAUTH Authentication required.解决方法

    当设置redis密码后,打开客户端,需要使用密码验证 auth 123456 就是设置的密码

  6. redis 执行操作时提示(error) NOAUTH Authentication required.

    (error) NOAUTH Authentication required. 出现认证问题,设置了认证密码,输入密码即可 127.0.0.1:6379> auth 123456

  7. Redis报(error) NOAUTH Authentication required.问题解决

    启动后 输入auth+空格+密码 ok

  8. REdis MASTER aborted replication NOAUTH Authentication required

    对于REdis集群,如果设置了requirepass,则一定要设置masterauth,否则从节点无法正常工作,查看从节点日志可以看到哪下内容:19213:S 22 Apr 2019 10:52:17 ...

  9. 在windows上搭建redis集群

    一 所需软件 Redis.Ruby语言运行环境.Redis的Ruby驱动redis-xxxx.gem.创建Redis集群的工具redis-trib.rb 二 安装配置redis redis下载地址   ...

  10. docker 实现redis集群搭建

    摘要:接触docker以来,似乎养成了一种习惯,安装什么应用软件都想往docker方向做,今天就想来尝试下使用docker搭建redis集群. 首先,我们需要理论知识:Redis Cluster是Re ...

随机推荐

  1. 2021-08-21:给定一个数组arr,长度为N > 1,从中间切一刀,保证左部分和右部分都有数字,一共有N-1种切法,如此多的切法中,每一种都有:绝对值(左部分最大值 – 右部分最大值)。返回最大

    2021-08-21:给定一个数组arr,长度为N > 1,从中间切一刀,保证左部分和右部分都有数字,一共有N-1种切法,如此多的切法中,每一种都有:绝对值(左部分最大值 – 右部分最大值).返 ...

  2. 500行代码手写docker开篇-goland远程编译环境配置

    (1)500行代码手写docker开篇-goland远程编译环境配置 本系列教程主要是为了弄清楚容器化的原理,纸上得来终觉浅,绝知此事要躬行,理论始终不及动手实践来的深刻,所以这个系列会用go语言实现 ...

  3. openlayers Text字体大小设置

    今做一个app版的ol地图,发现区域太小显示拥挤,于是想把字体改小,看起来匀称点,于是盯紧了font属性使劲改 老是不听咋整呢?网上找大佬 于是找到了得到了各路大神鼎力相助 如: 赶紧跑去试试,原来这 ...

  4. flutter中使用pubspec.yaml更改package name

    在flutter 项目中使用pubspec.yaml文件进行依赖资源相关配置是常有的事 但是刚发现它可以修改name来控制项目包名称,当初创建了不同的项目名git后还到每个文件里去修改import(麻 ...

  5. APP调用第三方(微信)登录(最详细的实现流程)

    最近使用weexplus做了个app 用户需要的是可以使用第三方微信实现登录(虽然网上有很多相关的什么申请开发者账户.appid.openid等资料:但是都是讲的中间的那一部分请原谅我是个菜鸟,脑补开 ...

  6. drf——登录功能、认证、权限、频率组件(Django转换器、配置文件作用)

    Django转换器.配置文件作用 # django转换器 2.x以后 为了取代re_path int path('books/<int:pk>')--->/books/1---> ...

  7. 非 root 用户手动编译安装 GCC

    我们知道,关于 GCC 在 CentOS 下通过 yum 安装默认版本号,CentOS 5 是 4.1.2:CentOS 6 是 4.4.7:CentOS 7 是 4.8.3.很多时候在编译安装软件都 ...

  8. 10.1. Java性能调优

    Java性能调优是一个复杂且重要的主题,它涉及到了JVM.垃圾收集器.内存管理.多线程.代码优化等多个方面.在本节中,我们将对Java性能调优的基本概念和方法进行简要介绍. 10.1.1. 理解性能指 ...

  9. 天翼云SD-WAN解决方案直播

    2023年6月16日14点,天翼云SD-WAN解决方案直播火热来袭啦!参与直播即可领取优惠好礼,实惠多多! 点击链接注册参与:https://ctyun.d1meeting.cn/0616/ 直播时间 ...

  10. IDEA2021.3.3使用

    下载文件 :ja-netfilter-all-2021.3.3 激活码 : P29GTZBZ3Y-eyJsaWNlbnNlSWQiOiJQMjlHVFpCWjNZIiwibGljZW5zZWVOYW1 ...