【问题标题】:Redis-Sentinel Errors in log after update更新后日志中的 Redis-Sentinel 错误
【发布时间】:2017-02-18 08:41:00
【问题描述】:

在我使用 .dpkg 包在 Debian 上将 redis-serverredis-sentinel 从版本 3.0.7 更新到 3.2.7 后,我在启动系统时收到以下错误:

фев 17 20:50:21 vm systemd[431]: Failed at step RUNTIME_DIRECTORY spawning /bin/run-parts: File exists
фев 17 20:50:21 vm systemd[1]: Starting OpenBSD Secure Shell server...
фев 17 20:50:21 vm systemd[432]: Failed at step RUNTIME_DIRECTORY spawning /bin/run-parts: File exists
фев 17 20:50:21 vm systemd[450]: Failed at step RUNTIME_DIRECTORY spawning /usr/bin/redis-sentinel: File exists
фев 17 20:50:21 vm systemd[1]: Started /etc/rc.local Compatibility.
фев 17 20:50:21 vm systemd[1]: redis-sentinel.service: control process exited, code=exited status=233
фев 17 20:50:21 vm systemd[452]: Failed at step RUNTIME_DIRECTORY spawning /usr/bin/redis-server: File exists
фев 17 20:50:21 vm systemd[1]: Failed to start Advanced key-value store.
фев 17 20:50:21 vm systemd[1]: Unit redis-sentinel.service entered failed state.
фев 17 20:50:21 vm systemd[1]: redis-server.service: control process exited, code=exited status=233
фев 17 20:50:21 vm systemd[1]: Failed to start Advanced key-value store.
фев 17 20:50:21 vm systemd[1]: Unit redis-server.service entered failed state.

我该如何解决这个问题?

【问题讨论】:

    标签: redis redis-sentinel


    【解决方案1】:

    这是由 redis 包中的更改引起的,它现在有一个 RuntimeDirectoryMode,它将创建 redis 目录。 (见 git commit https://github.com/lamby/pkg-redis/commit/1cecea5abcb2ce05beacd4347977634d06c59cef

    所以解决方法是停止redis服务,删除已有的/var/run/redis目录并重启服务。

    【讨论】:

      【解决方案2】:

      我的问题是,无论出于何种原因,哨兵的日志文件属于 root。

      我在 /var/log/messages 中看到了错误:

      redis-sentinel: *** FATAL CONFIG FILE ERROR ***
      redis-sentinel: Reading the configuration file, at line 139
      redis-sentinel: >>> 'logfile "/var/log/redis/sentinel.log"'
      redis-sentinel: Can't open the log file: Permission denied
      

      一旦我将权限更改为 redis,我就可以启动 redis-sentinel

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-06-30
        • 1970-01-01
        • 2022-11-15
        • 2015-07-16
        • 2015-11-12
        相关资源
        最近更新 更多