2

在我使用 .dpkg 包在 Debian 上更新redis-server并从版本 3.0.7 到 3.2.7 后,在引导系统时出现以下错误:redis-sentinel

фев 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.

我该如何解决这个问题?

4

2 回答 2

0

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

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

于 2017-05-18T17:34:59.620 回答
-1

我的问题是,无论出于何种原因,哨兵的日志文件都属于 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

于 2018-05-21T09:16:43.647 回答