Opened 3 years ago

Last modified 3 years ago

#12100 assigned Bug/Something is broken

Owncloud desktop not syncing

Reported by: Malcolm TC Owned by: JaimeV
Priority: High Component: Tech
Keywords: owncloud Cc: ying-sun.leftroots
Sensitive: no

Description

Hello I am using own cloud and finding a problem with getting my desktop app to sync files from the own cloud. When I log-in to the url I can access all the shared files but I keep getting an error code that the Operation is not permitted. I can share a screen shot if necessary.

I have uninstalled and reinstalled own cloud desktop. I am using a Mac computer, and the administrator for the own cloud account suggested I contact you.

Any advice would be appreciated

Attachments (1)

Screen Shot 2016-09-09 at 3.45.26 PM.png (786.3 KB) - added by Malcolm TC 3 years ago.
Screen Shot of Owncloud Error Message

Download all attachments as: .zip

Change History (11)

Changed 3 years ago by Malcolm TC

Screen Shot of Owncloud Error Message

comment:1 Changed 3 years ago by JaimeV

Owner: set to JaimeV
Status: newassigned

Hi sorry I missed this. Looking into it now.

comment:2 Changed 3 years ago by Malcolm TC

Thank you.

comment:3 Changed 3 years ago by JaimeV

Owner: changed from JaimeV to Jamie McClelland

Hi sorry for the delay. So after looking in the wrong place for logs initially I found the correct reference in the docs: https://doc.owncloud.org/server/8.2/admin_manual/configuration_server/logging_configuration.html

And then was able to find what appear to be related error messages in the logs

0 lucius:~# grep 'Cadre Care & Culture' /var/lib/owncloud/data/owncloud.log | tail
{"reqId":"v0y3DfQ4QKk\/BHfHUi+i","remoteAddr":"108.94.162.152","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 423 \\\"Cadre Care & Culture \\u2014 Shared Documents\\\/attendance sheets\\\/masters\\\/MASTER - boston attendance.xlsx\\\" is locked\",\"Exception\":\"OC\\\\Connector\\\\Sabre\\\\Exception\\\\FileLocked\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(82): OC\\\\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(469): Sabre\\\\Event\\\\EventEmitter->emit('method:GET', Array)\\n#4 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files\\\/appinfo\\\/remote.php(56): Sabre\\\\DAV\\\\Server->exec()\\n#6 \\\/var\\\/www\\\/owncloud\\\/remote.php(137): require_once('\\\/var\\\/www\\\/ownclo...')\\n#7 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/connector\\\/sabre\\\/file.php\",\"Line\":297}","level":4,"time":"2016-09-13T11:55:27+00:00"}
{"reqId":"1pSunrmBMbYoRxF11AXW","remoteAddr":"38.122.20.102","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 423 \\\"Cadre Care & Culture \\u2014 Shared Documents\\\/attendance sheets\\\/2016\\\/2016 audre lorde attendance.xlsx\\\" is locked\",\"Exception\":\"OC\\\\Connector\\\\Sabre\\\\Exception\\\\FileLocked\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(82): OC\\\\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(469): Sabre\\\\Event\\\\EventEmitter->emit('method:GET', Array)\\n#4 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files\\\/appinfo\\\/remote.php(56): Sabre\\\\DAV\\\\Server->exec()\\n#6 \\\/var\\\/www\\\/owncloud\\\/remote.php(137): require_once('\\\/var\\\/www\\\/ownclo...')\\n#7 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/connector\\\/sabre\\\/file.php\",\"Line\":297}","level":4,"time":"2016-09-13T12:01:06+00:00"}

So there appear to be a lot of these exceptions due to stray lock files. I did some searching and the most recurrent reference seems to be to flushing oc_file_locks in mysql database table.

https://github.com/owncloud/core/issues/20380

https://forum.owncloud.org/viewtopic.php?t=33012

