Redis NOT Work ANYWAY

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

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:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 22.04
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.52
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Traefik 3
  • PHP version (e.g, 8.3):
    • 8.3.20
  • Is this the first time you’ve seen this error? (Yes / No):
    • YES
  • When did this problem seem to first start?
    • replace me
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • BAREMETAL
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • NO

Summary of the issue you are facing:

Files are locked - redis installed and exist in config.php but error still shows in Admin settings

Steps to replicate it (hint: details matter!):

  1. Create folder in terminal in external storage
  2. Move files and folders via terminal from another folder
  3. Give rights chmod and chown to www-data
  4. cron job installed
  5. Can.t do anything with files in this folders

Log entries

LOGS

Exception Error while copying file to target location (copied: -1 bytes, expected filesize: 76115 bytes)

  1. /var/www/oblako.stratim/3rdparty/sabre/dav/lib/DAV/Server.phpLine 1137
OCA\DAV\Connector\Sabre\File->put
()
  1. /var/www/oblako.stratim/3rdparty/sabre/dav/lib/DAV/CorePlugin.phpLine 492
Sabre\DAV\Server->updateFile
(
  "*** sensitive parameters replaced ***"
)
  1. /var/www/oblako.stratim/3rdparty/sabre/event/lib/WildcardEmitterTrait.phpLine 89
Sabre\DAV\CorePlugin->httpPut
()
  1. /var/www/oblako.stratim/3rdparty/sabre/dav/lib/DAV/Server.phpLine 472
Sabre\DAV\Server->emit
()
  1. /var/www/oblako.stratim/apps/dav/lib/Connector/Sabre/Server.phpLine 49
Sabre\DAV\Server->invokeMethod
()
  1. /var/www/oblako.stratim/apps/dav/lib/Server.phpLine 397
OCA\DAV\Connector\Sabre\Server->start
()
  1. /var/www/oblako.stratim/apps/dav/appinfo/v2/remote.phpLine 21
OCA\DAV\Server->exec
()
  1. /var/www/oblako.stratim/remote.phpLine 145
undefinedundefinedrequire_once
(
  "/var/www/oblako.stratim/apps/dav/appinfo/v2/remote.php"
)

Raw log entry

