Kubernetes Multi primary redis cluster

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 25.0.04
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.4): 8.1.16
Redis Container: 7.0.9-debian-11-r1
Microk8s: v1.26.1

The issue:

I am trying to use the multi primary redis cluster (charts/bitnami/redis-cluster at main · bitnami/charts · GitHub" for file locking.
However it leads to errors on file actions such as move or delete.

The Webinterface simply shows messages such as:

Error deleting file "Test".
Could not move "Test"

The apache log shows:

"DELETE /remote.php/dav/files/admin/Test HTTP/1.1" 423 819 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0"

And the nextcloud log shows nothing at all.

Is this the first time you’ve seen this error? Yes

Steps to replicate it:

  1. Install Nextcloud with Ubuntu 20.04, Apache2, PHP 8.0
  2. Install Redis Cluster with microk8s and bitnami redis cluster helm chart
  3. Enable Redis Cluster for file locking in config.php

The output of config.php file in /path/to/nextcloud:

$CONFIG = array (
  'passwordsalt' => 'placeholder',
  'secret' => 'placeholder',
  'trusted_domains' =>
  array (
    0 => 'placeholder',
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'http://placeholder',
  'dbname' => 'nextcloud',
  'dbhost' => '',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'placeholder',
  'installed' => true,
  'instanceid' => 'placeholder',
  'filelocking.enabled' => true,
  'filelocking.debug' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis.cluster' =>
  array (
    'seeds' =>
    array (
      0 => 'redis-cluster-service-ip:6379',
    'timeout' => 0.0,
    'read_timeout' => 0.0,
    'failover_mode' => 0,
    'password' => 'placeholder',

Is anyone familiar with the issue or has a functioning redis cluster that does the file locking?

Did you ever get this working? I’m struggling to get redis cluster going on kubernetes too.