zoukankan      html  css  js  c++  java
  • 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/”(这里需要注意最后的斜杠不能忘记,如果缺失斜杠可能会解析为文件而非目录),保存。

    再次尝试 成功启动

  • 相关阅读:
    带外数据
    数组中的第K个最大元素
    广播和多播
    反转链表
    ioctl操作
    非阻塞式I/O
    [CSP-S模拟测试]:简单的括号序列(组合数)
    [CSP-S模拟测试]:最大异或和(数学)
    关于我
    [CSP-S模拟测试]:礼物(数学)
  • 原文地址:https://www.cnblogs.com/Gnnnny/p/7851181.html
Copyright © 2011-2022 走看看