Support intro
Sorry to hear you’re facing problems
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
Nextcloud version : 29.0.4
Operating system and version: Ubuntu 22.04
Apache or nginx version: Apache/2.4.52
PHP version : 8.1.2
The issue you are facing:
After upgrading to 29.0.4 from 29.0.3, I started having iussues with notes and collectives files editing. Once I started to edit and trying to save, it seems to not save or I get error that the file was modified outside the editor. In the logs I find LockedException for each file I’m editing " … is locked, existing lock on file: exclusive".
In 29.0.3 that problem never happened.
Is this the first time you’ve seen this error? Y
Steps to replicate it:
- edit a collective file or a note
- edit and then save
The output of your Nextcloud log in Admin > Logging:
LockedException
“Note/mytestnote.md” is locked, existing lock on file: exclusive
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
‘passwordsalt’ => ‘xxxxxxxxxxx’,
‘secret’ => ‘xxxxxxxxxxxxxx’,
‘trusted_domains’ =>
array (
0 => ‘xxxxxxxxxxx’,
1 => ‘xxxxxxxxxxx’,
),
‘datadirectory’ => ‘/var/www/html/data’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘29.0.4.1’,
‘overwrite.cli.url’ => ‘https://xxxxxxxxx/’,
‘dbname’ => ‘nextcloud’,
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => ‘nextcloud’,
‘dbpassword’ => ‘xxxxxxxxxxx’,
‘installed’ => true,
‘instanceid’ => ‘xxxxxx’,
‘htaccess.RewriteBase’ => ‘/’,
‘mail_smtpmode’ => ‘smtp’,
‘mail_sendmailmode’ => ‘smtp’,
‘mail_from_address’ => ‘nc’,
‘mail_domain’ => ‘xxxxxx’,
‘mail_smtphost’ => ‘xxxxxxx’,
‘mail_smtpport’ => ‘xxxxxx’,
‘maintenance’ => false,
‘theme’ => ‘’,
‘loglevel’ => 0,
‘default_phone_region’ => ‘IT’,
‘maintenance_window_start’ => 1,
‘filelocking.enabled’ => true,
‘filelocking.debug’ => false,
‘memcache.local’ => ‘\OC\Memcache\APCu’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘memcache.distributed’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘/var/run/redis/redis-server.sock’,
‘port’ => 0,
),
‘twofactor_enforced’ => ‘true’,
‘twofactor_enforced_groups’ =>
array (
),
‘twofactor_enforced_excluded_groups’ =>
array (
),
);
The output of your Apache/nginx/system log in /var/log/____
:
[Tue Jul 23 09:21:33.413074 2024] [access_compat:error] [pid 2812] [client 127.0.0.1:55818] AH01797: client denied by server configuration: /var/www/html/data/.ocdata
[Tue Jul 23 09:21:33.452591 2024] [access_compat:error] [pid 2812] [client 127.0.0.1:55818] AH01797: client denied by server configuration: /var/www/html/data/.ocdata
[Tue Jul 23 09:21:33.490221 2024] [access_compat:error] [pid 2812] [client 127.0.0.1:55818] AH01797: client denied by server configuration: /var/www/html/data/.ocdata
UPDATE #1
I tried to disable filelocking, to disable cache, to replace redis with APCu but the error persists.
With browser console I get those errors:
This is the nextcloud.log entry with filelocking debug enabled
{"reqId":"VMCNKB7Qboh1goleJ46G","level":3,"time":"2024-07-23T10:30:17+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"xxxxxx","app":"notes","method":"GET","url":"/apps/notes/notes?pruneBefore=1721730590","message":"Could not generate Content Etag for note 7953","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36","version":"29.0.4.1","exception":{"Exception":"OCP\\Lock\\LockedException","Message":"\"Note/xxxxxx.md\" is locked, existing lock on file: exclusive","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Files/View.php","line":2068,"function":"lockPath","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/lib/private/Files/View.php","line":1151,"function":"lockFile","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/lib/private/Files/View.php","line":584,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/lib/private/Files/Node/File.php","line":54,"function":"file_get_contents","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/apps/notes/lib/Service/Note.php","line":41,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/html/apps/notes/lib/Service/MetaService.php","line":188,"function":"getContent","class":"OCA\\Notes\\Service\\Note","type":"->"},{"file":"/var/www/html/apps/notes/lib/Service/Util.php","line":26,"function":"OCA\\Notes\\Service\\{closure}","class":"OCA\\Notes\\Service\\MetaService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/notes/lib/Service/MetaService.php","line":189,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::"},{"file":"/var/www/html/apps/notes/lib/Service/MetaService.php","line":170,"function":"generateContentEtag","class":"OCA\\Notes\\Service\\MetaService","type":"->"},{"file":"/var/www/html/apps/notes/lib/Service/MetaService.php","line":139,"function":"updateIfNeeded","class":"OCA\\Notes\\Service\\MetaService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/notes/lib/Service/MetaService.php","line":85,"function":"createMeta","class":"OCA\\Notes\\Service\\MetaService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/notes/lib/Controller/Helper.php","line":78,"function":"getAll","class":"OCA\\Notes\\Service\\MetaService","type":"->"},{"file":"/var/www/html/apps/notes/lib/Controller/NotesController.php","line":71,"function":"getNotesAndCategories","class":"OCA\\Notes\\Controller\\Helper","type":"->"},{"file":"/var/www/html/apps/notes/lib/Service/Util.php","line":26,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/notes/lib/Controller/Helper.php","line":140,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::"},{"file":"/var/www/html/apps/notes/lib/Controller/NotesController.php","line":97,"function":"handleErrorResponse","class":"OCA\\Notes\\Controller\\Helper","type":"->"},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"index","class":"OCA\\Notes\\Controller\\NotesController","type":"->"},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/lib/private/Files/View.php","Line":1963,"Previous":{"Exception":"OCP\\Lock\\LockedException","Message":"\"files/5b26a68a3525a25df8a3bb075dc1a01d\"(\"files/Note/Web Analytics Cloudflare.md\") is locked, existing lock on file: exclusive","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":616,"function":"acquireLock","class":"OC\\Files\\Storage\\Common","type":"->"},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":616,"function":"acquireLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":616,"function":"acquireLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/html/lib/private/Files/View.php","line":1958,"function":"acquireLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/html/lib/private/Files/View.php","line":2068,"function":"lockPath","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/lib/private/Files/View.php","line":1151,"function":"lockFile","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/lib/private/Files/View.php","line":584,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/lib/private/Files/Node/File.php","line":54,"function":"file_get_contents","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/apps/notes/lib/Service/Note.php","line":41,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/html/apps/notes/lib/Service/MetaService.php","line":188,"function":"getContent","class":"OCA\\Notes\\Service\\Note","type":"->"},{"file":"/var/www/html/apps/notes/lib/Service/Util.php","line":26,"function":"OCA\\Notes\\Service\\{closure}","class":"OCA\\Notes\\Service\\MetaService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/notes/lib/Service/MetaService.php","line":189,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::"},{"file":"/var/www/html/apps/notes/lib/Service/MetaService.php","line":170,"function":"generateContentEtag","class":"OCA\\Notes\\Service\\MetaService","type":"->"},{"file":"/var/www/html/apps/notes/lib/Service/MetaService.php","line":139,"function":"updateIfNeeded","class":"OCA\\Notes\\Service\\MetaService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/notes/lib/Service/MetaService.php","line":85,"function":"createMeta","class":"OCA\\Notes\\Service\\MetaService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/notes/lib/Controller/Helper.php","line":78,"function":"getAll","class":"OCA\\Notes\\Service\\MetaService","type":"->"},{"file":"/var/www/html/apps/notes/lib/Controller/NotesController.php","line":71,"function":"getNotesAndCategories","class":"OCA\\Notes\\Controller\\Helper","type":"->"},{"file":"/var/www/html/apps/notes/lib/Service/Util.php","line":26,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/notes/lib/Controller/Helper.php","line":140,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::"},{"file":"/var/www/html/apps/notes/lib/Controller/NotesController.php","line":97,"function":"handleErrorResponse","class":"OCA\\Notes\\Controller\\Helper","type":"->"},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"index","class":"OCA\\Notes\\Controller\\NotesController","type":"->"},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/lib/private/Files/Storage/Common.php","Line":774,"Previous":{"Exception":"OCP\\Lock\\LockedException","Message":"\"files/5b26a68a3525a25df8a3bb075dc1a01d\"(\"home::xxxxxx::files/Note/Web Analytics Cloudflare.md\") is locked, existing lock on file: exclusive","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Files/Storage/Common.php","line":772,"function":"acquireLock","class":"OC\\Lock\\MemcacheLockingProvider","type":"->"},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":616,"function":"acquireLock","class":"OC\\Files\\Storage\\Common","type":"->"},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":616,"function":"acquireLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":616,"function":"acquireLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/html/lib/private/Files/View.php","line":1958,"function":"acquireLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/html/lib/private/Files/View.php","line":2068,"function":"lockPath","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/lib/private/Files/View.php","line":1151,"function":"lockFile","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/lib/private/Files/View.php","line":584,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/lib/private/Files/Node/File.php","line":54,"function":"file_get_contents","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/apps/notes/lib/Service/Note.php","line":41,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/html/apps/notes/lib/Service/MetaService.php","line":188,"function":"getContent","class":"OCA\\Notes\\Service\\Note","type":"->"},{"file":"/var/www/html/apps/notes/lib/Service/Util.php","line":26,"function":"OCA\\Notes\\Service\\{closure}","class":"OCA\\Notes\\Service\\MetaService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/notes/lib/Service/MetaService.php","line":189,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::"},{"file":"/var/www/html/apps/notes/lib/Service/MetaService.php","line":170,"function":"generateContentEtag","class":"OCA\\Notes\\Service\\MetaService","type":"->"},{"file":"/var/www/html/apps/notes/lib/Service/MetaService.php","line":139,"function":"updateIfNeeded","class":"OCA\\Notes\\Service\\MetaService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/notes/lib/Service/MetaService.php","line":85,"function":"createMeta","class":"OCA\\Notes\\Service\\MetaService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/notes/lib/Controller/Helper.php","line":78,"function":"getAll","class":"OCA\\Notes\\Service\\MetaService","type":"->"},{"file":"/var/www/html/apps/notes/lib/Controller/NotesController.php","line":71,"function":"getNotesAndCategories","class":"OCA\\Notes\\Controller\\Helper","type":"->"},{"file":"/var/www/html/apps/notes/lib/Service/Util.php","line":26,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/notes/lib/Controller/Helper.php","line":140,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::"},{"file":"/var/www/html/apps/notes/lib/Controller/NotesController.php","line":97,"function":"handleErrorResponse","class":"OCA\\Notes\\Controller\\Helper","type":"->"},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"index","class":"OCA\\Notes\\Controller\\NotesController","type":"->"},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/lib/private/Lock/MemcacheLockingProvider.php","Line":88}},"message":"Could not generate Content Etag for note 7953","exception":{},"CustomMessage":"Could not generate Content Etag for note 7953"}}
UPDATE #2
By analyzing apache error log, I can confirm that the access_compat wasn’t triggered before the upgrade to 29.0.4
I tried to disable the apache module access_compat but the LockedException error still occur
UPDATE #3
The problem was caused by the Antivirus for Files application, by deactivating the problem stopped immediately. Now i will try to understand better how I can reactivate without causing the problems anymore
UPDATE #4
Reactivating the the Antivirus for Files application and using Clamav Socket Daemon (instead of Clamav Executable) seems working fine