当前位置: 首页> 科技> IT业 > redis被攻击redis READONLY You can‘t write against a read only slave.

redis被攻击redis READONLY You can‘t write against a read only slave.

时间:2025/7/12 6:11:39来源:https://blog.csdn.net/lgq1368853532/article/details/141826704 浏览次数:0次

 redis 日志路径
/var/log/redis

拿下来后发现有这种错误

Operation now in progress

可能是网络断开导致,

查找redis

whereis redis

修改

vim /etc/redis.conf

大概在300行 下面代码yes改no

slave-read-only no

重启redis

sudo systemctl restart redis.service
 

之后就可以了

也可能是redis被攻击

修改redis.confrequirepass配置项为强密码

修改redis.confport 端口号

protected-mode yes 开启保护模式

若没设置添加

bind localhost

记得代码也要改application.yml文件

全部使用localhost

关键字:redis被攻击redis READONLY You can‘t write against a read only slave.

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: