Problem with Redis 7.2 and Debian 11

SYSTEM INFORMATION
OS type and version Debian 11
Webmin version 2.101
Virtualmin version 7.7
Related packages Redis 7.0 and 7.2

Hello,
I installed a while back (at least 1 year) a Redis server on a Virtualmin machine, it has been working flawlessly ever since, for a Nextcloud instance.
This morning I did an update from Virtualmin, there was a bunch of PHP update and a Redis server update, went through no problem, but it broke my Nextcloud. I did some research on server and forums (Nextcloud) and found nothing relevant. I started checking everything I did before the wreckage and remembered that Redis update … I suppressed Redis from my Nextcloud config file and Nextcloud was back online in a second.
I first thought of problem within Nextcloud and I posted a question in the NC forum, here: Nextcloud breaks after upgrading to redis 7.2 - ℹ️ Support - Nextcloud community
A kind soul pointed me to the fact that Redis 7.2 is not compatible with Debian 11 … and asked me about potentially using experimental packages … which I don’t think I am using, this install being Vanilla Debian and Virtualmin (I posted my sources.list and sources.list.d on the NC thread) …
My question is about this, how comes apt did propose and install Redis 7.2 on a Debian 11 OS which is not compatible … I have a redis.list in /etc/apt/sources.list.d, I have a feeling that this is the “source” of my problem … any idea/ advice about how to avoid that situation and make sure I am only proposed with compatible versions of Redis ?
Thanks,
Pierre

Question is, how did you install Redis? It is straight forward on how to install from apt:

sudo apt install redis-server 

This install would give you what ever is compatible with the OS.

Well according to my notes:

echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | 
sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt install redis
apt-cache policy redis

But I guess your answer is giving the reason I’m getting the latest version … I don’t recall the reason I used this method, I think I got it in the Redis documentation …
I’m afraid I will have to uninstall and then reinstall … Wondering what’s the best way to do a clean and complete uninstall for Redis ? Just this ?

sudo apt remove redis

Also I had 7.0.12 before which was working fine, according to Debian -- Package Search Results -- redis-server it seems that I need to add bullseye-backports to get 7.0, the regular bullseye (oldstable) will just get me v6 …

Thanks for your message that probably pointed into the right direction …
Pierre.

One of your options is to start over, although you could figure out how to downgrade it back to 7.0 and see what you would need to put into the redis.list to keep it from upgrading again to 7.2

You would have to put a special entry in your source list for redis if you go with bullseye-backports so that it doesn’t effect any other applications on the server, if you go that route.

I tried what they call “package version pining” but couldn’t get it to work (you have to create a redis.pref in /etc/apt/preferences.d, it’s yaml apparently) so I finally uninstalled completely Redis, suppressed redis.list and reinstalled it using the regular repo and finally got Redis back with version 6.* … I was hoping for v7 but it’s definitely safer sticking with the standard distribution version, so 6 it will be :slight_smile: for the time being !

Thanks for all your answers and pointers they were of great help and very much appreciated !
Pierre.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.