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

Sync client errors when expired remote share is present and ext storage app is disabled #13383

Closed
enoch85 opened this issue Jan 15, 2015 · 37 comments
Assignees
Milestone

Comments

@enoch85
Copy link
Member

enoch85 commented Jan 15, 2015

Steps to reproduce

I removed the Dropbox account and deactivated the External Storage in the apps section in ownCloud

I also tried to re-activate external storage support and deleted the Dropbox share manually from the settings, but it didn't help.

Expected behaviour

No error

Actual behaviour

Sync client won't sync and throws Internal 500 error - Number 1060 as mentioned here #9594

Server configuration

Ubuntu Server 12.04

Database:
Server version: 5.5.38-0ubuntu0.12.04.1 (Ubuntu)
PHP version:
PHP 5.3.10-1ubuntu3.15 with Suhosin-Patch (cli) (built: Oct 29 2014 12:19:04)

ownCloud version: (see ownCloud admin page)
7.0.4
Updated from an older ownCloud or fresh install:
Updated from stable 5 and then later stable 6

List of activated apps:
Activity
Calender
Contacts
Deleted files
Documents
External Storage Support (was activated but I deactivated it)
First Run Wizard
Full Text Search
Music
PDF Viewer
Pictures
Share Files
Tasks
Text Editor
Updater
Versions
Video Viewer
ownCloud SMS

The content of config/config.php:

<?php
$CONFIG = array (
  'instanceid' => 'oc106ccbdf7c',
  'passwordsalt' => 'example',
  'datadirectory' => '/var/www/owncloud/data',
  'dbtype' => 'mysql',
  'version' => '7.0.4.2',
  'dbname' => 'owncloud',
  'dbhost' => 'example.se',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_enoch',
  'dbpassword' => 'example',
  'installed' => true,
  'maxZipInputSize' => 0,
  'allowZipDownload' => true,
  'session_lifetime' => 1800,
  'forcessl' => true,
  'updatechecker' => true,
  'loglevel' => '2',
  'theme' => '',
  'maintenance' => false,
  'trusted_domains' =>
  array (
    0 => 'example.se',
    1 => 'www.example.se',
  ),
  'preview_libreoffice_path' => '/usr/bin/libreoffice',
  'mail_smtpmode' => 'php',
  'mail_smtpname' => 'enoch',
  'mail_smtppassword' => 'EXAMPLE',
  'secret' => 'EXAMPLE$
);

Are you using external storage, if yes which one: local/smb/sftp/...
No
Are you using encryption: yes/no
No

Client configuration

Browser:
Version 39.0.2171.71 m
Operating system:
Windows 8.1
Sync Client
1.7.1 stable

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

