2

After I've updated redis-server and redis-sentinel from version 3.0.7 to 3.2.7 on Debian using .dpkg packages I get the following errors when booting system:

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

How can I resolve this?

Peter Souter
  • 5,110
  • 1
  • 33
  • 62
Igor
  • 41
  • 1
  • 4

2 Answers2

0

This is caused by a change in the redis package where it now has an RuntimeDirectoryMode which will create the redis directory. (See git commit https://github.com/lamby/pkg-redis/commit/1cecea5abcb2ce05beacd4347977634d06c59cef)

So the solution is to stop the redis services, delete the existing /var/run/redis directory and restart the service.

Peter Souter
  • 5,110
  • 1
  • 33
  • 62
-1

My issue was that for whatever reason the log file of sentinel belonged to root.

I saw the error in /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

Once I changed the permissions to redis I was able to start redis-sentinel