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