redis报(error) ERR Errors trying to SHUTDOWN. Check logs.


今天重启redis 无法正常关闭报(error) ERR Errors trying to SHUTDOWN. Check logs.错误

[zykj@localhost src]$ redis-cli -p 6379 shutdown 
(error) ERR Errors trying to SHUTDOWN. Check logs.

  首先检查一下是否是权限的问题,因为在shutdown命令的时候,会进行save操作,而save需要操作dump.rdb文件,如果没有权限则会报这个错. 

如果权限没问题 打开redis安装目录下的redis.conf找到

# The working directory.
#
# The DB will be written inside this directory, with the filename specified
# above using the 'dbfilename' configuration directive.
#
# The Append Only File will also be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
dir /data/redis/

  把dir ./改为相应的目录,如“dir /data/redis/”(这里需要注意最后的斜杠不能忘记,如果缺失斜杠可能会解析为文件而非目录),保存。

再次尝试 成功启动


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM