发现个问题: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. 【python】使用爬虫爬取动漫之家漫画全部更新信息

    本篇仅在于交流学习 网站名称为: https://manhua.dmzj.com/ 1.首先将相应的库导入: import requests from lxml import etree 2.确定漫画 ...

  2. selenium测试用例的编写,隐式等待与显式等待的编写

    开头 用配置好的 selenium 进行一个简单的测试用例的编写,可以参考allure的美化这一遍博文 https://www.cnblogs.com/c-keke/p/14837766.html 代 ...

  3. APP中RN页面热更新流程-ReactNative源码分析

    平时使用WebStorm或VSCode对RN工程中的文件修改后,在键盘上按一下快捷cmd+s进行文件保存,此时当前调试的RN页面就会自动进行刷新,这是RN开发相比于原生开发一个很大的优点:热更新. 那 ...

  4. AcWing 3956. 截断数组

    给定一个长度为 n 的数组 a1,a2,-,an. 现在,要将该数组从中间截断,得到三个非空子数组. 要求,三个子数组内各元素之和都相等. 请问,共有多少种不同的截断方法? 输入格式 第一行包含整数 ...

  5. Windows 11 和 Rocky 9 Linux 平台 MySQL 8.0.33 简易安装教程

    目录 Windows 平台安装 MySQL Linux 平台 Rocky 9 安装 MySQL binary package rpm package yum 源 source package Wind ...

  6. 预测 motif 的计算原理

    本文章来源于简书,作者小潤澤,已获原作者授权:部分内容有调整. 前言 蛋白质中功能的基本单元是 domain,是一种特殊的三维结构,不同结构的 domain 与其他分子特异性结合从而发挥功能.与此类似 ...

  7. JumpServer安装及应用

    jumpserver安装 安装所需软件包 [root@localhost ~]# yum -y update [root@localhost ~]# dnf install -y wget curl ...

  8. Windows 10 开启子系统Ubuntu

    卸载原有的wsl 分发子系统 # 查看已安装的wsl子系统 wsl --list # 依次删除wsl 子系统 wsl --unregister <子系统名称> 结果 安装子系统Ubuntu ...

  9. Linux下Redis集群部署

    一.Redis集群介绍 Redis 集群是一个提供在多个Redis节点间共享数据的程序集.Redis集群并不支持处理多个keys的命令,因为这需要在不同的节点间移动数据,从而达不到像Redis那样的性 ...

  10. PostgreSQL 新手入门指引

    自从MySQL被Oracle收购以后,PostgreSQL 逐渐成为开源关系型数据库的首选. 本文介绍PostgreSQL的安装和基本用法,供初次使用者上手.以下内容基于Debian操作系统,其他操作 ...