Error while suppressing a file


#1

I run oc 10.0.3 and I ùight have broken something :
What I did : I started to upload files in the folder "Photos Beterette"
in the meantime, on another window, i pressed this folder's chain in order to give a public access to it. Changing my mind, I did'nt proceed.

Anyway, I get the message "Error while suppressing a file" while I try to delete "Photos Beterette" folder.
Is there anyway to get rid of this folder that I don't need anymore.

Here is the log :
{"reqId":"WmIVuAoAPUUAAHpnZXsAAAAB","level":3,"time":"2018-01-19T15:58:48+00:00","remoteAddr":"92.129.158.5","user":"gilles","app":"PHP","method":"GET","url":"\/nuage\/owncloud\/index.php\/settings\/admin?sectionid=general","message":"opendir(\/home\/infoadre\/www\/nuage\/owncloud\/themes): failed to open dir: No such file or directory at \/home\/infoadre\/www\/nuage\/owncloud\/apps\/templateeditor\/lib\/mailtemplate.php#155"}
{"reqId":"WmIV1QoAPUUAAARqNbkAAAAn","level":3,"time":"2018-01-19T15:59:17+00:00","remoteAddr":"92.129.158.5","user":"gilles","app":"PHP","method":"POST","url":"\/nuage\/owncloud\/index.php\/settings\/admin\/log\/level","message":"Zend OPcache API is restricted by \"restrict_api\" configuration directive at \/home\/infoadre\/www\/nuage\/owncloud\/lib\/private\/legacy\/util.php#1341"}
{"reqId":"WmIWCAoAPUUAADubHewAAABL","level":4,"time":"2018-01-19T16:00:09+00:00","remoteAddr":"92.129.158.5","user":"gilles","app":"webdav","method":"DELETE","url":"\/nuage\/owncloud\/remote.php\/webdav\/Ma%20bilbioth%C3%A8que\/Photos%20Beterette","message":"Exception: {\"Message\":\"HTTP\\/1.1 423 \\"Ma bilbioth\u00e8que\\/Photos Beterette\\" is locked\",\"Exception\":\"OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked\",\"Code\":0,\"Trace\":\"#0 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Tree.php(179): OCA\\DAV\\Connector\\Sabre\\Directory->delete()\n#1 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/CorePlugin.php(287): Sabre\\DAV\\Tree->delete('Ma bilbioth\\xC3\\xA8qu...')\n#2 [internal function]: Sabre\\DAV\\CorePlugin->httpDelete(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#3 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/sabre\\/event\\/lib\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#4 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(479): Sabre\\Event\\EventEmitter->emit('method:DELETE', Array)\n#5 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#6 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/apps\\/dav\\/appinfo\\/v1\\/webdav.php(63): Sabre\\DAV\\Server->exec()\n#7 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/remote.php(165): require_once('\\/home\\/infoadre\\/...')\n#8 {main}\",\"File\":\"\\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/apps\\/dav\\/lib\\/Connector\\/Sabre\\/Directory.php\",\"Line\":330,\"User\":\"gilles\"}"}
{"reqId":"WmIWzAoAPUUAAH-paeMAAAA9","level":3,"time":"2018-01-19T16:03:24+00:00","remoteAddr":"92.129.158.5","user":"gilles","app":"PHP","method":"GET","url":"\/nuage\/owncloud\/index.php\/settings\/admin?sectionid=general","message":"opendir(\/home\/infoadre\/www\/nuage\/owncloud\/themes): failed to open dir: No such file or directory at \/home\/infoadre\/www\/nuage\/owncloud\/apps\/templateeditor\/lib\/mailtemplate.php#155"}
{"reqId":"WmIWzAoAPUUAAH-paeQAAAAp","level":0,"time":"2018-01-19T16:03:24+00:00","remoteAddr":"92.129.158.5","user":"--","app":"cron","method":"GET","url":"\/nuage\/owncloud\/cron.php","message":"Started background job of class : OCA\Files_Sharing\DeleteOrphanedSharesJob with arguments : "}
{"reqId":"WmIWzAoAPUUAAH-paeQAAAAp","level":0,"time":"2018-01-19T16:03:24+00:00","remoteAddr":"92.129.158.5","user":"--","app":"DeleteOrphanedSharesJob","method":"GET","url":"\/nuage\/owncloud\/cron.php","message":"0 orphaned share(s) deleted"}
{"reqId":"WmIWzAoAPUUAAH-paeQAAAAp","level":0,"time":"2018-01-19T16:03:24+00:00","remoteAddr":"92.129.158.5","user":"--","app":"cron","method":"GET","url":"\/nuage\/owncloud\/cron.php","message":"Finished background job, the job took : 0 seconds, this job is an instance of class : OCA\Files_Sharing\DeleteOrphanedSharesJob with arguments : "}
{"reqId":"WmIW0QoAPUUAAH-pagAAAAAi","level":0,"time":"2018-01-19T16:03:29+00:00","remoteAddr":"92.129.158.5","user":"--","app":"cron","method":"GET","url":"\/nuage\/owncloud\/cron.php","message":"Started background job of class : OC\Command\CommandJob with arguments : O:33:\"OCA\Files_Trashbin\Command\Expire\":1:{s:39:\"\u0000OCA\Files_Trashbin\Command\Expire\u0000user\";s:6:\"gilles\";}"}
{"reqId":"WmIW0QoAPUUAAH-pagAAAAAi","level":0,"time":"2018-01-19T16:03:30+00:00","remoteAddr":"92.129.158.5","user":"--","app":"cron","method":"GET","url":"\/nuage\/owncloud\/cron.php","message":"Finished background job, the job took : 1 seconds, this job is an instance of class : OC\Command\CommandJob with arguments : O:33:\"OCA\Files_Trashbin\Command\Expire\":1:{s:39:\"\u0000OCA\Files_Trashbin\Command\Expire\u0000user\";s:6:\"gilles\";}"}

