Issues with Redis
-
Hey,
I'm currently migrating my NodeBB installation to another VPS and I came across an error when installing
redis-server
. The installation ofredis-server
went flawlessly, until I tried to check the status of Redis. (service redis-server status
). It printed out a miscellaneous error with no information about what could be wrong... I've tried to fix this error for hours and I still can't figure out what could be the issue.
My first idea was that perhaps Ubuntu systemd was doing something nasty, because when manually starting Redis via$ redis-server
, it started properly with no errors.Error log when doing
service redis-server status
:● redis-server.service - Advanced key-value store Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled) Active: inactive (dead) (Result: exit-code) since Sun 2016-06-26 15:11:08 CEST; 29min ago Docs: http://redis.io/documentation, man:redis-server(1) Process: 8492 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=1/FAILURE) Process: 8487 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d (code=exited, status=0/SUCCESS) Jun 26 15:11:08 vps291166 systemd[1]: redis-server.service: Control process exited, code=exited status=1 Jun 26 15:11:08 vps291166 systemd[1]: Failed to start Advanced key-value store. Jun 26 15:11:08 vps291166 systemd[1]: redis-server.service: Unit entered failed state. Jun 26 15:11:08 vps291166 systemd[1]: redis-server.service: Failed with result 'exit-code'. Jun 26 15:11:08 vps291166 systemd[1]: redis-server.service: Service hold-off time over, scheduling restart. Jun 26 15:11:08 vps291166 systemd[1]: Stopped Advanced key-value store. Jun 26 15:11:08 vps291166 systemd[1]: redis-server.service: Start request repeated too quickly. Jun 26 15:11:08 vps291166 systemd[1]: Failed to start Advanced key-value store.
And
service redis-server start
just prints this line:Job for redis-server.service failed because the control process exited with error code. See "systemctl status redis-server.service" and "journalctl -xe" for details.
-
Ok, managed to get it working with systemd, however I ran into another issue. Redis starts, but kinda hangs and eventually the starting process timeouts. Any ideas?
As I look through the syslog, it seems that the starting process timeouts every ~2 minutes and then it tries to restart the server again. And it basically loops like that forever...
The forum itself is kinda working, but having some outages due to redis constantly restarting itself.vps291166 systemd[1]: redis-server.service: Start operation timed out. Terminating.
-
I managed to fix the problem by uninstalling the
redis-server
service that I had installed viaapt-get
& manually installing the latest redis stable build which has an updated config to allow supervisors likesystemd
to supervise the process.To anyone who's encountering the same issues, here's a decent tutorial on how to get Redis up and running on Ubuntu 16.04.
-
Glad you got it working.
I find that all repos in general seem to be sketchy with their database packages. I almost always manually install them.
I'm curious if you were using DO or not. DO usually has very sane package installs for me, since apt-get pulls from it's own repo.
-
@yariplus Nope, I just moved away from DO. And yes, for me also it was probably the 3rd time where I had to install a database package manually as previous attempts to
apt-get install
had failed or installed an outdated version. I really wish they updated database packages more often on Ubuntu repos, since my problem occurred only due to an outdated redis package on Ubuntu 16.04 (Xenial) repo.