{
  "reqId": "ynh1HUbIgKbtjSgjZxIN",
  "level": 3,
  "time": "2025-04-22T17:04:46+03:00",
  "remoteAddr": "37.228.90.158",
  "user": "Georgii Trushkov",
  "app": "webdav",
  "method": "PUT",
  "url": "/remote.php/dav/files/Georgii%20Trushkov/%D0%9B%D0%B5%D1%82%D0%B0%D1%82%D0%B5%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5%20%D0%B0%D0%BF%D0%BF%D0%B0%D1%80%D0%B0%D1%82%D1%8B/%D0%92%D0%BE%D1%80%D0%BE%D0%B1%D0%B5%D0%B9/%D0%9D%D0%BE%D0%B2%D1%8B%D0%B9/%D0%94%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0%D1%86%D0%B8%D1%8F/%D0%9A%D0%94/%D0%A1%D0%B1%D0%BE%D1%80%D0%BA%D0%B8/%D0%A0%D1%8B%D1%87%D0%B0%D0%B3%20%D0%B2%20%D1%81%D0%B1%D0%BE%D1%80%D0%B5%20(%D0%BF%D0%B5%D1%80%D0%B5%D0%B4%D0%BD%D0%B8%D0%B9%20%D0%BF%D1%80%D0%B0%D0%B2%D1%8B%D0%B9)%20-01/%D0%9F%D0%BB%D0%B0%D1%81%D1%82%D0%B8%D0%BD%D0%B0%20%D0%BC%D0%BE%D1%82%D0%BE%D1%80%D0%B0%20-%20%D0%92%D0%A0%D0%91.741154.007.pdf",
  "message": "Error while copying file to target location (copied: -1 bytes, expected filesize: 76115 bytes)",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36",
  "version": "31.0.1.2",
  "exception": {
    "Exception": "Sabre\\DAV\\Exception",
    "Message": "Error while copying file to target location (copied: -1 bytes, expected filesize: 76115 bytes)",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/oblako.stratim/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 1137,
        "function": "put",
        "class": "OCA\\DAV\\Connector\\Sabre\\File",
        "type": "->"
      },
      {
        "file": "/var/www/oblako.stratim/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 492,
        "function": "updateFile",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/oblako.stratim/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "httpPut",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->"
      },
      {
        "file": "/var/www/oblako.stratim/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 472,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/oblako.stratim/apps/dav/lib/Connector/Sabre/Server.php",
        "line": 49,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/oblako.stratim/apps/dav/lib/Server.php",
        "line": 397,
        "function": "start",
        "class": "OCA\\DAV\\Connector\\Sabre\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/oblako.stratim/apps/dav/appinfo/v2/remote.php",
        "line": 21,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/oblako.stratim/remote.php",
        "line": 145,
        "args": [
          "/var/www/oblako.stratim/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/oblako.stratim/apps/dav/lib/Connector/Sabre/File.php",
    "Line": 240,
    "message": "Error while copying file to target location (copied: -1 bytes, expected filesize: 76115 bytes)",
    "exception": [],
    "CustomMessage": "Error while copying file to target location (copied: -1 bytes, expected filesize: 76115 bytes)"
  },
  "id": "6807a7941dffd"
}

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.


Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.


Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

CONFIG.PHP
<?php
$CONFIG = array (
  'memcache.local' => '\OC\Memcache\APCu',
  'memcache.locking' => '\OC\Memcache\Redis',
  'redis' => 
  array (
    'host' => '/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'instanceid' => 'ocaozq45akdu',
 
  array (
    0 => '192.168.90.254',
  ),
  'trusted_domains' => 
  array (
    0 => 'oblako.stratim',
    1 => '192.168.0.198',
    2 => '46.34.156.226',
    3 => 'cloud.stratim.tech',
  ),
  'datadirectory' => '/var/www/oblako.stratim/data',
  'dbtype' => 'mysql',
  'version' => '31.0.1.2',
  'overwrite.cli.url' => 'http://cloud.stratim.tech',
  'logtimezone' => 'Europe/Moscow',
  'default_phone_region' => 'RU',
  'default_language' => 'ru',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'installed' => true,
  'maintenance_window_start' => 1,
  'force_locale' => 'ru_RU',
  'overwriteprotocol' => 'https',
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'sysadmin',
  'mail_domain' => 'stratim.tech',
  'mail_smtphost' => 'smtp.yandex.ru',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'defaultapp' => 'files',
  'app_install_overwrite' => 
  array (
    0 => 'apporder',
    1 => 'webhooks',
  ),
  'theme' => '',
  'loglevel' => 3,
);
Apps

Enabled:

  • activity: 4.0.0
  • admin_audit: 1.21.0
  • bruteforcesettings: 4.0.0
  • calendar: 5.2.1
  • circles: 31.0.0
  • cloud_federation_api: 1.14.0
  • collectives: 2.16.1
  • comments: 1.21.0
  • contacts: 7.0.6
  • contactsinteraction: 1.12.0
  • dav: 1.33.0
  • deck: 1.15.0
  • external: 6.0.2
  • federatedfilesharing: 1.21.0
  • federation: 1.21.0
  • files: 2.3.1
  • files_3dmodelviewer: 0.0.15
  • files_accesscontrol: 2.0.0
  • files_automatedtagging: 2.0.0
  • files_bpm: 1.7.1
  • files_downloadlimit: 4.0.0
  • files_external: 1.23.0
  • files_mindmap: 0.0.33
  • files_pdfviewer: 4.0.0
  • files_reminders: 1.4.0
  • files_sharing: 1.23.1
  • files_trashbin: 1.21.0
  • files_versions: 1.24.0
  • flow_notifications: 2.0.0
  • groupfolders: 19.0.4
  • logreader: 4.0.0
  • lookup_server_connector: 1.19.0
  • nextcloud_announcements: 3.0.0
  • notes: 4.12.0
  • notifications: 4.0.0
  • oauth2: 1.19.1
  • onlyoffice: 9.7.0
  • password_policy: 3.0.0
  • photos: 4.0.0-dev.1
  • privacy: 3.0.0
  • profile: 1.0.0
  • provisioning_api: 1.21.0
  • recommendations: 4.0.0
  • related_resources: 2.0.0
  • serverinfo: 3.0.0
  • settings: 1.14.0
  • sharebymail: 1.21.0
  • support: 3.0.0
  • survey_client: 3.0.0
  • systemtags: 1.21.1
  • tasks: 0.16.1
  • text: 5.0.0
  • theming: 2.6.1
  • twofactor_backupcodes: 1.20.0
  • updatenotification: 1.21.0
  • user_saml: 6.5.0
  • viewer: 4.0.0
  • webhook_listeners: 1.2.0
  • webhooks: 0.4.3
  • workflow_media_converter: 1.13.5
  • workflowengine: 2.13.0
    Disabled:
  • app_api: 5.0.2 (installed 4.0.0)
  • apporder: 0.15.0 (installed 0.15.0)
  • cadviewer: 10.10.7 (installed 10.10.7)
  • dashboard: 7.11.0 (installed 7.10.0)
  • encryption: 2.19.0
  • firstrunwizard: 4.0.0 (installed 3.0.0)
  • side_menu: 4.1.1 (installed 4.1.1)
  • spreed: 21.0.1 (installed 21.0.1)
  • suspicious_login: 9.0.1
  • twofactor_nextcloud_notification: 5.0.0
  • twofactor_totp: 13.0.0-dev.0
  • user_ldap: 1.22.0
  • user_status: 1.11.0 (installed 1.11.0)
  • weather_status: 1.11.0 (installed 1.11.0)

These errors show that I did not do according to the documentation
PDO SQL set
noindex,nofollow added
REdis installed as socket

  • Collectives app is enabled, but PDO SQLite driver is missing. Please install it to enable full text search of the page content.

  • Some files have not passed the integrity check. List of invalid files… Rescan… For more details see the documentation :arrow_upper_right:.

  • 1274 errors in the logs since 15 апреля 2025 г., 17:44:49

  • Some headers are not set correctly on your instance - The X-Robots-Tag HTTP header is not set to noindex,nofollow. This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly. For more details see the documentation :arrow_upper_right:.

  • The PHP OPcache module is not properly configured. The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply “opcache.interned_strings_buffer” to your PHP configuration with a value higher than “16”… For more details see the documentation :arrow_upper_right:.

You could actually use redis for your memcache.local also. here’s my redis array:

‘memcache.local’ => ‘\OC\Memcache\Redis’,
‘memcache.distributed’ => ‘\OC\Memcache\Redis’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘/run/redis/redis-server.sock’,
‘port’ => 0,
‘timeout’ => 0.0,
‘read_timeout’ => 0.0,
),

Also make sure you have the right settings in your /etc/redis/redis.conf file to allow the use of redis to listen on a socket.