首页 > 其他 > 详细

redis启动失败的排查

时间:2019-10-14 14:51:32      阅读:144      评论:0      收藏:0      [点我收藏+]
今早还才7点钟,公司说app挂了,相关开发瞬间绷起神经,一时间群魔乱舞,最终到我这儿需要重新启动redis,于是乎我到公司第一件事就是查看关于redis的问题。

开机,xhell连上服务器,网速太慢,xhell卡顿,以为网速问题,打开宝塔,宝塔界面正常打开,里面的redis点击重启,重启失败,重新加载配置,失败,启动,毫无疑问,依然失败。那么问题就只能在服务器里看了。
于是开始我排错步骤:
第一步:启动redis的同时,查找日志。
悲剧的是redis没有启动日志,找到redis的配置文件,添加启动日志文件。
logfile "/www/server/redis/redis.log"

技术分享图片

此时,重新启动redis,查看日志

26654:C 14 Oct 2019 09:34:28.178 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
26654:C 14 Oct 2019 09:34:28.178 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=26654, just started
26654:C 14 Oct 2019 09:34:28.179 # Configuration loaded
                _._
           _.-``__ ‘‘-._
      _.-``    `.  `_.  ‘‘-._           Redis 5.0.5 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ‘‘-._
 (    ‘      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|‘` _.-‘|     Port: 6379
 |    `-._   `._    /     _.-‘    |     PID: 26655
  `-._    `-._  `-./  _.-‘    _.-‘
 |`-._`-._    `-.__.-‘    _.-‘_.-‘|
 |    `-._`-._        _.-‘_.-‘    |           http://redis.io
  `-._    `-._`-.__.-‘_.-‘    _.-‘
 |`-._`-._    `-.__.-‘    _.-‘_.-‘|
 |    `-._`-._        _.-‘_.-‘    |
  `-._    `-._`-.__.-‘_.-‘    _.-‘
      `-._    `-.__.-‘    _.-‘
          `-._        _.-‘
              `-.__.-‘

26655:M 14 Oct 2019 09:34:28.182 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
26655:M 14 Oct 2019 09:34:28.182 # Server initialized
26655:M 14 Oct 2019 09:34:28.182 # WARNING overcommit_memory is set to 0! Background savemay fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1‘ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1‘ for this to take effect.
26655:M 14 Oct 2019 09:34:28.182 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command ‘echo never > /sys/kernel/mm/transparent_hugepage/enabled‘ asroot, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
26655:M 14 Oct 2019 09:34:28.182 * Reading RDB preamble from AOF file...
26655:M 14 Oct 2019 09:34:28.189 * Reading the remaining AOF tail...
26655:M 14 Oct 2019 09:34:28.189 # Unknown command ‘DEL‘ reading the append only file
28784:C 14 Oct 2019 09:39:40.176 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
28784:C 14 Oct 2019 09:39:40.176 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=28784, just started

redis启动失败的排查

原文:https://blog.51cto.com/12889016/2442266

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!