4

Whenever I update my Ubuntu software or run the command sudo dpkg --configure -a, it gets stuck at the line Setting up redis-server (5:4.0.9-1ubuntu0.1) .... I don't know why this is happening.

Update Manager screenshot

wjandrea
  • 14,109
  • 4
  • 48
  • 98
Ham Ar
  • 41
  • 1
  • 2

4 Answers4

3

I uninstalled redis-server:

sudo apt-get purge redis-server

and installed it again from this repository.

sudo add-apt-repository ppa:chris-lea/redis-server
sudo apt-get update
sudo apt -y install redis-server

Now it works fine.

1

I did ps auxand found that redis server was working...

redis      535  0.0  0.1  51444  4772 ?        Ssl  01:41   0:00 /usr/bin/redis-server *:6379

Killed this process and it doesn't stuck again. However, still cannot install redis

Job for redis-server.service failed because a timeout was exceeded.################################################################################################################..................................................................................] 
See "systemctl status redis-server.service" and "journalctl -xe" for details.
Jeff
  • 1,614
  • 17
  • 24
  • I did it! `sudo sed -i "s/bind .*/bind 127.0.0.1/g" /etc/redis/redis.conf` `sudo service redis-server restart` this was the problem, It couldn't run on that address and this command solved it. Check if this is running correctly after: `sudo tail /var/log/redis/redis-server.log` – Костя Крючков Apr 16 '19 at 21:29
1

Systemd and redis-sentinal disagreed on where the pid file was. My /etc/redis/sentinel.conf was listing the pid as /var/run/redis/redis-sentinel.pid, whereas systemd was looking for /var/run/sentinel/redis-sentinel.pid.

As a result, systemd was killing redis-sentinel and restarting it over and over.

I updated the sentinel.conf to point to the location configured in systemd.

Kieveli
  • 91
  • 5
  • This was my problem too. Happened during an apt upgrade on Ubuntu 16.04. I actually changed the systemd config file to point to the same file in the redis sentinel config file. The paths to the config files are on my system: `/lib/systemd/system/redis-sentinel.service` and `/etc/redis/sentinel.conf`. I updated the `PIDFile` param in the systemd config file to have the same path as the `pidfile` in the redis sentinel config file. – gitaarik Sep 30 '21 at 16:09
0

I faced the same problem so I remove

rm -rf /run/systemd/generator.late/redis-server.service

Now it's working fine. Maybe this will help you

cmthakur
  • 181
  • 1
  • 3