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 [email protected] 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.
My default.conf
file is pretty much the "default" template which only has these changed:
daemonize yes #default is no
bind 127.0.0.1 1.2.3.4 #default is 127.0.0.1
The service files:
/usr/lib/systemd/system/redis.target
[Unit]
Description=Redis target allowing to start/stop all [email protected] instances at once
/usr/lib/systemd/system/[email protected]
[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.
Edit: Here is the log file thanks to @Michael Hampton:
9042:signal-handler (1448036091) Received SIGTERM scheduling shutdown...
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.0.4 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 9042
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
9042:M 20 Nov 18:14:51.090 # Server started, Redis version 3.0.4
9042:M 20 Nov 18:14:51.091 * DB loaded from disk: 0.000 seconds
9042:M 20 Nov 18:14:51.091 * The server is now ready to accept connections on port 6379
9042:M 20 Nov 18:14:51.091 # User requested shutdown...
9042:M 20 Nov 18:14:51.091 * Saving the final RDB snapshot before exiting.
9042:M 20 Nov 18:14:51.126 * DB saved on disk
9042:M 20 Nov 18:14:51.126 * Removing the pid file.
9042:M 20 Nov 18:14:51.126 # Redis is now ready to exit, bye bye...
I'm not sure why it decides to spontaneously just quit due to "user requested shutdown".
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
:You will probably have to change the
/etc/redis/default.conf
so that it writes thepidfile
in the location that systemd expects.After searching for a while I found out that need to comment out the
daemonize yes
or set it tono
. The funny part is I had the same configuration on 13.2 and it worked without any problems.Anyway hope this helps anybody.