best regards


#2

I go on loading files and I got following message few times without stopping upload
an exception occured while executing 'update 'oc_files_locks set 'lock'=-1 'ttl' =? where 'key' = ? and 'lock'=1' with params [1516382389, "files\/1f7b1ae90650d31e9c1580725e5b1ee8"]:
sqlstate[HI000]: General error : 2006 mysql server has gone away

Here is the log:
{"reqId":"WmIdkwoAPUUAAEtRe@cAAABC","level":4,"time":"2018-01-19T16:33:20+00:00","remoteAddr":"92.129.158.5","user":"gilles","app":"webdav","method":"PUT","url":"\/nuage\/owncloud\/remote.php\/webdav\/Ma%20bilbioth%C3%A8que\/Photos%20Beterette\/P1000374.JPG","message":"Exception: {\"Message\":\"An exception occurred while executing 'UPDATE oc_file_locks SET lock = -1, ttl = ? WHERE key = ? AND lock = 1' with params [1516383200, \\"files\\\\/02837d661a5b200cc45767d0c709a18f\\"]:\n\nSQLSTATE[HY000]: General error: 2006 MySQL server has gone away\",\"Exception\":\"Doctrine\\DBAL\\Exception\\DriverException\",\"Code\":0,\"Trace\":\"#0 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/DBALException.php(128): Doctrine\\DBAL\\Driver\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\DBAL\\Driver\\PDOException))\n#1 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/Connection.php(1015): Doctrine\\DBAL\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\DBAL\\Driver\\PDOMySql\\Driver), Object(Doctrine\\DBAL\\Driver\\PDOException), 'UPDATE oc_file...', Array)\\n#2 \\\/home\\\/infoadre\\\/www\\\/nuage\\\/owncloud\\\/lib\\\/private\\\/DB\\\/Connection.php(211): Doctrine\\\\DBAL\\\\Connection->executeUpdate('UPDATEoc_file...', Array, Array)\n#3 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/private\\/Lock\\/DBLockingProvider.php(233): OC\\DB\\Connection->executeUpdate('UPDATE `*PREFIX...', Array)\n#4 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/private\\/Files\\/Storage\\/Common.php(671): OC\\Lock\\DBLockingProvider->changeLock('files\\/02837d661...', 2)\n#5 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/private\\/Files\\/Storage\\/Wrapper\\/Wrapper.php(613): OC\\Files\\Storage\\Common->changeLock('files\\/Ma bilbio...', 2, Object(OC\\Lock\\DBLockingProvider))\n#6 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/private\\/Files\\/Storage\\/Wrapper\\/Wrapper.php(613): OC\\Files\\Storage\\Wrapper\\Wrapper->changeLock('files\\/Ma bilbio...', 2, Object(OC\\Lock\\DBLockingProvider))\n#7 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/private\\/Files\\/Storage\\/Wrapper\\/Wrapper.php(613): OC\\Files\\Storage\\Wrapper\\Wrapper->changeLock('files\\/Ma bilbio...', 2, Object(OC\\Lock\\DBLockingProvider))\n#8 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/private\\/Files\\/View.php(1946): OC\\Files\\Storage\\Wrapper\\Wrapper->changeLock('files\\/Ma bilbio...', 2, Object(OC\\Lock\\DBLockingProvider))\n#9 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/apps\\/dav\\/lib\\/Connector\\/Sabre\\/Node.php(373): OC\\Files\\View->changeLock('\\/Ma bilbioth\\xC3\\xA8q...', 2)\n#10 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/apps\\/dav\\/lib\\/Connector\\/Sabre\\/File.php(195): OCA\\DAV\\Connector\\Sabre\\Node->changeLock(2)\n#11 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/apps\\/dav\\/lib\\/Connector\\/Sabre\\/Directory.php(162): OCA\\DAV\\Connector\\Sabre\\File->put(Resource id #370)\n#12 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(1095): OCA\\DAV\\Connector\\Sabre\\Directory->createFile('P1000374.JPG', Resource id #370)\n#13 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/CorePlugin.php(525): Sabre\\DAV\\Server->createFile('Ma bilbioth\\xC3\\xA8qu...', Resource id #370, NULL)\n#14 [internal function]: Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#15 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/sabre\\/event\\/lib\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#16 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(479): Sabre\\Event\\EventEmitter->emit('method:PUT', Array)\n#17 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#18 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/apps\\/dav\\/appinfo\\/v1\\/webdav.php(63): Sabre\\DAV\\Server->exec()\n#19 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/remote.php(165): require_once('\\/home\\/infoadre\\/...')\n#20 {main}\",\"File\":\"\\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/Driver\\/AbstractMySQLDriver.php\",\"Line\":115,\"User\":\"gilles\"}"}
{"reqId":"WmId9woAPUUAAFPj6WwAAAAJ","level":0,"time":"2018-01-19T16:33:59+00:00","remoteAddr":"92.129.158.5","user":"--","app":"cron","method":"GET","url":"\/nuage\/owncloud\/cron.php","message":"Started background job of class : OCA\Files\BackgroundJob\ScanFiles with arguments : "}
{"reqId":"WmId9woAPUUAAFPj6WwAAAAJ","level":0,"time":"2018-01-19T16:34:00+00:00","remoteAddr":"92.129.158.5","user":"--","app":"cron","method":"GET","url":"\/nuage\/owncloud\/cron.php","message":"Finished background job, the job took : 1 seconds, this job is an instance of class : OCA\Files\BackgroundJob\ScanFiles with arguments : "}
{"reqId":"WmIeAAoAPUUAAEtRfn0AAABJ","level":0,"time":"2018-01-19T16:34:08+00:00","remoteAddr":"92.129.158.5","user":"--","app":"cron","method":"GET","url":"\/nuage\/owncloud\/cron.php","message":"Started background job of class : OCA\Files\BackgroundJob\DeleteOrphanedItems with arguments : "}
{"reqId":"WmIeAAoAPUUAAEtRfn0AAABJ","level":0,"time":"2018-01-19T16:34:08+00:00","remoteAddr":"92.129.158.5","user":"--","app":"DeleteOrphanedItems","method":"GET","url":"\/nuage\/owncloud\/cron.php","message":"0 orphaned system tag relations deleted"}
{"reqId":"WmIeAAoAPUUAAEtRfn0AAABJ","level":0,"time":"2018-01-19T16:34:08+00:00","remoteAddr":"92.129.158.5","user":"--","app":"DeleteOrphanedItems","method":"GET","url":"\/nuage\/owncloud\/cron.php","message":"0 orphaned user tag relations deleted"}
{"reqId":"WmIeAAoAPUUAAEtRfn0AAABJ","level":0,"time":"2018-01-19T16:34:08+00:00","remoteAddr":"92.129.158.5","user":"--","app":"DeleteOrphanedItems","method":"GET","url":"\/nuage\/owncloud\/cron.php","message":"0 orphaned comments deleted"}
{"reqId":"WmIeAAoAPUUAAEtRfn0AAABJ","level":0,"time":"2018-01-19T16:34:08+00:00","remoteAddr":"92.129.158.5","user":"--","app":"DeleteOrphanedItems","method":"GET","url":"\/nuage\/owncloud\/cron.php","message":"0 orphaned comment read marks deleted"}
{"reqId":"WmIeAAoAPUUAAEtRfn0AAABJ","level":0,"time":"2018-01-19T16:34:08+00:00","remoteAddr":"92.129.158.5","user":"--","app":"cron","method":"GET","url":"\/nuage\/owncloud\/cron.php","message":"Finished background job, the job took : 0 seconds, this job is an instance of class : OCA\Files\BackgroundJob\DeleteOrphanedItems with arguments : "}
{"reqId":"WmIeAQoAPUUAAEtRfowAAABW","level":0,"time":"2018-01-19T16:34:09+00:00","remoteAddr":"92.129.158.5","user":"gilles","app":"core","method":"GET","url":"\/nuage\/owncloud\/index.php\/core\/preview.png?file=%2FMa+bilbioth%C3%A8que%2FPhotos+Beterette%2FP1000373.JPG&c=caa067f972dca4c0d2ea59eef26b2e53&x=39&y=39&forceIcon=0","message":"Generating preview for \"\/Ma bilbioth\u00e8que\/Photos Beterette\/P1000373.JPG\" with \"OC\Preview\JPEG\""}
{"reqId":"WmIeAQoAPUUAAEtRfowAAABW","level":0,"time":"2018-01-19T16:34:09+00:00","remoteAddr":"92.129.158.5","user":"gilles","app":"core","method":"GET","url":"\/nuage\/owncloud\/index.php\/core\/preview.png?file=%2FMa+bilbioth%C3%A8que%2FPhotos+Beterette%2FP1000373.JPG&c=caa067f972dca4c0d2ea59eef26b2e53&x=39&y=39&forceIcon=0","message":"OC_Image->fixOrientation() Orientation: 1"}
{"reqId":"WmIeAgoAPUUAAEtRfpIAAABL","level":3,"time":"2018-01-19T16:34:11+00:00","remoteAddr":"92.129.158.5","user":"gilles","app":"PHP","method":"GET","url":"\/nuage\/owncloud\/index.php\/settings\/admin?sectionid=general","message":"opendir(\/home\/infoadre\/www\/nuage\/owncloud\/themes): failed to open dir: No such file or directory at \/home\/infoadre\/www\/nuage\/owncloud\/apps\/templateeditor\/lib\/mailtemplate.php#155"}
{"reqId":"WmIeBQoAPUUAAG9INwkAAAAT","level":0,"time":"2018-01-19T16:34:13+00:00","remoteAddr":"92.129.158.5","user":"--","app":"cron","method":"GET","url":"\/nuage\/owncloud\/cron.php","message":"Started background job of class : OCA\Files\BackgroundJob\CleanupFileLocks with arguments : "}
{"reqId":"WmIeBQoAPUUAAG9INwkAAAAT","level":0,"time":"2018-01-19T16:34:13+00:00","remoteAddr":"92.129.158.5","user":"--","app":"cron","method":"GET","url":"\/nuage\/owncloud\/cron.php","message":"Finished background job, the job took : 0 seconds, this job is an instance of class : OCA\Files\BackgroundJob\CleanupFileLocks with arguments : "}


