Redis fatal config file error

After updating to the newest nextcloudpi-armhf docker image for the raspberry pi (released around April 16), the container fails to start the nextcloudpi service. The error I see when starting the container is:

Starting redis-server:
Reading the configuration file, at line 1053
'>>> ‘maxmemory’
Bad directive or wrong number of arguments
Init done

I opened a shell into the container (which was running, just not the nextcloud service from what I could tell). I checked the redis.conf file and did notice that the last line was line 1053 and contained only the word “maxmemory”. It seems a little out of place in a conf file, but I know little to nothing about redis.

updating from what version?

Sorry, I’m not sure. I created the container in November and it’s just ran with no problems since then. If I remember correctly, there was an nc-autoupdate option that I had enabled.

In this case it would be worse to check the redis.conf file to find out how the configuration line looks like and then search the manual of the software you want to configure for the right syntax:

I’ve e.g. set the parameter as follows on my server: maxmemory 256Mb

I’ve corrected the redis.conf file from within the container with docker exec. The only way I know of restarting the service is to rebuild the container from the image or do a docker restart, which undoes my changes to the config file. Being as nobody else seems to be having this problem, maybe I should just start completely fresh and look into how to import the old db files.

do service redis-server restart after fixing the cfg file, then NC should work again

other option: do a backup (actually you dont need redis for that), start from scratch, restore it

other option: remove the container, pull the latest, run it with the old volume. I think that should work too

That worked. Thank you!

1 Like