Redis fails to start on OpenSuse Leap 42.1 after upgrade

tftd asked:

I decided to upgrade a machine running 13.2 to the latest Leap 42.1. I started the process and it did the upgrade. After the reboot everything is working except for the redis server service. I can’t start the redis service using:

# service redis start

The status is:

# service redis status - Redis target allowing to start/stop all redis@.service instances at once
   Loaded: loaded (/usr/lib/systemd/system/; static)
   Active: active since Fri 2015-11-20 03:47:07 EET; 1s ago

Although it says it’s “active”, when I check if the process is running it’s actually not:

# ps ax | grep -i redis
20892 pts/0    S+     0:00 grep -i redis

The only way I can start the redis server is by manually running:

# redis-server /etc/redis/default.conf

which starts the server without any problems.

I’ve tried to reinstall the redis package and tried to change the vendor from the “official” to “server:database” repository. None of these seem to be fixing the issue.

My default.conf file is pretty much the “default” template which only has these changed:

daemonize yes #default is no
bind #default is

The service files:

Description=Redis target allowing to start/stop all redis@.service instances at once


ExecStart=/usr/sbin/redis-server /etc/redis/%i.conf

#ExecStart=/usr/sbin/openvpn --daemon --suppress-timestamps --writepid /var/run/openvpn/ --cd /etc/openvpn/ --config %i.conf
#ExecReload=/sbin/killproc -p /var/run/openvpn/ -HUP /usr/sbin/openvpn


Any ideas what has changed from 13.2 to 42.1 and why has the service stopped working? Also I don’t seem to recall how I previously had the redis listed in chkconfig – after the upgrade it’s gone from there, although I’m not quite sure that’s part of the problem.

My answer:

This is a systemd unit which is capable of instantiating multiple copies of a server with different configurations.

To use it, specify the name of the instance you want to use. For instance, your existing configuration seems to have the name default:

systemctl enable redis@default
systemctl start redis@default

You will probably have to change the /etc/redis/default.conf so that it writes the pidfile in the location that systemd expects.

pidfile /var/run/redis/

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.