• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Redisarm64架构,docker的Redis出现Failed to test the kernel for a bug that could lead to data corruption

武飞扬头像
林木木木木木木木木木
帮助3

一、问题说明

在运行docker的redis镜像,log打印

# Failed to test the kernel for a bug that could lead to data corruption during background save. Your system could be affected, please report this error.
# Redis will now exit to prevent data corruption. Note that it is possible to suppress this warning by setting the following config: ignore-warnings ARM64-COW-BUG

翻译:

#无法测试内核是否存在可能导致后台保存期间数据损坏的错误。您的系统可能受到影响,请报告此错误。

#Redis现在将退出以防止数据损坏。请注意,可以通过设置以下配置来抑制此警告:忽略警告ARM64-COW-BUG

二、解决方法

解决方式很简单,日志已经提醒需要在redis.config中添加配置 

 ignore-warnings ARM64-COW-BUG

但是,容器都没启动成功,根本没法获取容器中的redis.conf文件。

因此,需要先在宿主机上配置好redis.conf,再映射进容器中

我们需要在redis官网找到对应redis版本的配置文件,版本可以在dockerHub上查

Redis configuration | RedisOverview of redis.conf, the Redis configuration file学新通https://redis.io/docs/manual/config/

1、查找redis镜像使用的版本

学新通

2、在官网找到对应版本,复制进创建的redis.conf学新通 

 3、然后将配置文件最后一行#ignore-warnings ARM64-COW-BUG的注释#去掉, 保存即可

学新通

4、然后重新运行redis容器

  1.  
    # 映射配置文件所在地址: -v /docker_home/redis_home/conf:/usr/local/etc/redis
  2.  
    # 映射redis数据保存地址: -v/docker_home/redis_home/data:/data
  3.  
    # 使用配置文件:redis-server /usr/local/etc/redis/redis.conf
  4.  
    # 设置默认将数据保存到磁盘时间60秒:--save 60 1
  5.  
    # 映射6379端口:-p 6379:6379
  6.  
     
  7.  
    docker run -v /docker_home/redis_home/conf:/usr/local/etc/redis -v/docker_home/redis_home/data:/data -p 6379:6379 -d --name redis redis redis-server /usr/local/etc/redis/redis.conf --save 60 1

 顺利运行

学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhfeigah
系列文章
更多 icon
同类精品
更多 icon
继续加载