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

removing invalid remote shares #23005

Closed
atroxix opened this issue Mar 9, 2016 · 8 comments · Fixed by #25123
Closed

removing invalid remote shares #23005

atroxix opened this issue Mar 9, 2016 · 8 comments · Fixed by #25123

Comments

@atroxix
Copy link

atroxix commented Mar 9, 2016

Steps to reproduce

  1. Add/accept share from a remote OwnCloud server
  2. Make the remote OwnCloud server inaccessible

Expected behaviour

It should be possible to somehow remove/un-accept/forget those invalid shares.

Actual behaviour

Remote shares are not shown as they are not accessible, but they cause OwnCloud throwing errors about those in owncloud.log.

Server configuration

Operating system: FreeBSD

Web server: Apache 2.4

Database: MariaDB 10.0

PHP version: 5.6

ownCloud version: 9.0.0

Updated from an older ownCloud or fresh install: Updated from 8.2.2 (through 9.0.0RC1)

Where did you install ownCloud from: FreeBSD ports

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

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: Chromium

Operating system: Linux

ownCloud log (data/owncloud.log)

{"reqId":"qJf7Nngjr2C6iK9NRnQD","remoteAddr":"10.0.254.102","app":"core","message":"Exception while scanning storage \"shared::0834fb19a1db5e6deca1117a75491c65\": Sabre\\HTTP\\ClientException: Could not resolve host: inaccessible-owncloud.server","level":3,"time":"2016-03-09T09:47:37+00:00"}
{"reqId":"VQYsiweJAmR0dupbxJJW","remoteAddr":"10.0.254.102","app":"core","message":"Exception while scanning storage \"shared::0834fb19a1db5e6deca1117a75491c65\": Sabre\\HTTP\\ClientException: Could not resolve host: inaccessible-owncloud.server","level":3,"time":"2016-03-09T09:48:21+00:00"}
{"reqId":"VrBK1xG3bJkx46jtARyc","remoteAddr":"10.0.254.102","app":"core","message":"Exception while scanning storage \"shared::0834fb19a1db5e6deca1117a75491c65\": Sabre\\HTTP\\ClientException: Could not resolve host: inaccessible-owncloud.server","level":3,"time":"2016-03-09T09:50:29+00:00"}
@LukasReschke
Copy link
Member

@icewind1991 @owncloud/sharing Thoughts?

@rullzer
Copy link
Contributor

rullzer commented Mar 9, 2016

How did you make the server unaccessible. We do remove them depening on the returned status code I believe... @PVince81

@LukasReschke
Copy link
Member

Could not resolve host

Probably means the DNS won't resolve at all.

@atroxix
Copy link
Author

atroxix commented Mar 9, 2016

The server was originally accessible over VPN which I don't have access to anymore.

@PVince81 PVince81 added this to the 9.0.1-current-maintenance milestone Mar 14, 2016
@PVince81
Copy link
Contributor

There is a difference between "obsolete/invalid share" and "temporary unavailable shares".

The only case where we auto-delete shares is "obsolete" ones. To detect an obsolete one, it first connects to the share. If the share returns 404, then it checks whether the matching OC server is accessible by checking its "status.php". If the server is not accessible, it means the 404 was due to a "server temporarily gone" error, so the share is kept until the server becomes available again.
However if the "status.php" shows that the server is live and works, then the first 404 was indeed due to "share was deleted / does not exist any more", so we delete it.

In your case, since you changed the environment, it falls under the category "share temporarily unavailable until the server comes back". I don't think there is a good way to efficiently detect such cases without false positives (and deleting legitimate shares during a temporary outage). You'd have to write a SQL query to manually delete the shares that you as admin know aren't valid any more.

@atroxix
Copy link
Author

atroxix commented Mar 14, 2016

I'd happily do the change in DB directly. Where should I remove those shares?

@ghost ghost modified the milestones: 9.0.2-current-maintenance, 9.0.1 Apr 8, 2016
@PVince81
Copy link
Contributor

@atroxix the incoming remote shares are listed in oc_share_external so you can manually remove it from there.

@PVince81 PVince81 modified the milestones: 9.0.3-next-maintenance, 9.0.2-current-maintenance Apr 19, 2016
@nickvergessen nickvergessen self-assigned this Jun 15, 2016
@PVince81 PVince81 modified the milestones: 9.0.4-next-maintenance, 9.0.3-current-maintenance Jun 17, 2016
@lock
Copy link

lock bot commented Aug 4, 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.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants