MISCONF Redis配置为保存RDB快照,但当前无法持久保存在磁盘上.可能修改数据集的命令被禁用 [英] MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled
问题描述
在var/reports文件中连续获取此错误. 我尝试了以下链接解决方案,但仍未解决. 任何人都可以帮助我,因为它现在很重要.
Get continuously this error in var/reports file. I tried below link solution but still it not fixed. Can anyone please help me for this as it goes on critical now.
推荐答案
我已经在在此处回答了.也将其发布在这里
I have written this same answer here. Posting it here as well
TL; DR 您的redis不安全.使用来自此链接的redis.conf对其进行保护
TL;DR Your redis is not secure. Use redis.conf from this link to secure it
长答案:
这可能是由于不安全的redis-server
实例所致. Docker容器中的默认Redis映像是不安全的.
This is possibly due to an unsecured redis-server
instance. The default redis image in a docker container is unsecured.
我仅使用redis-cli -h <my-server-ip>
为了解决这个问题,我经历了此DigitalOcean文章以及其他许多文章,都能够关闭该端口.
To sort this out, I went through this DigitalOcean article and many others and was able to close the port.
- 您可以从此处
- 然后将您的docker-compose
redis
部分更新为(相应地更新文件路径)
- You can pick a default redis.conf from here
- Then update your docker-compose
redis
section to(update file paths accordingly)
redis:
restart: unless-stopped
image: redis:6.0-alpine
command: redis-server /usr/local/etc/redis/redis.conf
env_file:
- app/.env
volumes:
- redis:/data
- ./app/conf/redis.conf:/usr/local/etc/redis/redis.conf
ports:
- "6379:6379"
command
和volumes
中redis.conf
的路径应匹配
- 根据需要重建redis或所有服务
- 尝试使用
redis-cli -h <my-server-ip>
进行验证(它已停止为我工作)
- rebuild redis or all the services as required
- try to use
redis-cli -h <my-server-ip>
to verify (it stopped working for me)
这篇关于MISCONF Redis配置为保存RDB快照,但当前无法持久保存在磁盘上.可能修改数据集的命令被禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!