Nextcloud update throws Redis error
-
Hello,
I am on Nextcloud 22.0.0 package version v4.10.0
Whenever I try to upgrade to 22.1.0 via the Cloudron update mechanism, the app will restart over and over with this error:Redis cluster config is missing the "seeds" attribute in /app/code/lib/private/RedisFactory.php:86
I found this:
https://help.nextcloud.com/t/redis-cluster-error-without-having-a-cluster/121589
but I have no luck editing the file
lib/private/RedisFactory.php
because the container does not stay up/restarts over and over.It was also suggested by Cloudron support to go to the file editor in Cloudron and edit the file config/config/php and remove all redis references, but the error still pops up the next time I am trying the upgrade.
Any suggestions would be helpful. Maybe I can somehow export all data from Nextcloud, remove it completely and then install the latest 22.2.23 instead?
Thank you!
-
It seems https://github.com/nextcloud/server/issues/28609 is the related bug report. This
$isCluster = in_array('redis.cluster', $this->config->getKeys());
seems to have some funny behavior when dot is used.i.e the array itself has no
redis.cluster
but there is aredis
. It seems the function looks for some subkey or something and decides to return true even if there is noredis: { cluster: xx }
. crazy php functions. -
OK, found the root cause. The
config.php
contained a spurious0 => 'NANphp',
. When checking the presence of theredis.cluster
property in the config, the in_array function can return true when the config contains a 0 property as(int)'redis.cluster' === 0
.https://github.com/nextcloud/server/pull/29906 is the upstream PR.
Solution: remove the spurious
0 => 'NANphp',
inconfig.php
using the file manager .