Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't delete invalid Federated Share #3766

Closed
michel-thomas opened this issue Mar 8, 2017 · 25 comments
Closed

Can't delete invalid Federated Share #3766

michel-thomas opened this issue Mar 8, 2017 · 25 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: sharing
Milestone

Comments

@michel-thomas
Copy link

Hello,
I have a Federated Share that I cannot access anymore, but it is still present in folder view and I cannot delete it (=unregister from it), neither unshare it (this FedShare has been re-shared to other user of my platform).
Many thanks for your analysis.

Steps to reproduce

  1. Someone share a folder via Federated Share
  2. Share it with other user of the instance
  3. Later, this person remove this sharing (don't know how: delete the folder? unshare?)
  4. Folder still appears and cannot be removed or unshare

Expected behaviour

Ability to unshare and remove invalid Federated Share folders.

Actual behaviour

Unsharing produce Error deleting file "DOSSIER PARTAGE CPE".
No deleting possibilities.

Server configuration

Operating system: Debian Wheezy up to date
Web server: Apache 2.2.22-13+deb7u7
Database: MySQL 5.5.46-0+deb7u1
PHP version: PHP 5.6.29-1~dotdeb+7.1
Nextcloud version: 11.0.2
Updated from an older Nextcloud/ownCloud or fresh install: oc9.1.1 -> oc9.1.4 -> nc10.0.4 -> nc11.0.2
Where did you install Nextcloud from: tar.gz
Signing status:

Signing status ``` No errors have been found. ```
**List of activated apps:**
App list ``` # sudo -u www-data ./occ app:list Enabled: - activity: 2.4.1 - calendar: 1.5.1 - comments: 1.1.0 - contacts: 1.5.3 - dav: 1.1.1 - direct_menu: 0.10.0 - external: 1.2 - federatedfilesharing: 1.1.1 - federation: 1.1.1 - files: 1.6.1 - files_pdfviewer: 1.0.1 - files_sharing: 1.1.1 - files_texteditor: 2.2 - files_trashbin: 1.1.0 - files_versions: 1.4.0 - firstrunwizard: 2.0 - logreader: 2.0.0 - lookup_server_connector: 1.0.0 - notifications: 1.0.1 - password_policy: 1.1.0 - provisioning_api: 1.1.0 - serverinfo: 1.1.1 - sharebymail: 1.0.1 - survey_client: 0.1.5 - systemtags: 1.1.3 - tasks: 0.9.5 - templateeditor: 0.2 - theming: 1.1.1 - twofactor_backupcodes: 1.0.0 - updatenotification: 1.1.1 - workflowengine: 1.1.1 Disabled: - admin_audit - encryption - files_accesscontrol - files_automatedtagging - files_external - files_retention - files_videoplayer - gallery - nextcloud_announcements - user_external - user_ldap - user_saml ```

The content of config/config.php:

Config report ``` # sudo -u www-data ./occ config:list system { "system": { "instanceid": "occs60snv57y", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "my.domain.com" ], "datadirectory": "\/workdir\/my.domain.com\/data", "overwrite.cli.url": "https:\/\/my.domain.com", "dbtype": "mysql", "dbhost": "localhost", "dbname": "dbname", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "version": "11.0.2.7", "installed": true, "theme": "", "loglevel": 2, "maintenance": false, "trashbin_retention_obligation": "auto", "default_language": "fr", "logfile": "\/workdir\/logs\/owncloud\/my.domain.com.log", "logtimezone": "Europe\/Berlin", "log_rotate_size": "20971520", "minimum.supported.desktop.version": "1.7.0", "memcache.local": "\\OC\\Memcache\\APCu", "updatechecker": true, "appstoreenabled": true, "appstore.experimental.enabled": true } } ```

Are you using external storage, if yes which one: Federated
Are you using encryption: no

Logs

Web server error log

Web server error log
mysql> select * from oc_filecache where path like "%DOSSIER PARTAGE%";
Empty set (0.05 sec)

Nextcloud log (data/nextcloud.log)

Nextcloud log
{"reqId":"Hv0I4OGCBCdiCc8yAMLt","remoteAddr":"109.190.199.43","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Storage is temporarily not available\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Tree.php(178): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->getNodeForPath('DOSSIER PARTAGE...')\\n#1 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(287): Sabre\\\\DAV\\\\Tree->delete('DOSSIER PARTAGE...')\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpDelete(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:DELETE', Array)\\n#5 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/workdir\\\/my.domain.com\\\/www\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(60): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/workdir\\\/my.domain.com\\\/www\\\/remote.php(165): require_once('\\\/workdir\\\/my.doma....')\\n#8 {main}\",\"File\":\"\\\/workdir\\\/my.domain.com\\\/www\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/ObjectTree.php\",\"Line\":162,\"User\":\"AlterBative\"}","level":4,"time":"2017-03-08T09:22:45+01:00","method":"DELETE","url":"\/remote.php\/webdav\/DOSSIER%20PARTAGE%20CPE","user":"AlterBative","version":"11.0.2.7"}
{"reqId":"Tyc\/kgJrCQ0p\/3c8dK+o","remoteAddr":"185.9.250.47","app":"no app in context","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'UPDATE `oc_mounts` SET `storage_id` = ?, `mount_point` = ?, `mount_id` = ? WHERE (`user_id` = ?) AND (`root_id` = ?)' with params [\\\"7\\\", \\\"\\\\\\\/Jay\\\\\\\/files\\\\\\\/DOSSIER PARTAGE CPE\\\\\\\/\\\", null, \\\"Jay\\\", 74660]:\\n\\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction\",\"Code\":0,\"Trace\":\"#0 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(996): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'UPDATE `oc_moun...', Array)\\n#2 \\\/workdir\\\/my.domain.com\\\/www\\\/lib\\\/private\\\/DB\\\/Connection.php(215): Doctrine\\\\DBAL\\\\Connection->executeUpdate('UPDATE `oc_moun...', Array, Array)\\n#3 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Query\\\/QueryBuilder.php(208): OC\\\\DB\\\\Connection->executeUpdate('UPDATE `*PREFIX...', Array, Array)\\n#4 \\\/workdir\\\/my.domain.com\\\/www\\\/lib\\\/private\\\/DB\\\/QueryBuilder\\\/QueryBuilder.php(177): Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder->execute()\\n#5 \\\/workdir\\\/my.domain.com\\\/www\\\/lib\\\/private\\\/Files\\\/Config\\\/UserMountCache.php(182): OC\\\\DB\\\\QueryBuilder\\\\QueryBuilder->execute()\\n#6 \\\/workdir\\\/my.domain.com\\\/www\\\/lib\\\/private\\\/Files\\\/Config\\\/UserMountCache.php(129): OC\\\\Files\\\\Config\\\\UserMountCache->updateCachedMount(Object(OC\\\\Files\\\\Config\\\\LazyStorageMountInfo))\\n#7 \\\/workdir\\\/my.domain.com\\\/www\\\/lib\\\/private\\\/Files\\\/Config\\\/MountProviderCollection.php(134): OC\\\\Files\\\\Config\\\\UserMountCache->registerMounts(Object(OC\\\\User\\\\User), Array)\\n#8 \\\/workdir\\\/my.domain.com\\\/www\\\/lib\\\/private\\\/Files\\\/Filesystem.php(449): OC\\\\Files\\\\Config\\\\MountProviderCollection->registerMounts(Object(OC\\\\User\\\\User), Array)\\n#9 \\\/workdir\\\/my.domain.com\\\/www\\\/lib\\\/private\\\/Files\\\/Filesystem.php(375): OC\\\\Files\\\\Filesystem::initMountPoints('Jay')\\n#10 \\\/workdir\\\/my.domain.com\\\/www\\\/lib\\\/private\\\/legacy\\\/util.php(235): OC\\\\Files\\\\Filesystem::init('Jay', '\\\/Jay\\\/files')\\n#11 \\\/workdir\\\/my.domain.com\\\/www\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php(123): OC_Util::setupFS('Jay')\\n#12 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Backend\\\/AbstractBasic.php(105): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->validateUserPass(*** sensitive parameters replaced ***)\\n#13 \\\/workdir\\\/my.domain.com\\\/www\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php(251): Sabre\\\\DAV\\\\Auth\\\\Backend\\\\AbstractBasic->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#14 \\\/workdir\\\/my.domain.com\\\/www\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php(154): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->auth(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#15 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(202): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#16 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(150): Sabre\\\\DAV\\\\Auth\\\\Plugin->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#17 [internal function]: Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#18 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#19 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(466): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#20 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#21 \\\/workdir\\\/my.domain.com\\\/www\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(60): Sabre\\\\DAV\\\\Server->exec()\\n#22 \\\/workdir\\\/my.domain.com\\\/www\\\/remote.php(165): require_once('\\\/workdir\\\/my.doma....')\\n#23 {main}\",\"File\":\"\\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":116}","level":3,"time":"2017-03-08T09:23:02+01:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Equipe\/Equipe%20d'appui\/Gestion%20horaires","user":"Jay","version":"11.0.2.7"}
{"reqId":"Tyc\/kgJrCQ0p\/3c8dK+o","remoteAddr":"185.9.250.47","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Doctrine\\\\DBAL\\\\Exception\\\\DriverException: An exception occurred while executing 'UPDATE `oc_mounts` SET `storage_id` = ?, `mount_point` = ?, `mount_id` = ? WHERE (`user_id` = ?) AND (`root_id` = ?)' with params [\\\"7\\\", \\\"\\\\\\\/Jay\\\\\\\/files\\\\\\\/DOSSIER PARTAGE CPE\\\\\\\/\\\", null, \\\"Jay\\\", 74660]:\\n\\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(202): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(150): Sabre\\\\DAV\\\\Auth\\\\Plugin->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 [internal function]: Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(466): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#5 \\\/workdir\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/workdir\\\/my.domain.com\\\/www\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(60): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/workdir\\\/my.domain.com\\\/www\\\/remote.php(165): require_once('\\\/workdir\\\/my.doma....')\\n#8 {main}\",\"File\":\"\\\/workdir\\\/my.domain.com\\\/www\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php\",\"Line\":162,\"User\":\"Jay\"}","level":4,"time":"2017-03-08T09:23:02+01:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Equipe\/Equipe%20d'appui\/Gestion%20horaires","user":"Jay","version":"11.0.2.7"}
@MorrisJobke MorrisJobke added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: sharing labels Mar 8, 2017
@MorrisJobke
Copy link
Member

cc @icewind1991 @rullzer @schiessle

@michel-thomas
Copy link
Author

Hello,
do you need more info to progress on analysis? any idea on how to correct it? and when?
BR,

@icewind1991
Copy link
Member

@Esprit-Libre anything in the server log when you try to delete it?

Later, this person remove this sharing (don't know how: delete the folder? unshare?)

Is "this person" here the original owner of the folder?

@michel-thomas
Copy link
Author

Yes it wasn't clear, sorry. I rewrite my description:

  1. User A from remote ownCloud instance share a folder via Federated Share to a User B of local instance
  2. User B share the folder to a user group of the local instance. User C is member of the group
  3. Later, User A (the owner) remove the sharing (don't know how: delete the folder? unshare?)
  4. Folder still appears and cannot be removed or unshare neither on User B nor C.

When I try to access to this folder with User C, I get these logs:

Nextcloud log ``` {"reqId":"KxjbDmyn7piB2Ypary5R","remoteAddr":"109.8.191.189","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Storage is temporarily not available\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/home\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(939): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->getNodeForPath('DOSSIER PARTAGE...')\\n#1 \\\/home\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(336): Sabre\\\\DAV\\\\Server->getPropertiesForPath('DOSSIER PARTAGE...', Array, 1)\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPropFind(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/home\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/home\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:PROPFIND', Array)\\n#5 \\\/home\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/home\\\/my.domain.com\\\/www\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(60): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/home\\\/my.domain.com\\\/www\\\/remote.php(165): require_once('\\\/home\\\/my.dom....')\\n#8 {main}\",\"File\":\"\\\/home\\\/my.domain.com\\\/www\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/ObjectTree.php\",\"Line\":162,\"User\":\"espritlibre\"}","level":4,"time":"2017-03-28T13:33:57+02:00","method":"PROPFIND","url":"\/remote.php\/webdav\/DOSSIER%20PARTAGE%20CPE","user":"espritlibre","version":"11.0.2.7"} ```

And when I try to unshare (unsubscribe) from this folder with user B, I get this message "Error deleting file "DOSSIER PARTAGE CPE"." and similar logs:

Nextcloud log ``` {"reqId":"zbJAVrCbqgbYTVVtCTSt","remoteAddr":"109.8.191.189","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Storage is temporarily not available\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/home\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Tree.php(178): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->getNodeForPath('DOSSIER PARTAGE...')\\n#1 \\\/home\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(287): Sabre\\\\DAV\\\\Tree->delete('DOSSIER PARTAGE...')\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpDelete(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/home\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/home\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:DELETE', Array)\\n#5 \\\/home\\\/my.domain.com\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/home\\\/my.domain.com\\\/www\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(60): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/home\\\/my.domain.com\\\/www\\\/remote.php(165): require_once('\\\/home\\\/my.dom....')\\n#8 {main}\",\"File\":\"\\\/home\\\/my.domain.com\\\/www\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/ObjectTree.php\",\"Line\":162,\"User\":\"AlterBative\"}","level":4,"time":"2017-03-28T13:44:02+02:00","method":"DELETE","url":"\/remote.php\/webdav\/DOSSIER%20PARTAGE%20CPE","user":"AlterBative","version":"11.0.2.7"} ```

@RLProteus
Copy link

Any update on this? I have a similar issue with a Federated share that I can not remove. The other server has been decommissioned and the server removed from my trusted servers list, but the folder still remains.

It also causes extreme slowness on this account unless I disable the federation and file sharing apps.

@vojeroen
Copy link

I have the same issue with a decommissioned federated share that I cannot remove from my nextcloud server.

@steelsnake
Copy link

The big issue is that this causes extreme slowdown, the easy-ish fix is to remove the entry from the share_external table.

@vojeroen
Copy link

vojeroen commented Jun 4, 2017

This seems to have fixed it for me. However it would still be useful if users could do this themselves through the web interface. I prefer to not give the other users on our system this kind of access to the database.

@michel-thomas
Copy link
Author

@vojeroen How did you fix it? SQL request to update database? Please share your workaround waiting a permanent solution. BR.

@icewind1991 Is there anything I can do to help resolving this issue? Thx.

@vojeroen
Copy link

vojeroen commented Jun 6, 2017

I executed a delete statement on the table oc_share_external to remove the line that linked to the decommissioned server. This effectively removed the shared directory and its contents from my nextcloud system.

@michel-thomas
Copy link
Author

@icewind1991 Users can't way anymore, so I delete from oc_share and oc_share_external the invalid link. I can't reproduce the problem for now. Even if I can't help more, any plan for fixing it? I already have the problem before, so I guess it will happen again.

@a-schild
Copy link

I too see this problem.
In addition to not being able to delete it, it also breaks client sync.

The file Abgabe.zip is a federated file from the cloud server own.cloud.ch which is currently unreachable.
So this would be simple to recreate:

  1. Create a second nextcloud instance A
  2. Make a federated share of a file from instance A to B
  3. Shutdown instance A
  4. Now client sync on B no llonger works
  5. In addition, the fil can not be removed on instance B
{"reqId":"YvuR7GuFncbC9E8Xo9ti","level":3,"time":"2017-07-11T11:35:24+00:00","remoteAddr":"xxx.xx.xx.xxx","user":"a.schild","app":"files_external","method":"GET","url":"\/ocs\/v1.php\/apps\/files_sharing\/api\/v1\/remote_shares?format=j
son&include_tags=true","message":"Sabre\\HTTP\\ClientException: Failed to connect to own.cloud.ch port 443: Connection refused","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko\/20100101 Firefox\/54.0","version":
"12.0.0.29"}
{"reqId":"mDHU0J7tUOfwv3t04iSa","level":3,"time":"2017-07-11T11:36:27+00:00","remoteAddr":"213.142.171.57","user":"a.schild","app":"files_external","method":"GET","url":"\/remote.php\/dav\/files\/a.schild\/Abgabe.zip","message":"SSL cert
ificate problem: certificate has expired","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.1 (build 8) (Nextcloud)","version":"12.0.0.29"}
Error | no app in context | OCP\Files\StorageNotAvailableException: Sabre\HTTP\ClientException: SSL certificate problem: certificate has expired
-- | -- | --

Sabre\DAV\Exception\ServiceUnavailable: HTTP/1.1 503 Service Unavailable

    /home/aarboard/cloud/htdocs/3rdparty/sabre/dav/lib/DAV/Tree.php - line 76: OCA\DAV\Connector\Sabre\Directory->getChild('Abgabe.zip')
    /home/aarboard/cloud/htdocs/3rdparty/sabre/dav/lib/DAVACL/Plugin.php - line 621: Sabre\DAV\Tree->getNodeForPath('files/a.schild/...')
    /home/aarboard/cloud/htdocs/3rdparty/sabre/dav/lib/DAVACL/Plugin.php - line 196: Sabre\DAVACL\Plugin->getCurrentUserPrivilegeSet('files/a.schild/...')
    /home/aarboard/cloud/htdocs/apps/dav/lib/Connector/Sabre/DavAclPlugin.php - line 46: Sabre\DAVACL\Plugin->checkPrivileges('files/a.schild/...', '{DAV }read', 1, false)
    /home/aarboard/cloud/htdocs/3rdparty/sabre/dav/lib/DAVACL/Plugin.php - line 889: OCA\DAV\Connector\Sabre\DavAclPlugin->checkPrivileges('files/a.schild/...', '{DAV }read')
    [internal function] Sabre\DAVACL\Plugin->beforeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
    /home/aarboard/cloud/htdocs/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
    /home/aarboard/cloud/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php - line 466: Sabre\Event\EventEmitter->emit('beforeMethod', Array)
    /home/aarboard/cloud/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
    /home/aarboard/cloud/htdocs/apps/dav/lib/Server.php - line 253: Sabre\DAV\Server->exec()
    /home/aarboard/cloud/htdocs/apps/dav/appinfo/v2/remote.php - line 33: OCA\DAV\Server->exec()
    /home/aarboard/cloud/htdocs/remote.php - line 162: require_once('/home/aarboard/...')
    {main}

@a-schild
Copy link

An occ scan aborts with this message:

Exception during scan: cURL error 60: SSL certificate problem: certificate has expired
#0 /home/aarboard/cloud/htdocs/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php(104): GuzzleHttp\Exception\RequestException::wrapException(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Ring\Exception\RingException))
#1 /home/aarboard/cloud/htdocs/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php(132): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
#2 /home/aarboard/cloud/htdocs/3rdparty/react/promise/src/FulfilledPromise.php(25): GuzzleHttp\RequestFsm->GuzzleHttp\{closure}(Array)
#3 /home/aarboard/cloud/htdocs/3rdparty/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL)
#4 /home/aarboard/cloud/htdocs/3rdparty/guzzlehttp/guzzle/src/Message/FutureResponse.php(43): GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object(Closure), NULL, NULL)
#5 /home/aarboard/cloud/htdocs/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php(135): GuzzleHttp\Message\FutureResponse::proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure))
#6 /home/aarboard/cloud/htdocs/3rdparty/guzzlehttp/guzzle/src/Client.php(165): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
#7 /home/aarboard/cloud/htdocs/3rdparty/guzzlehttp/guzzle/src/Client.php(125): GuzzleHttp\Client->send(Object(GuzzleHttp\Message\Request))
#8 /home/aarboard/cloud/htdocs/lib/private/Http/Client/Client.php(138): GuzzleHttp\Client->get('https://oc.schw...', Array)
#9 /home/aarboard/cloud/htdocs/apps/files_sharing/lib/External/Storage.php(272): OC\Http\Client\Client->get('https://oc.schw...', Array)
#10 /home/aarboard/cloud/htdocs/apps/files_sharing/lib/External/Storage.php(292): OCA\Files_Sharing\External\Storage->testRemoteUrl('https://oc.schw...')
#11 [internal function]: OCA\Files_Sharing\External\Storage->remoteIsOwnCloud()
#12 /home/aarboard/cloud/htdocs/lib/private/Files/Storage/Wrapper/Wrapper.php(501): call_user_func_array(Array, Array)
#13 [internal function]: OC\Files\Storage\Wrapper\Wrapper->__call('remoteIsOwnClou...', Array)
#14 [internal function]: OC\Files\Storage\Wrapper\Availability->remoteIsOwnCloud()
#15 /home/aarboard/cloud/htdocs/lib/private/Files/Storage/Wrapper/Wrapper.php(501): call_user_func_array(Array, Array)
#16 /home/aarboard/cloud/htdocs/apps/files_sharing/lib/External/Scanner.php(40): OC\Files\Storage\Wrapper\Wrapper->__call('remoteIsOwnClou...', Array)
#17 /home/aarboard/cloud/htdocs/apps/files_sharing/lib/External/Scanner.php(40): OCA\Files_Trashbin\Storage->remoteIsOwnCloud()
#18 /home/aarboard/cloud/htdocs/lib/private/Files/Utils/Scanner.php(242): OCA\Files_Sharing\External\Scanner->scan('', true, 3)
#19 /home/aarboard/cloud/htdocs/apps/files/lib/Command/Scan.php(161): OC\Files\Utils\Scanner->scan('/a.schild')
#20 /home/aarboard/cloud/htdocs/apps/files/lib/Command/Scan.php(234): OCA\Files\Command\Scan->scanFiles('a.schild', '/a.schild', true, Object(Symfony\Component\Console\Output\ConsoleOutput), false)
#21 /home/aarboard/cloud/htdocs/3rdparty/symfony/console/Command/Command.php(256): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /home/aarboard/cloud/htdocs/core/Command/Base.php(161): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /home/aarboard/cloud/htdocs/3rdparty/symfony/console/Application.php(818): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /home/aarboard/cloud/htdocs/3rdparty/symfony/console/Application.php(186): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /home/aarboard/cloud/htdocs/3rdparty/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /home/aarboard/cloud/htdocs/lib/private/Console/Application.php(170): Symfony\Component\Console\Application->run(NULL, NULL)
#27 /home/aarboard/cloud/htdocs/console.php(92): OC\Console\Application->run()
#28 /home/aarboard/cloud/htdocs/occ(11): require_once('/home/aarboard/...')

@MorrisJobke
Copy link
Member

Fixed by #5753

@MorrisJobke MorrisJobke added this to the Nextcloud 13 milestone Jul 21, 2017
@deg0nz
Copy link

deg0nz commented Nov 27, 2017

I had the same issue with NextCloud 12.0.3 with an orphaned federated cloud share which made the webinterface veeeery slow. I wasn't able to delete it from the webinterface and there was no error message when I tried to delete it.
I removed the corresponding entry from the oc_share_external table, as described in @vojeroen's post. Now everything is snappy again :)

@Last-Order
Copy link

Same problem here. Deleting database record works.

@aryasenna
Copy link

aryasenna commented Jun 17, 2018

I can confirm I encountered this issue on latest stable NC (13.0.4)
The folder name is "Federated Folder" and it is already removed at the origin server (the one who initiate the share)

Log:

Fatal | webdav | 
Sabre\DAV\Exception\ServiceUnavailable: Storage is temporarily not available
/srv/nextcloud/apps/end_to_end_encryption/lib/Connector/Sabre/LockPlugin.php - line 184:OCA\DAV\Connector\Sabre\ObjectTree->getNodeForPath('Federated Folde...')
/srv/nextcloud/apps/end_to_end_encryption/lib/Connector/Sabre/LockPlugin.php - line 147:OCA\EndToEndEncryption\Connector\Sabre\LockPlugin->getNodeForPath('Federated Folde...')
/srv/nextcloud/apps/end_to_end_encryption/lib/Connector/Sabre/LockPlugin.php - line 114:OCA\EndToEndEncryption\Connector\Sabre\LockPlugin->getNode('Federated Folde...', 'DELETE')[internal function] OCA\EndToEndEncryption\Connector\Sabre\LockPlugin->checkLock(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/srv/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 466: Sabre\Event\EventEmitter->emit('beforeMethod', Array)
/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/srv/nextcloud/apps/dav/appinfo/v1/webdav.php - line 80: Sabre\DAV\Server->exec()
/srv/nextcloud/remote.php - line 164: require_once('/srv/nextcloud/...'){main}
-- | -- | --

I fixed it by manually deleting the offending share on oc_share_external table.

@MorrisJobke should the issue be reopened, or do I create new issue?

@MorrisJobke
Copy link
Member

Create a new one

@jcklpe
Copy link

jcklpe commented Oct 29, 2018

@MorrisJobke @aryasenna Has a solution for this (other than just deleting the db table) been created and if not has there at least been a ticket created to track this issue? I am also encountering this issue. I could always do the DB fix but it seems to me reasonable that federated shares might temporarily be shutdown etc and wouldn't be great if that just resulted in every other server they had been shared to going down also, right?

@wolframroesler
Copy link
Member

Had the same problem. Solved it by manually removing records from the database as suggested above. Nextcloud version is 15.0.7.

For the record, here's how I did it in detail (slightly redacted for privacy reasons), hoping this will be useful to others who are having the same problem. Hopefully, future Nextcloud versions will provide a more official way of dealing with this situation.

$ mysql -unextcloud -Dnextcloud -p
Password:

MariaDB [nextcloud]> select id,name,remote from oc_share_external;
+----+-------------+---------------------------------+
| id | name        | remote                          |
+----+-------------+---------------------------------+
| 1  | /mybadshare | https://servername.example.com/ |
+----+-------------+---------------------------------+

MariaDB [nextcloud]> delete from oc_share_external where id=1;

MariaDB [nextcloud]> select id,file_target from oc_share;
+----+------------------------------------------------+
| id | file_target                                    |
+----+------------------------------------------------+
...
| 25 | /mybadshare                                    |
+----+------------------------------------------------+

MariaDB [nextcloud]> delete from oc_share where id=25;

@Snuggle
Copy link

Snuggle commented Jun 13, 2019

This is still an issue and I don't believe manually editing the database is an acceptable solution.

@PetrusVermaak
Copy link

This is still an issue and I don't believe manually editing the database is an acceptable solution.

Agreed.

@PotcFdk
Copy link

PotcFdk commented Aug 3, 2019

So this wasn't fixed by #5753 as mentioned here?
In that case, I think this should be re-opened.

@PetrusVermaak
Copy link

No, not resolved. I have latest version of nextcloud (16.0.3) and error occurred 3 to 4 days ago with a federation share.

@kesselb
Copy link
Contributor

kesselb commented Aug 9, 2019

@Snuggle @PotcFdk @PetrusVermaak #12175 (there is a new issue for this problem. no need to reopen this one)

@nextcloud nextcloud locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: sharing
Projects
None yet
Development

No branches or pull requests