https://central.owncloud.org/t/file-is-locked-how-to-unlock/985

However we are not using a mysql db for our owncloud install. I wan't able to find references to how to solve this problem with postgres. I think we'll need jamie's help with this.

comment:4 Changed 3 years ago by Jamie McClelland

Owner: changed from Jamie McClelland to JaimeV

Nice work getting to the bottom of this Jaime.

I don't think there is any difference in lock files between MySQL and postgresql.

However, there is a difference when using redis (redis is a very fast key/value store that holds transient data, like locks) and we are using redis.

I managed to find several lock files being held in redis:

0 lucius:~# su - www-data
www-data@lucius:~$ redis-cli --scan | grep lockfiles
2e217f837763f5d685d58ea7dd45624e/lockfiles/4b7a19fd955949ae819e6def43ffff21
2e217f837763f5d685d58ea7dd45624e/lockfiles/4c946cb645d5354a2f0e90b8293d5a7b
2e217f837763f5d685d58ea7dd45624e/lockfiles/6d392db47ecb341e37e4ed7d791a61f8
2e217f837763f5d685d58ea7dd45624e/lockfiles/a28d62de632d15dc7788bf0048fe4f63
2e217f837763f5d685d58ea7dd45624e/lockfiles/534f2e683a48fc8743833d6ab7134b5c
2e217f837763f5d685d58ea7dd45624e/lockfiles/4c22729116818c4fdff49e075bd792c7
www-data@lucius:~$ 

Because the files are referred to by key I can't tell if it is the same as the ones causing the problem above.

However, none of them seem to have an expiration set. For example:

www-data@lucius:~$ redis-cli TTL "2e217f837763f5d685d58ea7dd45624e/lockfiles/4b7a19fd955949ae819e6def43ffff21"
(integer) -1
www-data@lucius:~$ 

According to the redis docs -1 means no expiration, which seems likely to be the problem.

And, according to the ticket you referenced, stray locks in redis were fixed in 8.2.2 - so perhaps those locks that were left behind are from a previous version?

I would suggest:

  • Pick an off-hours time
  • Put owncloud in maintenance mode (edit /etc/owncloud/config.php and change maintenance => false to maintenance => true
  • Flush the lock files with
    for key in $(redis-cli --scan | grep lockfiles); do echo redis-cli DEL "$key"; done
    

comment:5 Changed 3 years ago by Malcolm TC

Hi, I'll be honest I am very confused by the directions being suggested and I don't really understand if the suggestions are things I should do or things that you are going to do, or things that the admin for the leftroots own cloud needs to do?

comment:6 Changed 3 years ago by Malcolm TC

Cc: ying-sun.leftroots added

comment:7 Changed 3 years ago by Ying-sun Ho

malcolm, i believe those are suggestions jamie and jaime are making to one another.

right, guys?

i'm guessing malcolm should sit tight while you try some things out. can you let us know one way or the other?

thanks!

  • y

comment:8 Changed 3 years ago by Jamie McClelland

Hi Malcolm and Ying-Sun - sorry for the confusing back and forth - I should have explained that this part of the discussion was intended to be between MF/PL admins about what to do on the server.

I just did take those steps - so I am hoping you can let us know if it solves the problem you were having or not.

For the admins...

I took these steps:

  • Edited /etc/owncloud/config.php and turned on maintenance mode
  • I ran:
    for key in $(redis-cli --scan | grep lockfiles); do redis-cli DEL "$key"; done
    
  • Even though it shouldn't be used, I also ran via psql:
     DELETE FROM oc_file_locks;
    
  • Turn off maintenance mode.

About 45 seconds downtime in total.

comment:9 Changed 3 years ago by Ying-sun Ho

hey hey. any update on this one? thanks.

  • ying-sun

comment:10 Changed 3 years ago by JaimeV

Hi sorry, I think we were waiting for confirmation on your end that the steps jamie took resolved the problem for malcolm.

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.