{"app":"remote","message":"The passed data is not valid XML","level":4,"time":"2015-01-15T12:33:42+00:00"}
{"app":"PHP","message":"Session has been closed - no further changes to the session as allowed at \/var\/www\/owncloud\/lib\/privat$
{"app":"remote","message":"The passed data is not valid XML","level":4,"time":"2015-01-15T12:34:44+00:00"}
{"app":"PHP","message":"Session has been closed - no further changes to the session as allowed at \/var\/www\/owncloud\/lib\/privat$
{"app":"remote","message":"The passed data is not valid XML","level":4,"time":"2015-01-15T12:36:43+00:00"}
{"app":"PHP","message":"Session has been closed - no further changes to the session as allowed at \/var\/www\/owncloud\/lib\/privat$
{"app":"remote","message":"The passed data is not valid XML","level":4,"time":"2015-01-15T12:37:44+00:00"}
{"app":"PHP","message":"Session has been closed - no further changes to the session as allowed at \/var\/www\/owncloud\/lib\/privat$
{"app":"remote","message":"The passed data is not valid XML","level":4,"time":"2015-01-15T12:43:14+00:00"}
{"app":"PHP","message":"Session has been closed - no further changes to the session as allowed at \/var\/www\/owncloud\/lib\/privat$
{"app":"remote","message":"The passed data is not valid XML","level":4,"time":"2015-01-15T12:48:44+00:00"}

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
@enoch85
Copy link
Member Author

enoch85 commented Jan 15, 2015

CC @PVince81

@PVince81
Copy link
Contributor

Can you check oc_storages ? I suspect the Dropbox storage might still be there.

@DeepDiver1975
Copy link
Member

{"app":"remote","message":"The passed data is not valid XML","level":4,"time":"2015-01-15T12:33:42+00:00"}

this is most probably caused by some nasty code fragment writing to stdout and destroying the webdav response ....

@enoch85 can you enable xdebug on that server to get more information on these errors - THX

@enoch85
Copy link
Member Author

enoch85 commented Jan 15, 2015

@PVince81

namnlos

Seems like it. Should I just delete them? And why aren't these deleted automatically?

@DeepDiver1975 Never used xdebug before. This isn't a test machine. Can I delete xdebug if I install it? And how do I install it?

@enoch85
Copy link
Member Author

enoch85 commented Jan 15, 2015

@DeepDiver1975

Fatal   remote  The passed data is not valid XML    2015-01-15T12:34:44+00:00
Error   PHP Session has been closed - no further changes to the session as allowed at /var/www/owncloud/lib/private/session/memory.php#80

There is the complete line. Missed that in Putty.

@PVince81
Copy link
Contributor

Why not deleted automatically: PR in progress #11544 (comment)

@enoch85
Copy link
Member Author

enoch85 commented Jan 15, 2015

Thank you! So in other words, I could just delete those two entries?

@enoch85
Copy link
Member Author

enoch85 commented Jan 15, 2015

Tried to delete them, same error. 😞

@PVince81
Copy link
Contributor

Yes, the error is probably not related to the duplicate entries.
The real error is {"app":"remote","message":"The passed data is not valid XML","level":4,"time":"2015-01-15T12:43:14+00:00"}

Either the Dropbox API doesn't return correct XML today (service unavailable ?) or something else is broken.

Did you try enabling the XDebug module ? It should hopefully provide a stack trace that can help find out what part of the code threw that error.

@enoch85
Copy link
Member Author

enoch85 commented Jan 15, 2015

@PVince81 @DeepDiver1975 Xdebug is activated, how do I use it?

@enoch85
Copy link
Member Author

enoch85 commented Jan 15, 2015

No extra errors in log, though xdebug is activated. Please help me on this one.

@PVince81
Copy link
Contributor

What changed since last time it worked ?

That error seems to be thrown by SabreDAV client lib in parseMultiStatus().
The SabreDAV Client part is only used if you connect your OC to another ownCloud (server to server sharing, remote WebDAV storage or remote OC storage).
Do you have such storages mounted additionally to Dropbox ?

@enoch85
Copy link
Member Author

enoch85 commented Jan 16, 2015

Steps to reproduce

I removed the Dropbox account and deactivated the External Storage in the apps section in ownCloud

I also tried to re-activate external storage support and deleted the Dropbox share manually from the settings, but it didn't help.

Maybe the errors would disappear if I removed the Dropbox API?

@PVince81
Copy link
Contributor

The strange thing is that these error messages aren't even related to Dropbox.
This code path is called when either:

  1. A WebDAV external storage was mounted
  2. A ownCloud external storage was mounted
  3. Server to server sharing is used to mount a remote share

Since we didn't see anything related in your oc_storages, then maybe it's a server to server share ?
You can check this in the oc_share_external table.

@enoch85
Copy link
Member Author

enoch85 commented Jan 16, 2015

@PVince81 Everything happened when I removed Dropbox in the following order:

  1. Removed my Dropbox account at www.dropbox.com
  2. Still had a folder in https://example.se/index.php/apps/files/ namned Dropbox with about half of the MB left (displayed that anyway, didn´t check if it was half of the storage)
  3. Removed the External Storage support in the https://example.se/index.php/settings/apps?installed
  4. Got the error
  5. Tried to re-activate External Storage support in https://example.se/index.php/settings/apps?installed
  6. Went to https://example.se/index.php/settings/admin and removed myself as "availible to"
  7. Deactivated External Storage support once again in https://example.se/index.php/settings/apps?

I have deactivated Server-to-Server sharing for everyone, so that shouldn't be the issue.

Found this in oc_share_external:

image

@enoch85
Copy link
Member Author

enoch85 commented Jan 16, 2015

@PVince81 Btw, didn't remove my Dropbox API (to connect to ownCloud) when I deleted my Dropbox account. Do you know if that's done automatically when the account is deleted?

@PVince81
Copy link
Contributor

Could you backup and remove that entry in oc_share_external ? This is the only explanation for the error message.

You said you disabled server to server sharing, so if that line is still triggering the issue then it means there's another bug that still tries to mount remote shares even though server to server sharing is disabled.

@PVince81
Copy link
Contributor

The "Dropbox API" in question is probably just the token that is linked with the external storage entry. As soon as you delete the Dropbox external storage entry, the token is lost (ownCloud forgets it).

@enoch85
Copy link
Member Author

enoch85 commented Jan 16, 2015

Error seems to be gone on owncloud.log, but the server waiting time (or speed anyway) became really bad. From like 1 second, to about 3 seconds. Is that related?

EDIT: Never mind, just because I restarted the server and it had to load a bunch of things. :)

@enoch85
Copy link
Member Author

enoch85 commented Jan 16, 2015

Leaving this open for a while anyway, to see if the error comes back.

Thank you so much @PVince81 and @DeepDiver1975 for your paitance and support on this! We can always count on you. 👍

@enoch85 enoch85 removed the Attention label Jan 16, 2015
@enoch85
Copy link
Member Author

enoch85 commented Jan 16, 2015

Bug is gone. @PVince81 this will be fixed in 8.1 right?

@enoch85 enoch85 closed this as completed Jan 16, 2015
@PVince81 PVince81 reopened this Jan 16, 2015
@PVince81
Copy link
Contributor

I think we're not done yet and it is not clear what is supposed to be fixed.

So you deleted the server to server share.

There are possibly at least two bugs here:

  1. Connection to a remote share is broken
  2. ownCloud attempts to mount remote shares even if server to server sharing was disabled in the options (after the mount was there)

For 1), can you check whether the target server was available ? You should be able to find the public link token in that entry you deleted (I asked you to back it up). Check if the public link can be opened. Maybe the remote server is gone or broken. ownCloud should be fixed to recover from that.

And 2) needs to be checked and fixed, too.

@enoch85
Copy link
Member Author

enoch85 commented Jan 18, 2015

@PVince81 Can I email you the sql files and you can have a look?

@PVince81
Copy link
Contributor

Okay, please email at [email protected]

This also means I'll need to try and connect to the remote server from that server to server sharing entry, which will only be possible if:

  • no password was set
  • that server is accessible from the Internet

@enoch85
Copy link
Member Author

enoch85 commented Jan 19, 2015

@PVince81 But I don't have any server-to-server sharing with another server. I had a test config that I shared with myself, but that is gone now. Maybe that was the bug?

@PVince81
Copy link
Contributor

Yes, that was the bug.
That's the entry from "oc_share_external" you showed me here: #13383 (comment)

@enoch85
Copy link
Member Author

enoch85 commented Jan 19, 2015

Ok, so this could be closed then? Will there be a fix for this?

@PVince81
Copy link
Contributor

Can you try opening the link share with token "73fc9e397ff8043e52b0b322eb80f286" on your instance ?

https://yourhost/owncloud/public.php?service=files&t=73fc9e397ff8043e52b0b322eb80f286

Does it point to a correct share or is that share broken ?

Still trying to figure out what the problem was.

@enoch85
Copy link
Member Author

enoch85 commented Jan 19, 2015

@PVince81
Copy link
Contributor

Okay, so the bug is "syncing breaks when an expired share was mounted locally through server to server sharing". Needs to be investigated.

Normally when a remote share expired OC should notice it and automatically remove the local folder.

CC @icewind1991

@PVince81
Copy link
Contributor

Hmmm, I didn't manage to reproduce that.

I tried the following on 7.0.4 and master:

  1. Login as "user1"
  2. Create a folder "abc"
  3. Share "abc" with link
  4. Open link
  5. Click "Add to owncloud"
  6. Enter the URL of the current ownCloud (same instance)
  7. Accept mount: now there's another folder "abc (2)"
  8. Start sync client, let it sync
  9. Unshare "abc"
  10. Wait for sync client to sync: "abc (2)" is properly removed.

Now I wonder whether your setup is even allowing connecting to itself this way ? Did that test share ever work before ?
If that doesn't/didn't work then maybe something in your setup was blocking the connection and might have caused unexpected exceptions.

@PVince81 PVince81 self-assigned this Jan 19, 2015
@enoch85
Copy link
Member Author

enoch85 commented Jan 19, 2015

@PVince81

  1. Go to apps settings and deactivate External Storage support. (Instead of unshare)

It was such a long time ago I created the user miralltest that I don't remember if it worked or not.

The problems started when I deactivated External Storage support to delete Dropbox, which I thought was made by itself. Logic - if External Storage support is deactivated then everything that has to do with that (shares and stuff) should be deleted aswell. Apparently not.

@PVince81
Copy link
Contributor

Okay I see, so that might be the bug.

I'll try this scenario out later: mount server to server share, expire it, then disable the external storage app.

CC @icewind1991

@PVince81 PVince81 changed the title Internal 500 error - Number 1060 Sync client errors when expired remote share is present and ext storage app is disabled Jan 20, 2015
@enoch85
Copy link
Member Author

enoch85 commented Mar 23, 2015

Same here @PVince81 Milestone 8.2.

@enoch85 enoch85 added this to the 8.2-next milestone Mar 23, 2015
@ghost
Copy link

ghost commented Sep 21, 2015

Need to move to 9.0 at this point

@ghost ghost modified the milestones: 9.0-next, 8.2-current Sep 21, 2015
@ghost ghost modified the milestones: 9.1-next, 9.0-current Feb 23, 2016
@ghost ghost added the old-inactive label Feb 23, 2016
@PVince81
Copy link
Contributor

Could not reproduce in 9.0.4RC1.
I also tried having an expired share and disabled files_external with a configured Dropbox.

Please reopen if it happens again.

@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

No branches or pull requests

3 participants