Redis配置为保存RDB快照,但当前无法在磁盘上持久保存-Ubuntu Server [英] Redis is configured to save RDB snapshots, but it is currently not able to persist on disk - Ubuntu Server

查看:143
本文介绍了Redis配置为保存RDB快照,但当前无法在磁盘上持久保存-Ubuntu Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 redis alpine容器,并且在生产过程中-我的服务器上出现此错误.我发现 MISCONF Redis配置为保存RDB快照并经历了它,但是其中的任何建议都没有奏效.

I'm using a container of redis alpine and i get this error just in production - on my server. I've found MISCONF Redis is configured to save RDB snapshots and gone through it but none of the advice in there works.

这是错误消息:

    $ node dist/queue.js

events.js:174
      throw er; // Unhandled 'error' event
      ^
ReplyError: MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
    at parseError (/home/deploy/gympoint/node_modules/redis-parser/lib/parser.js:193:12)
    at parseType (/home/deploy/gympoint/node_modules/redis-parser/lib/parser.js:303:14)
Emitted 'error' event at:
    at /home/deploy/gympoint/node_modules/beequeue/lib/queue.js:322:14
    at /home/deploy/gympoint/node_modules/beequeue/lib/queue.js:177:21
    at Object.callbackOrEmit [as callback_or_emit] (/home/deploy/gympoint/node_modules/redis/lib/utils.js:89:9)
    at RedisClient.return_error (/home/deploy/gympoint/node_modules/redis/index.js:706:11)
    at JavascriptRedisParser.returnError (/home/deploy/gympoint/node_modules/redis/index.js:196:18)
    at JavascriptRedisParser.execute (/home/deploy/gympoint/node_modules/redis-parser/lib/parser.js:572:12)
    at Socket.<anonymous> (/home/deploy/gympoint/node_modules/redis/index.js:274:27)
    at Socket.emit (events.js:198:13)
    at addChunk (_stream_readable.js:287:12)
    at readableAddChunk (_stream_readable.js:268:11)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

推荐答案

发生此错误的原因之一是当您使用Redis容器而没有受到卷的攻击时.要解决此问题,只需将以下行添加到您的docker compose文件中:

One of the reasons this error occurs is when you use Redis container without a volume attacked to it. To solve this issue just put the following lines to your docker compose file:

volumes:
    - "./redis-data:/data"

这篇关于Redis配置为保存RDB快照,但当前无法在磁盘上持久保存-Ubuntu Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