[Solved] Error when upgrade to OC 27

Hello
I was happy with my working cookbook on OC 26 and php8.0
I update oc to V27.
It was saying to update also php-fpm from 8.0 to 8.1
I do so.

Nextcloud is now working in V27 with php in 8.1
Cookbook is still working fine.

It was also advice to add " Transactional file locking"
I do so as explain in the documentation by adding to my config.php :

‘filelocking.enabled’ => true,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘/var/run/redis/redis.sock’,
‘port’ => 0,
‘timeout’ => 0.0,
),

after this modification, OC is “happy” no more warning in the admin parameter overview, but cookbook no more working…
in the nextcloud.log I get this :

{“reqId”:“zaesr9jO5BSJkUC4M3Af”,“level”:3,“time”:“2023-07-20T20:38:49+00:00”,“remoteAddr”:“192.168.0.xx”,“user”:“yyy”,“app”:“index”,“method”:“GET”,“url”:“/apps/cookbook/”,“message”:“No such file or directory”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/114.0”,“version”:“27.0.1.2”,“exception”:{“Exception”:“RedisException”,“Message”:“No such file or directory”,“Code”:0,“Trace”:[{“file”:“/var/www/nextcloud/lib/private/RedisFactory.php”,“line”:137,“function”:“pconnect”,“class”:“Redis”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/RedisFactory.php”,“line”:178,“function”:“create”,“class”:“OC\RedisFactory”,“type”:“->”,“args”:[“*** sensitive parameters replaced “]},{“file”:”/var/www/nextcloud/lib/private/Memcache/Redis.php",“line”:66,“function”:“getInstance”,“class”:“OC\RedisFactory”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Memcache/Redis.php”,“line”:137,“function”:“getCache”,“class”:“OC\Memcache\Redis”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Lock/MemcacheLockingProvider.php”,“line”:61,“function”:“inc”,“class”:“OC\Memcache\Redis”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Files/Storage/Common.php”,“line”:765,“function”:“acquireLock”,“class”:“OC\Lock\MemcacheLockingProvider”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php”,“line”:607,“function”:“acquireLock”,“class”:“OC\Files\Storage\Common”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php”,“line”:607,“function”:“acquireLock”,“class”:“OC\Files\Storage\Wrapper\Wrapper”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Files/View.php”,“line”:1920,“function”:“acquireLock”,“class”:“OC\Files\Storage\Wrapper\Wrapper”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Files/View.php”,“line”:2030,“function”:“lockPath”,“class”:“OC\Files\View”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Files/View.php”,“line”:1123,“function”:“lockFile”,“class”:“OC\Files\View”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Files/View.php”,“line”:571,“function”:“basicOperation”,“class”:“OC\Files\View”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Files/Node/File.php”,“line”:54,“function”:“file_get_contents”,“class”:“OC\Files\View”,“type”:“->”},{“file”:“/var/www/nextcloud/apps/cookbook/lib/Service/DbCacheService.php”,“line”:140,“function”:“getContent”,“class”:“OC\Files\Node\File”,“type”:“->”},{“file”:“/var/www/nextcloud/apps/cookbook/lib/Service/DbCacheService.php”,“line”:121,“function”:“parseJSONFile”,“class”:“OCA\Cookbook\Service\DbCacheService”,“type”:“->”},{“file”:“/var/www/nextcloud/apps/cookbook/lib/Service/DbCacheService.php”,“line”:66,“function”:“parseJSONFiles”,“class”:“OCA\Cookbook\Service\DbCacheService”,“type”:“->”},{“file”:“/var/www/nextcloud/apps/cookbook/lib/Service/DbCacheService.php”,“line”:403,“function”:“updateCache”,“class”:“OCA\Cookbook\Service\DbCacheService”,“type”:“->”,“args”:[" sensitive parameters replaced ***”]},{“file”:“/var/www/nextcloud/apps/cookbook/lib/Service/DbCacheService.php”,“line”:392,“function”:“checkSearchIndexUpdate”,“class”:“OCA\Cookbook\Service\DbCacheService”,“type”:“->”},{“file”:“/var/www/nextcloud/apps/cookbook/lib/Controller/MainController.php”,“line”:56,“function”:“triggerCheck”,“class”:“OCA\Cookbook\Service\DbCacheService”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php”,“line”:230,“function”:“index”,“class”:“OCA\Cookbook\Controller\MainController”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php”,“line”:137,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/AppFramework/App.php”,“line”:183,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Route/Router.php”,“line”:315,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:“::”},{“file”:“/var/www/nextcloud/lib/base.php”,“line”:1071,“function”:“match”,“class”:“OC\Route\Router”,“type”:“->”},{“file”:“/var/www/nextcloud/index.php”,“line”:36,“function”:“handleRequest”,“class”:“OC”,“type”:“::”}],“File”:“/var/www/nextcloud/lib/private/RedisFactory.php”,“Line”:137,“CustomMessage”:“–”}}

any idea to get OC without warning and cookbook working?
Thanks

Did you also deploy a Redis server?

First, the cookbook app does not use Redis or file locking explicitly. This should all be handled by the Nextcloud core. So, I am sort of lost or at least on very thin ice here…


Generally speaking, you configured NC core to use a socket. This is most probably the safest version as no networking is done here.

Have you configured Redis to use sockets as well? Is the socket file existing? Are you by chance using docker or similar for either the NC server or Redis?

@jtr yes the redis server is running (but may be not well configure…)

@christianlupus I am not using docker but a Ubuntu VM with directly installed NC

I have try the “memcache with Transactional File Locking”, the other method descibe in the documentation (with localhost value and the port).
With the folowing added to the config.php

‘filelocking.enabled’ => true,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ => array(
‘host’ => ‘localhost’,
‘port’ => 6379,
‘timeout’ => 0.0,
‘password’ => ‘’, // Optional, if not defined no password will be used.
),

And both NC and cookboock works :slight_smile:

So I should have a missmatch in my redis conf…

Thanks for the help

1 Like