#3

and now I get "Ma bibliothèque/Photos Beterette/P111374.jpg is locked

here is the log:
{"reqId":"WmIfkQoAPUUAAEh1u88AAABs","level":4,"time":"2018-01-19T16:41:34+00:00","remoteAddr":"92.129.158.5","user":"gilles","app":"webdav","method":"PUT","url":"\/nuage\/owncloud\/remote.php\/webdav\/Ma%20bilbioth%C3%A8que\/Photos%20Beterette\/P1000374.JPG","message":"Exception: {\"Message\":\"HTTP\\/1.1 423 \\"Ma bilbioth\u00e8que\\/Photos Beterette\\/P1000374.JPG\\" is locked\",\"Exception\":\"OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked\",\"Code\":0,\"Trace\":\"#0 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/apps\\/dav\\/lib\\/Connector\\/Sabre\\/Directory.php(162): OCA\\DAV\\Connector\\Sabre\\File->put(Resource id #370)\n#1 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(1095): OCA\\DAV\\Connector\\Sabre\\Directory->createFile('P1000374.JPG', Resource id #370)\n#2 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/CorePlugin.php(525): Sabre\\DAV\\Server->createFile('Ma bilbioth\\xC3\\xA8qu...', Resource id #370, NULL)\n#3 [internal function]: Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#4 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/sabre\\/event\\/lib\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#5 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(479): Sabre\\Event\\EventEmitter->emit('method:PUT', Array)\n#6 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#7 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/apps\\/dav\\/appinfo\\/v1\\/webdav.php(63): Sabre\\DAV\\Server->exec()\n#8 \\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/remote.php(165): require_once('\\/home\\/infoadre\\/...')\n#9 {main}\",\"File\":\"\\/home\\/infoadre\\/www\\/nuage\\/owncloud\\/apps\\/dav\\/lib\\/Connector\\/Sabre\\/File.php\",\"Line\":200,\"User\":\"gilles\"}"}


#4

I suppose you have no redis server.

You can either wait for 1-2 hours until the cron job kicks in and deletes the file locks.

Or you can manually remove the locks, you have to login to you database, I suppose you have mysql, switch to your owncloud database, and execute truncate oc_file_locks;


#5

Thank you for your answer
However, I executed truncate oc_file_locks and got the same error message again


#6

is the file_locks table empty?

can you restart the mysql and apache2 service?


#7

I might have done something wrong :
the file was not empty rigth now. I re-executed the command and upload worked perfecrly.
Thanks for helping


#8

You're welcome, great to hear that this worked