什么是Redis改变自己的配置

问题描述 投票:1回答:1

Redis将自己的配置目录改为 和 dbfile 和db文件到 ntp 而不是默认配置。一旦我们重启redis,它将重置为varlibredis和dump.rdb,但过了一段时间,它给出了 "Failed opening the RDB file "的错误信息。

默认的dire和rdb文件有正确的权限,redis只允许内部IP。

cli输出

127.0.0.1:6381> CONFIG GET dir
1) "dir"
2) "/etc/cron.d"
127.0.0.1:6381> CONFIG GET "dbfilename"
1) "dbfilename"
2) "ntp"

varlogredisredis-server.log。

3204:M 21 May 16:07:19.124 * Background saving terminated with success
3204:M 21 May 16:12:18.962 * 10000 changes in 60 seconds. Saving...
3204:M 21 May 16:12:18.967 * Background saving started by pid 25469
25469:C 21 May 16:12:20.931 * DB saved on disk
25469:C 21 May 16:12:20.934 * RDB: 3 MB of memory used by copy-on-write
3204:M 21 May 16:12:20.968 * Background saving terminated with success

3204:M 21 May 16:17:21.082 * 10 changes in 300 seconds. Saving...
3204:M 21 May 16:17:21.088 * Background saving started by pid 25865
25865:C 21 May 16:17:22.800 * DB saved on disk
25865:C 21 May 16:17:22.803 * RDB: 3 MB of memory used by copy-on-write
3204:M 21 May 16:17:22.891 * Background saving terminated with success
3204:M 21 May 16:17:43.669 # Failed opening the RDB file root (in server root dir /var/spool/cron) for saving: Read-only file system
3204:M 21 May 16:17:45.320 # Failed opening the RDB file ntp (in server root dir /etc/cron.d) for saving: Read-only file system
3204:M 21 May 16:22:23.086 * 10 changes in 300 seconds. Saving...
3204:M 21 May 16:22:23.092 * Background saving started by pid 26264
26264:C 21 May 16:22:23.093 # Failed opening the RDB file ntp (in server root dir /etc/cron.d) for saving: Read-only file system
3204:M 21 May 16:22:23.194 # Background saving error
3204:M 21 May 16:22:29.104 * 10 changes in 300 seconds. Saving...
3204:M 21 May 16:22:29.109 * Background saving started by pid 26265
26265:C 21 May 16:22:29.109 # Failed opening the RDB file ntp (in server root dir /etc/cron.d) for saving: Read-only file system
3204:M 21 May 16:22:29.209 # Background saving error
3204:M 21 May 16:22:35.016 * 10 changes in 300 seconds. Saving...
redis ubuntu-18.04
1个回答
1
投票

你的服务器是否可以在互联网上公开访问?

最有可能的解释是,有人连接到redis,并远程发送命令来重新配置它,试图控制服务器。

有机器人在互联网上扫描247,寻找暴露的软件和已知的漏洞。快速的经验法则是,一个新服务上线后,会在5分钟内被发现并被攻击。试着运行一个未打补丁的Windows XP服务器,会惊讶于它持续的时间有多短)。

考虑到redis和潜在的整个服务器都被入侵了。我替你希望这个redis中没有敏感信息,否则就是数据泄露。

阻止公共访问,停用虚拟机,从头设置一个新的虚拟机。

相关的redis ticket。https: /github.comantirezredissues3594

© www.soinside.com 2019 - 2024. All rights reserved.