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 - Redis target allowing to start/stop all redis@.service instances at once Loaded: loaded (/usr/lib/systemd/system/redis.target; 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.
default.conf file is pretty much the “default” template which only has these changed:
daemonize yes #default is no bind 127.0.0.1 184.108.40.206 #default is 127.0.0.1
The service files:
/usr/lib/systemd/system/redis.target [Unit] Description=Redis target allowing to start/stop all redis@.service instances at once
/usr/lib/systemd/system/redis@.service [Unit] Description=Redis After=network.target PartOf=redis.target [Service] Type=simple User=redis Group=redis PrivateTmp=true PIDFile=/var/run/redis/%i.pid ExecStart=/usr/sbin/redis-server /etc/redis/%i.conf Restart=on-failure #ExecStart=/usr/sbin/openvpn --daemon --suppress-timestamps --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf #ExecReload=/sbin/killproc -p /var/run/openvpn/%i.pid -HUP /usr/sbin/openvpn [Install] WantedBy=multi-user.target redis.target
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.
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
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.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.