【问题标题】:Redis is configured to save RDB snapshots, but it is currently not able to persist on disk - Ubuntu ServerRedis 配置为保存 RDB 快照,但目前无法持久保存在磁盘上 - Ubuntu Server
【发布时间】:2019-11-17 18:49:01
【问题描述】:

我正在使用 redis alpine 容器,我只是在生产中遇到此错误 - 在我的服务器上。 我找到了MISCONF Redis is configured to save RDB snapshots 并通过了它,但那里的建议都不起作用。

这是错误信息:

    $ 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.

【问题讨论】:

    标签: node.js docker deployment redis


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2018-01-09
      • 2013-11-21
      • 2019-01-02
      • 2020-05-23
      • 1970-01-01
      • 2013-11-04
      • 2016-02-15
      • 2020-06-29
      • 1970-01-01
      相关资源
      最近更新 更多