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

谁说胖子不能爱 提交于 2020-05-17 08:07:20

问题


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.

MISCONF Redis is configured to save RDB snapshots


回答1:


I have written this same answer here. Posting it here as well

TL;DR Your redis is not secure. Use redis.conf from this link to secure it

long answer:

This is possibly due to an unsecured redis-server instance. The default redis image in a docker container is unsecured.

I was able to connect to redis on my webserver using just redis-cli -h <my-server-ip>

To sort this out, I went through this DigitalOcean article and many others and was able to close the port.

  • 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"

the path to redis.conf in command and volumes should match

  • rebuild redis or all the services as required
  • try to use redis-cli -h <my-server-ip> to verify (it stopped working for me)


来源:https://stackoverflow.com/questions/57456455/misconf-redis-is-configured-to-save-rdb-snapshots-but-is-currently-not-able-to

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!