Repository navigation
Description
Steps to reproduce
1.Upgrade to Owncloud 9.0.7.1 (from 8.2.9.4)
2. Create a new Folder in the Web-Frontend (I noticed that the error occurs mostly when the background cronjob is running)
3. Rename the new Folder in the Web-Frontend
Expected behaviour
The Folder should be renamed
Actual behaviour
...it is not
The Web-Frontend shows a message 'Could not rename "test" ' and there is a message in the Logfile:
Fatal
webdav
Exception: {"Message":"HTTP\/1.1 423 \"test\" is locked","Exception":"OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked","Code":0,"Trace":"#0 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(640): OCA\\DAV\\Connector\\Sabre\\ObjectTree->move('test', 'wtfwtf')\n#1 [internal function]: Sabre\\DAV\\CorePlugin->httpMove(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#2 \/var\/www\/owncloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:MOVE', Array)\n#4 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#5 \/var\/www\/owncloud\/apps\/dav\/appinfo\/v1\/webdav.php(55): Sabre\\DAV\\Server->exec()\n#6 \/var\/www\/owncloud\/remote.php(138): require_once('\/var\/www\/ownclo...')\n#7 {main}","File":"\/var\/www\/owncloud\/apps\/dav\/lib\/connector\/sabre\/objecttree.php","Line":250,"User":"cloudadmin"}
2017-01-04T10:20:38+00:00
But the fun part is: If I wait like half an hour the folder is renamed without me doing anything but I am still not able to rename it once more or delete the folder.
EDIT: Okay anotherfunny thing: The Folder actually is renamed on the file system so if I rename the folder "test" to "test2" on the Web-UI then an error message is displayed and the folder is still named test on the UI but if i look at the Filesystem in the data-Folder then the folder is named test2 ......
The same happens when I delete a folder, it is deleted on the Filesystem but in my browser I get an error and the folder is still displayed. After 1/2-1h everything is displayed correctly.
Server configuration
Operating system: Ubuntu 16.04.1 LTS (Kernel: 4.4.0-53-generic)
Web server: Apache 2.4.18-2ubuntu3.1
Database: Mariadb 10.1.20+maria-1~xenial
PHP version: 7.0.14-2+deb.sury.org~xenial+1
ownCloud version: (see ownCloud admin page) ownCloud 9.0.7 (production)
Updated from an older ownCloud or fresh install: Updated from 8.2.9.4
Where did you install ownCloud from: Downloaded package from Website
Signing status (ownCloud 9.0 and above):
Integrity checker has been disabled. Integrity cannot be verified.
List of activated apps:
Enabled:
- activity: 2.2.1
- comments: 0.2
- dav: 0.1.6
- encryption: 1.2.0
- federatedfilesharing: 0.1.0
- federation: 0.0.4
- files: 1.4.4
- files_sharing: 0.9.1
- files_trashbin: 0.8.0
- files_videoplayer: 0.9.8
- notifications: 0.2.3
- systemtags: 0.2
- updatenotification: 0.1.0
- user_ldap: 0.8.0
Disabled: - external
- files_antivirus
- files_external
- files_pdfviewer
- files_texteditor
- files_versions
- firstrunwizard
- gallery
- provisioning_api
- templateeditor
- user_external
The content of config/config.php:
{
"system": {
"instanceid": "oczdyrmfspob",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"xxxxxxxxxxxxxxxxxxxxxxxx"
],
"datadirectory": "\/var\/www\/owncloud\/data",
"overwrite.cli.url": "xxxxxxxxxxxxxxxxxxxxxxxx",
"dbtype": "mysql",
"version": "9.0.7.1",
"dbname": "owncloud",
"dbhost": "127.0.0.1",
"dbtableprefix": "oc_",
"installed": true,
"forcessl": true,
"forceSSLforSubdomains": true,
"ldapIgnoreNamingRules": false,
"maintenance": false,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"theme": "",
"loglevel": 1,
"trashbin_retention_obligation": "auto",
"memcache.local": "\\OC\\Memcache\\Redis",
"redis": {
"host": "\/var\/run\/redis\/redis.sock",
"port": 0,
"timeout": 0
},
"mail_smtpmode": "sendmail",
"mail_from_address": "owncloud",
"mail_domain": "xxxxxxxxxxxxxxxxxxxxxxxx",
"mail_smtphost": "xxxxxxxxxxxxxxxxxxxxxxxx",
"mail_smtpport": "25",
"singleuser": false,
"log_rotate_size": 10000000
}
}
(i replaced our domain with xxxxxxxxxxxxxxxxxxxxxxxx)
Are you using external storage, if yes which one: local/smb/sftp/...
Nope
Are you using encryption: yes/no
Nope
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
LDAP
LDAP configuration (delete this part if not used)
+-------------------------------+------------------------------------------------------------------------+
| Configuration | |
+-------------------------------+------------------------------------------------------------------------+
| hasMemberOfFilterSupport | |
| hasPagedResultSupport | |
| homeFolderNamingRule | |
| lastJpegPhotoLookup | 0 |
| ldapAgentName | uid=owncloudsystemuser,xxxxxxxxxxxxxx |
| ldapAgentPassword | *** |
| ldapAttributesForGroupSearch | |
| ldapAttributesForUserSearch | |
| ldapBackupHost | |
| ldapBackupPort | |
| ldapBase | xxxxxxxxxxxxxx |
| ldapBaseGroups | xxxxxxxxxxxxxx |
| ldapBaseUsers | xxxxxxxxxxxxxx |
| ldapCacheTTL | 600 |
| ldapConfigurationActive | 1 |
| ldapDynamicGroupMemberURL | |
| ldapEmailAttribute | mail |
| ldapExperiencedAdmin | 0 |
| ldapExpertUUIDGroupAttr | |
| ldapExpertUUIDUserAttr | |
| ldapExpertUsernameAttr | |
| ldapGroupDisplayName | cn |
| ldapGroupFilter | (|(cn=analysts)(cn=developer)(cn=externdev)(cn=office)(cn=praktikant)) |
| ldapGroupFilterGroups | analysts;developer;externdev;office;praktikant |
| ldapGroupFilterMode | 0 |
| ldapGroupFilterObjectclass | |
| ldapGroupMemberAssocAttr | memberUid |
| ldapHost | ldap://localhost/ |
| ldapIgnoreNamingRules | |
| ldapLoginFilter | (&(|(objectclass=inetOrgPerson))(|(uid=%uid)(|(displayName=%uid)))) |
| ldapLoginFilterAttributes | displayName |
| ldapLoginFilterEmail | 0 |
| ldapLoginFilterMode | 0 |
| ldapLoginFilterUsername | 1 |
| ldapNestedGroups | 0 |
| ldapOverrideMainServer | 0 |
| ldapPagingSize | 500 |
| ldapPort | 389 |
| ldapQuotaAttribute | |
| ldapQuotaDefault | |
| ldapTLS | 0 |
| ldapUserDisplayName | displayname |
| ldapUserDisplayName2 | |
| ldapUserFilter | (|(objectclass=inetOrgPerson)) |
| ldapUserFilterGroups | |
| ldapUserFilterMode | 1 |
| ldapUserFilterObjectclass | inetOrgPerson |
| ldapUuidGroupAttribute | auto |
| ldapUuidUserAttribute | auto |
| turnOffCertCheck | 1 |
| useMemberOfToDetectMembership | 1 |
+-------------------------------+------------------------------------------------------------------------+
The last part of my owncloud.log:
{"reqId":"IWM0WVFoGA1dYcocgbEl","remoteAddr":"","app":"user_ldap","message":"Paged search was not available","level":1,"time":"2017-01-04T12:00:06+00:00","method":"--","url":"--","user":"--"}
{"reqId":"IWM0WVFoGA1dYcocgbEl","remoteAddr":"","app":"user_ldap","message":"No paged search for us, Cpt., Limit 500 Offset 500","level":1,"time":"2017-01-04T12:00:06+00:00","method":"--","url":"--","user":"--"}
{"reqId":"IWM0WVFoGA1dYcocgbEl","remoteAddr":"","app":"user_ldap","message":"Looking for cookie L\/O 500\/0","level":1,"time":"2017-01-04T12:00:06+00:00","method":"--","url":"--","user":"--"}
{"reqId":"OIPgPPxRrYjtWN4RpD5X","remoteAddr":"85.126.11.242","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 423 \\\"lol\\\" is locked\",\"Exception\":\"OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Exception\\\\FileLocked\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(83): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->get()\\n#1 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpGet(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:GET', Array)\\n#4 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(55): Sabre\\\\DAV\\\\Server->exec()\\n#6 \\\/var\\\/www\\\/owncloud\\\/remote.php(138): require_once('\\\/var\\\/www\\\/ownclo...')\\n#7 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/connector\\\/sabre\\\/file.php\",\"Line\":317,\"User\":\"cloudadmin\"}","level":4,"time":"2017-01-04T11:52:42+00:00","method":"GET","url":"\/cloud\/remote.php\/webdav\/lol\/owncloud.log","user":"cloudadmin"}
{"reqId":"1b0DV1tEdtkcVwStWjIv","remoteAddr":"85.126.11.242","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 423 \\\"lol\\\" is locked\",\"Exception\":\"OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Exception\\\\FileLocked\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(83): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->get()\\n#1 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpGet(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:GET', Array)\\n#4 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(55): Sabre\\\\DAV\\\\Server->exec()\\n#6 \\\/var\\\/www\\\/owncloud\\\/remote.php(138): require_once('\\\/var\\\/www\\\/ownclo...')\\n#7 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/connector\\\/sabre\\\/file.php\",\"Line\":317,\"User\":\"cloudadmin\"}","level":4,"time":"2017-01-04T11:52:15+00:00","method":"GET","url":"\/cloud\/remote.php\/webdav\/lol\/owncloud.log","user":"cloudadmin"}
{"reqId":"oOdKWG3oUOmmK8Aa5vzb","remoteAddr":"","app":"user_ldap","message":"Paged search was not available","level":1,"time":"2017-01-04T11:47:24+00:00","method":"--","url":"--","user":"--"}
{"reqId":"oOdKWG3oUOmmK8Aa5vzb","remoteAddr":"","app":"user_ldap","message":"No paged search for us, Cpt., Limit 500 Offset 500","level":1,"time":"2017-01-04T11:47:24+00:00","method":"--","url":"--","user":"--"}
{"reqId":"oOdKWG3oUOmmK8Aa5vzb","remoteAddr":"","app":"user_ldap","message":"Looking for cookie L\/O 500\/0","level":1,"time":"2017-01-04T11:47:24+00:00","method":"--","url":"--","user":"--"}
{"reqId":"QGI7Z05t4XrY1UTzjOc9","remoteAddr":"85.126.11.242","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 423 \\\"test\\\" is locked\",\"Exception\":\"OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Exception\\\\FileLocked\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(640): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->move('test', 'test_WTFWTF')\\n#1 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpMove(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:MOVE', Array)\\n#4 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(55): Sabre\\\\DAV\\\\Server->exec()\\n#6 \\\/var\\\/www\\\/owncloud\\\/remote.php(138): require_once('\\\/var\\\/www\\\/ownclo...')\\n#7 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/connector\\\/sabre\\\/objecttree.php\",\"Line\":250,\"User\":\"cloudadmin\"}","level":4,"time":"2017-01-04T11:42:34+00:00","method":"MOVE","url":"\/cloud\/remote.php\/webdav\/test","user":"cloudadmin"}
{"reqId":"VSMsCP\/+wI\/IqrGp+hRt","remoteAddr":"","app":"user_ldap","message":"Paged search was not available","level":1,"time":"2017-01-04T11:30:05+00:00","method":"--","url":"--","user":"--"}
{"reqId":"VSMsCP\/+wI\/IqrGp+hRt","remoteAddr":"","app":"user_ldap","message":"No paged search for us, Cpt., Limit 500 Offset 500","level":1,"time":"2017-01-04T11:30:05+00:00","method":"--","url":"--","user":"--"}
{"reqId":"VSMsCP\/+wI\/IqrGp+hRt","remoteAddr":"","app":"user_ldap","message":"Looking for cookie L\/O 500\/0","level":1,"time":"2017-01-04T11:30:05+00:00","method":"--","url":"--","user":"--"}
Client configuration
Browser: Firefox
Operating system: Windows 7
Activity
PVince81 commentedon Jan 10, 2017
I think I observed a similar issue on my system where I uploaded a huge new file but got "423 Locked" when it finished. When looking at the logs it looked like some cron jobs were running at the time of the final rename.
We should add some "retry after delay" logic in the PHP code and let it give up only after a timeout. Closing in favor of #17016
PVince81 commentedon Jan 10, 2017
Reopening because the file/folder should not be renamed on-disk if there was a locking error. That looks suspicious.
[-]Unable to rename a newly created Folder[/-][+]Unable to rename a newly created Folder, locked[/+]hanzlik commentedon Jan 13, 2017
This sounds exactly like mine problem https://github.com/nextcloud/server/issues/3021 It takes 10 minutes to rename/delete a folder (ONLY FOLDER not files). I have "found" the problem -> oc_filecache is to big.
The query
SELECT path, fileid FROM oc_filecache WHERE storage = '2' AND path LIKE "/files/blubberfasel/bla"takes too long.Check the rows in oc_filecache.
conexxo commentedon Jan 16, 2017
Hi,
thanks for your replies! I checked the oc_filecache table on the server and it has 817778 entries, i tried to run a query manually and it executed in 0.01 seconds (according to mysql). That does not seem too slow to me? Should I run the occ files:cleanup command to see if there are any changes in the behaviour of my OC or is there any other possible way to check if this is the cause of my problem?
I also found out that this behaviour does not affect new folders only but sometimes also existing ones that should be renamed. Also the issue does not affect every rename operation but most of them (sometimes folders can be renamed without any delay or error message). This seems really strange to me!
hanzlik commentedon Jan 17, 2017
As far as I know, the occ files:cleanup looks for files, which doesn't exist anymore and deletes them from oc:filecache BUT the oc_filecache isn't a cache, it is a index of all files.
PVince81 commentedon Apr 20, 2017
I got this happening by "chance" when uploading a bunch of pictures into a shared folder in the web UI.
Before the locking issue I saw this in the logs:
maybe you'll find something similar with any call related to the locked file.
It seems the file was indeed uploaded correctly but the filecache update (post-update / post-hook ??) had an SQL failure, so apparently the lock wasn't properly removed after that.
Not reproducible consistently unfortunately...
Need a way to better catch such errors and still have proper cleanup of locks in such cases.
PVince81 commentedon Apr 20, 2017
That SQL deadlock error looks like etag / mtime propagation code.
Maybe the fact that the files were loaded in parallel made this happen.
ownclouders commentedon Dec 21, 2017
Hey, this issue has been closed because the label
status/STALEis set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.(This is an automated comment from GitMate.io.
PVince81 commentedon Dec 21, 2017
please reopen if still happening on 10.0.4
lock commentedon Jul 30, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.