RedisException: No such file or directory & RedisException: Connection refused

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:

example

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

longer
example
here

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): Nextcloud Hub 5 (27.0.1)
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.52 (Ubuntu)
PHP version (eg, 7.4): 8.1.2

The issue you are facing:
I cannot upload or delete files from my next cloud server. I checked the logs and found some errors, checked the forums, and tried out all the solutions given but still, the error exists and I am not able to delete or upload files. when deleting it says error deleting “filename”. I followed this tutorial to set up the next cloud server Install NextCloud On Ubuntu 22.04 LTS - Complete Guide

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

[webdav] Error: RedisException: No such file or directory at <<closure>>

 0. /var/www/nextcloud/lib/private/RedisFactory.php line 137
    Redis->pconnect()
 1. /var/www/nextcloud/lib/private/RedisFactory.php line 178
    OC\RedisFactory->create("*** sensitive parameters replaced ***")
 2. /var/www/nextcloud/lib/private/Memcache/Redis.php line 66
    OC\RedisFactory->getInstance()
 3. /var/www/nextcloud/lib/private/Memcache/Redis.php line 137
    OC\Memcache\Redis->getCache()
 4. /var/www/nextcloud/lib/private/Lock/MemcacheLockingProvider.php line 61
    OC\Memcache\Redis->inc()
 5. /var/www/nextcloud/lib/private/Files/Storage/Common.php line 765
    OC\Lock\MemcacheLockingProvider->acquireLock()
 6. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 607
    OC\Files\Storage\Common->acquireLock()
 7. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 607
    OC\Files\Storage\Wrapper\Wrapper->acquireLock()
 8. /var/www/nextcloud/lib/private/Files/View.php line 1920
    OC\Files\Storage\Wrapper\Wrapper->acquireLock()
 9. /var/www/nextcloud/lib/private/Files/View.php line 2030
    OC\Files\View->lockPath()
10. /var/www/nextcloud/lib/private/Files/View.php line 1123
    OC\Files\View->lockFile()
11. /var/www/nextcloud/lib/private/Files/View.php line 692
    OC\Files\View->basicOperation()
12. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 536
    OC\Files\View->unlink()
13. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 179
    OCA\DAV\Connector\Sabre\File->delete()
14. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 281
    Sabre\DAV\Tree->delete()
15. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpDelete()
16. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
17. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
18. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
19. /var/www/nextcloud/apps/dav/lib/Server.php line 364
    Sabre\DAV\Server->exec()
20. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
21. /var/www/nextcloud/remote.php line 172
    require_once("/var/www/nextcl ... p")

DELETE /remote.php/dav/files/stella/Nextcloud.png
from 172.69.87.127 by stella at 2023-07-26T08:46:54+00:00

[index] Error: RedisException: Connection refused at <<closure>>

 0. /var/www/nextcloud/lib/private/RedisFactory.php line 137
    Redis->pconnect()
 1. /var/www/nextcloud/lib/private/RedisFactory.php line 178
    OC\RedisFactory->create("*** sensitive parameters replaced ***")
 2. /var/www/nextcloud/lib/private/Memcache/Redis.php line 66
    OC\RedisFactory->getInstance()
 3. /var/www/nextcloud/lib/private/Memcache/Redis.php line 126
    OC\Memcache\Redis->getCache()
 4. /var/www/nextcloud/lib/private/Lock/MemcacheLockingProvider.php line 65
    OC\Memcache\Redis->add()
 5. /var/www/nextcloud/lib/private/Files/Storage/Common.php line 765
    OC\Lock\MemcacheLockingProvider->acquireLock()
 6. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 607
    OC\Files\Storage\Common->acquireLock()
 7. /var/www/nextcloud/lib/private/Files/Cache/Scanner.php line 339
    OC\Files\Storage\Wrapper\Wrapper->acquireLock()
 8. /var/www/nextcloud/lib/private/Files/Cache/LocalRootScanner.php line 39
    OC\Files\Cache\Scanner->scan()
 9. /var/www/nextcloud/lib/private/Files/View.php line 1317
    OC\Files\Cache\LocalRootScanner->scan()
10. /var/www/nextcloud/lib/private/Files/View.php line 1356
    OC\Files\View->getCacheEntry()
11. /var/www/nextcloud/lib/private/Files/Node/Root.php line 202
    OC\Files\View->getFileInfo()
12. <<closure>>
    OC\Files\Node\Root->get()
13. /var/www/nextcloud/lib/private/Files/Node/LazyFolder.php line 74
    call_user_func_array()
14. /var/www/nextcloud/lib/private/Files/Node/LazyFolder.php line 151
    OC\Files\Node\LazyFolder->__call()
15. /var/www/nextcloud/lib/private/Files/AppData/AppData.php line 98
    OC\Files\Node\LazyFolder->get()
16. /var/www/nextcloud/lib/private/Files/AppData/AppData.php line 147
    OC\Files\AppData\AppData->getAppDataFolder()
17. /var/www/nextcloud/lib/private/Preview/Storage/Root.php line 74
    OC\Files\AppData\AppData->newFolder()
18. /var/www/nextcloud/lib/private/Preview/Generator.php line 643
    OC\Preview\Storage\Root->newFolder()
19. /var/www/nextcloud/lib/private/Preview/Generator.php line 139
    OC\Preview\Generator->getPreviewFolder()
20. /var/www/nextcloud/lib/private/Preview/Generator.php line 116
    OC\Preview\Generator->generatePreviews()
21. /var/www/nextcloud/lib/private/PreviewManager.php line 192
    OC\Preview\Generator->getPreview()
22. /var/www/nextcloud/core/Controller/PreviewController.php line 144
    OC\PreviewManager->getPreview()
23. /var/www/nextcloud/core/Controller/PreviewController.php line 113
    OC\Core\Controller\PreviewController->fetchPreview()
24. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OC\Core\Controller\PreviewController->getPreviewByFileId()
25. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
26. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
27. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
28. /var/www/nextcloud/lib/base.php line 1071
    OC\Route\Router->match()
29. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

GET /core/preview?fileId=40&c=19003a20d3d8ed66d31ffa06eb039674&x=250&y=250&forceIcon=0&a=1
from 172.69.178.86 by stella at 2023-07-26T10:09:15+00:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => 'avoided',
  'secret' => 'avoided',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'avoided',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '27.0.1.2',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'user',
  'dbpassword' => 'password',
  'installed' => true,
  'instanceid' => 'ocuvigfrkmax',
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\OC\Memcache\APCu',
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\OC\Memcache\Redis',
  'redis' => [
     'host'     => 'localhost',
     'port'     => 6379,
],

);

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

Your Redis configuration does not match that provided in the guide you provided a link to.

Their Redis server is specifically configured to use a UNIX socket.

The error you’re getting indicates Redis isn’t working. Please check the link you provided and adjust your config.php to have a matching redis config section. Then report back.

1 Like