当前位置:   article > 正文

记录一次在centos 8 下docker 安装reids 一直报错无法启动问题_fatal: can't initialize background jobs.

fatal: can't initialize background jobs.

目录

1.首先翻看了网上大部分启动失败原因总结如下  可以使用docker logs reids查看启动失败原因

1.1启动挂载目录失败  通常是没有创建目录

1.2启动闪退  通常为配置文件 daemonize yes 没有改成 no 导致

1.3启动之后直接报错 Fatal: Can't initialize Background Jobs 然后无限重启  请不要直接使用centos 安装最新版docker  和 redis   他们之间会起冲突 具体原因我翻看了一下redis的github找到才知道​编辑

2.我使用docker reids命令 

3.redis.conf


1.首先翻看了网上大部分启动失败原因总结如下  可以使用docker logs reids查看启动失败原因

1.1启动挂载目录失败  通常是没有创建目录

1.2启动闪退  通常为配置文件 daemonize yes 没有改成 no 导致

1.3启动之后直接报错 Fatal: Can't initialize Background Jobs 然后无限重启  请不要直接使用centos 安装最新版docker  和 redis   他们之间会起冲突 具体原因我翻看了一下redis的github找到才知道

                

2.我使用docker reids命令 

        使用云服务器的切记密码不要为123456!!!会被挖矿

docker run --restart=always --log-opt max-size=100m --log-opt max-file=2 -p 6379:6379 --name redis -v /usr/local/docker/redis/redis.conf:/etc/redis/redis.conf -v /usr/local/docker/redis/data:/data -d redis:6.2.7 redis-server /etc/redis/redis.conf  --appendonly yes  --requirepass 123456

3.我使用的redis.conf

  1. # bind 192.168.1.100 10.0.0.1
  2. # bind 127.0.0.1 ::1
  3. #bind 127.0.0.1
  4. protected-mode no
  5. port 6379
  6. tcp-backlog 511
  7. requirepass 123456
  8. timeout 0
  9. tcp-keepalive 300
  10. daemonize no
  11. supervised no
  12. pidfile /var/run/redis_6379.pid
  13. loglevel notice
  14. logfile ""
  15. databases 30
  16. always-show-logo yes
  17. save 900 1
  18. save 300 10
  19. save 60 10000
  20. stop-writes-on-bgsave-error yes
  21. rdbcompression yes
  22. rdbchecksum yes
  23. dbfilename dump.rdb
  24. dir ./
  25. replica-serve-stale-data yes
  26. replica-read-only yes
  27. repl-diskless-sync no
  28. repl-disable-tcp-nodelay no
  29. replica-priority 100
  30. lazyfree-lazy-eviction no
  31. lazyfree-lazy-expire no
  32. lazyfree-lazy-server-del no
  33. replica-lazy-flush no
  34. appendonly yes
  35. appendfilename "appendonly.aof"
  36. no-appendfsync-on-rewrite no
  37. auto-aof-rewrite-percentage 100
  38. auto-aof-rewrite-min-size 64mb
  39. aof-load-truncated yes
  40. aof-use-rdb-preamble yes
  41. lua-time-limit 5000
  42. slowlog-max-len 128
  43. notify-keyspace-events ""
  44. hash-max-ziplist-entries 512
  45. hash-max-ziplist-value 64
  46. list-max-ziplist-size -2
  47. list-compress-depth 0
  48. set-max-intset-entries 512
  49. zset-max-ziplist-entries 128
  50. zset-max-ziplist-value 64
  51. hll-sparse-max-bytes 3000
  52. stream-node-max-bytes 4096
  53. stream-node-max-entries 100
  54. activerehashing yes
  55. hz 10
  56. dynamic-hz yes
  57. aof-rewrite-incremental-fsync yes
  58. rdb-save-incremental-fsync yes

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/409176
推荐阅读
相关标签
  

闽ICP备14008679号