更新后日志中的Redis-Sentinel错误

时间:2017-02-18 08:41:01

标签: redis redis-sentinel

使用.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.

我该如何解决这个问题?

2 个答案:

答案 0 :(得分:1)

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

因此,解决方案是停止redis服务,删除现有的/var/run/redis目录并重新启动服务。

答案 1 :(得分:-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