Skip to content

webDAV failures #11869

Closed
Closed

Description

@craigpg

I can login to the webUI but webDAV repeatedly fails. I believe it's caused by one (or more) external mounts that are being unresponsive / unreachable / etc. but that shouldn't cause webDAV to fail.

server info

  1. using "owncloud7p" server (see 'lexington-lab-systems.txt' for more info)
  2. setup your own test account and try to use a webDAV client

log snippet

{"reqId":"5452471ef3433","app":"webdav","message":"Sabre\\DAV\\Exception\\NotAuthenticated: No basic authentication headers were found","level":0,"time":"2014-10-30T14:11:42+00:00","method":"HEAD","url":"\/owncloud7p\/remote.php\/webdav\/"}
{"reqId":"5452471f1b541","app":"admin_audit","message":"User craig attempted to log into ownCloud from IP address: 50.241.102.21","level":1,"time":"2014-10-30T14:11:43+00:00","method":"HEAD","url":"\/owncloud7p\/remote.php\/webdav\/"}
{"reqId":"5452471f1b541","app":"admin_audit","message":"User craig logged into ownCloud from IP address: 50.241.102.21","level":1,"time":"2014-10-30T14:11:43+00:00","method":"HEAD","url":"\/owncloud7p\/remote.php\/webdav\/"}
{"reqId":"545247209d439","app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for '' !!! \ncache: Array\n(\n    [fileid] => 46602\n    [storage] => dropbox::rt4kj1ktqigcl9jlzalepa60mh0n0zn\/\n    [path] => \n    [parent] => -1\n    [name] => \n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 34097319\n    [mtime] => 1414678168\n    [storage_mtime] => 1414678168\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 545246988b5e8\n    [permissions] => 31\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1414678304\n    [size] => -1\n    [etag] => 545247209d015\n    [storage_mtime] => 1414678304\n    [permissions] => 31\n)\n","level":0,"time":"2014-10-30T14:11:44+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
{"reqId":"545247209d439","app":"sharepoint","message":"hasUpdated: ","level":0,"time":"2014-10-30T14:11:54+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
{"reqId":"545247209d439","app":"sharepoint","message":"hasUpdated: ","level":0,"time":"2014-10-30T14:11:54+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
{"reqId":"545247209d439","app":"sharepoint","message":"EXCEPTION - treeBuilder - 401 - Access Denied","level":0,"time":"2014-10-30T14:11:54+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
{"reqId":"545247209d439","app":"remote","message":"","level":4,"time":"2014-10-30T14:11:54+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
{"reqId":"545247209d439","app":"PHP","message":"Session has been closed - no further changes to the session as allowed at \/var\/www\/owncloud7p\/lib\/private\/session\/memory.php#80","level":3,"time":"2014-10-30T14:11:54+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}

Activity

  1. added this to the milestone on Oct 30, 2014
  2. craigpg commented on Oct 30, 2014

    @craigpg
    Author

    @PVince81 or @DeepDiver1975 can you take a look?

  3. PVince81 commented on Oct 30, 2014

    @PVince81
    Contributor

    As a quick test I tried adding a throw new \Exception() in the stat() function of the S3 ext storage backend, and Webdav still works.

    From the log it looks like the sharepoint storage backend is throwing an exception in hasUpdated()

  4. PVince81 commented on Nov 4, 2014

    @PVince81
    Contributor

    Any progress on this ?

  5. jnfrmarks commented on Nov 4, 2014

    @jnfrmarks

    @PVince81 @craigpg @MTRichards

    What do you need for info on this? Is this a true stop ship issue?

  6. craigpg commented on Nov 5, 2014

    @craigpg
    Author

    Confirmed in my testing, that webDav fails to get listing if there are configuration issues with external mounts. In my testing, I had credentials errors (they were missing) for some sharepoint mounts and the ip address had changed for a windows network drive. These are easy to spot in the files page since the user will get a warning about them and the bad mounts will have a red indicator icon. Once i fixed the errors associated with the mounts, webDav worked fine.

    @DeepDiver1975, need to make the mounts more robust such that they don't break webDav. This can easily happen if the admin creates a sharepoint mount that requires individual users to enter their username / password. Until they do so, webDav will not work and I suspect that the bad mount will prevent the client from syncing as well.

    @karlitschek, @MTRichards ?

  7. PVince81 commented on Nov 5, 2014

    @PVince81
    Contributor

    @craigpg can you try doing two separate tests:

    1. With sharepoint mounts where the password changed (I believe this was tested in the past and should work with webdav)
    2. With a WND mount where the IP has changed

    I'm suspecting that the latter is the one causing the issue.

    If there is a failure, check the owncloud.log for exceptions so we get a clue what kind of exceptions these apps are throwing that might impair the rest of the code.

  8. craigpg commented on Nov 6, 2014

    @craigpg
    Author

    I was going to try and reproduce (2) above, but I didn't get very far. Probably due to more lab configuration changes, the test server can no longer resolve api.dropbox.com, and this is breaking webDAV as well. You can probably simulate this by putting api.dropbox.com into the server's /etc/host file and have it point to some place other than dropbox.

    I'll try reproducing the WND case as well, but I'm hoping there's a general solution that can protect webDAV from any and all mount exceptions.

    {"reqId":"545ad81ba98a3","app":"admin_audit","message":"User craig attempted to log into ownCloud from IP address: 192.168.1.233","level":1,"time":"2014-11-06T02:08:27+00:00","method":"HEAD","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545ad81ba98a3","app":"admin_audit","message":"User craig logged into ownCloud from IP address: 192.168.1.233","level":1,"time":"2014-11-06T02:08:27+00:00","method":"HEAD","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545ad82090bd5","app":"user_ldap","message":"No group filter is specified, LDAP group feature will not be used.","level":1,"time":"2014-11-06T02:08:32+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545ad82090bd5","app":"PHP","message":"url_stat(): disk resource 'Downloads' not found in '192.168.1.36' at \/var\/www\/owncloud7p\/apps\/files_external\/3rdparty\/smb4php\/smb.php#251","level":3,"time":"2014-11-06T02:08:35+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545ad82090bd5","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path '' is not readable !!!","level":0,"time":"2014-11-06T02:08:35+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545ad82090bd5","app":"PHP","message":"file_exists(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution at \/var\/www\/owncloud7p\/apps\/files_external\/lib\/streamwrapper.php#51","level":3,"time":"2014-11-06T02:08:35+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545ad82090bd5","app":"PHP","message":"file_exists(): connect() failed: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution at \/var\/www\/owncloud7p\/apps\/files_external\/lib\/streamwrapper.php#51","level":3,"time":"2014-11-06T02:08:35+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545ad82090bd5","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path '' is not readable !!!","level":0,"time":"2014-11-06T02:08:35+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545ad82090bd5","app":"files_external","message":"Curl error: (6) Couldn't resolve host 'api.dropbox.com'\n","level":3,"time":"2014-11-06T02:08:35+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545ad82090bd5","app":"files_external","message":"Curl error: (6) Couldn't resolve host 'api.dropbox.com'\n","level":3,"time":"2014-11-06T02:08:35+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545ad82090bd5","app":"remote","message":"HTTP Error: (0) Couldn't resolve host 'accounts.google.com'","level":4,"time":"2014-11-06T02:08:35+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545ad82090bd5","app":"PHP","message":"Session has been closed - no further changes to the session as allowed at \/var\/www\/owncloud7p\/lib\/private\/session\/memory.php#80","level":3,"time":"2014-11-06T02:08:35+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    

    image

  9. craigpg commented on Nov 6, 2014

    @craigpg
    Author

    Log for WND with bad credentials. Results in same webDAV client error attempting to list the directory.

    {"reqId":"545ae8138aa29","app":"wnd","message":"WND\\SMB\\ConnectionError: Couldn't open SMB directory smb:\/\/192.168.1.181\/Downloads: unknown error (111)","level":4,"time":"2014-11-06T03:16:35+00:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/wnd-downloads"}
    {"reqId":"545ae8138aa29","app":"wnd","message":"WND\\SMB\\ConnectionError: Couldn't get xattr for smb:\/\/192.168.1.181\/Downloads\/: unknown error (111)","level":4,"time":"2014-11-06T03:16:35+00:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/wnd-downloads"}
    

    Note, however, that the desktop client DID sync the WND folder, which was of course empty because of the bad credentials. So, at least in my limited testing, the bad WND mounts do not effect the desktop client's ability to sync.

  10. 10 remaining items

  11. craigpg commented on Nov 6, 2014

    @craigpg
    Author

    I've tested with #11994 patch and on the server with no internet connectivity (i.e. google, dropbox, etc. are unreachable) webDAV is still failing:

    {"reqId":"545bc006e1702","app":"user_ldap","message":"No group filter is specified, LDAP group feature will not be used.","level":1,"time":"2014-11-06T18:37:58+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545bc006e1702","app":"PHP","message":"url_stat(): disk resource 'Downloads' not found in '192.168.1.36' at \/var\/www\/owncloud7p\/apps\/files_external\/3rdparty\/smb4php\/smb.php#251","level":3,"time":"2014-11-06T18:38:02+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545bc006e1702","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path '' is not readable !!!","level":0,"time":"2014-11-06T18:38:02+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545bc006e1702","app":"PHP","message":"file_exists(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution at \/var\/www\/owncloud7p\/apps\/files_external\/lib\/streamwrapper.php#51","level":3,"time":"2014-11-06T18:38:02+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545bc006e1702","app":"PHP","message":"file_exists(): connect() failed: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution at \/var\/www\/owncloud7p\/apps\/files_external\/lib\/streamwrapper.php#51","level":3,"time":"2014-11-06T18:38:02+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545bc006e1702","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path '' is not readable !!!","level":0,"time":"2014-11-06T18:38:02+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545bc006e1702","app":"files_external","message":"Curl error: (6) Couldn't resolve host 'api.dropbox.com'\n","level":3,"time":"2014-11-06T18:38:02+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545bc006e1702","app":"files_external","message":"Curl error: (6) Couldn't resolve host 'api.dropbox.com'\n","level":3,"time":"2014-11-06T18:38:02+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545bc006e1702","app":"remote","message":"HTTP Error: (0) Couldn't resolve host 'accounts.google.com'","level":4,"time":"2014-11-06T18:38:02+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    {"reqId":"545bc006e1702","app":"PHP","message":"Session has been closed - no further changes to the session as allowed at \/var\/www\/owncloud7p\/lib\/private\/session\/memory.php#80","level":3,"time":"2014-11-06T18:38:02+00:00","method":"PROPFIND","url":"\/owncloud7p\/remote.php\/webdav\/"}
    

    Result:

    PROPFIND /owncloud7p/remote.php/webdav/ HTTP/1.1
    Depth: 1
    Content-Type: text/xml; charset=utf-8
    Content-Length: 99
    Host: 192.168.1.62
    Connection: Keep-Alive
    User-Agent: Cyberduck/4.5.2 (Mac OS X/10.9.5) (x86_64)
    Cookie: oc8779c9c4e9=87fk9m0i242s1bfr3ued5bjj05
    Cookie2: $Version=1
    HTTP/1.1 500 Internal Server Error
    Server: nginx/1.6.0
    Date: Thu, 06 Nov 2014 18:38:02 GMT
    Content-Type: text/html
    Transfer-Encoding: chunked
    Connection: keep-alive
    X-Powered-By: PHP/5.5.18
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Strict-Transport-Security: max-age=0
    X-XSS-Protection: 1; mode=block
    X-Content-Type-Options: nosniff
    X-Frame-Options: Sameorigin
    Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src *; font-src 'self' data:; media-src *
    X-Robots-Tag: none
    
  12. craigpg commented on Nov 6, 2014

    @craigpg
    Author

    Without the patch, windows network drive with missing/bad credentials, webDAV is able to get the files listing.

    image

  13. craigpg commented on Nov 6, 2014

    @craigpg
    Author

    FYI, dropbox mounts seem quite resilient and I was unable to break webDAV by disabling api.dropbox.com (via /etc/hosts) or deleting the dropbox api keys. There was some slight differences in behavior between the patched and non-patched servers, but in either case webDAV did not break.

  14. PVince81 commented on Nov 7, 2014

    @PVince81
    Contributor

    WebDAV doesn't break because it properly throws StorageNotAvailableException.

    Dropbox does NOT raise that exception and most other external storages also don't. Every other storage needs to be fixed individually, see #11792.
    Need to spend some time finding out what the possible error cases are because we don't want to throw StorageNotAvailableException for every storage exception, only a few types.

    So here you should mostly test whether WebDAV, WND and Sharepoint work properly with the patch.

    What do you mean "does NOT block webdav" ? What does blocking mean ?
    You might still be able to get a list of files due to the file cache but not access file contents.

  15. PVince81 commented on Nov 7, 2014

    @PVince81
    Contributor

    If WebDAV, WND and Sharepoint work let's ship this.
    There's not enough time to fix all the other storage instances...

  16. craigpg commented on Nov 7, 2014

    @craigpg
    Author

    I agree with @PVince81. There are still cases where webDAV is unable to get the files list, presumably because of a failed storage instance. In my testing, it looks like WND and Sharepoint are in good shape at this point. 👍

  17. MTRichards commented on Nov 7, 2014

    @MTRichards
    Contributor

    Agreed, but lets keep it on the list for oC 8 external storage updates.

  18. PVince81 commented on Nov 7, 2014

    @PVince81
    Contributor

    Note: the stable7 fix has already been merged.
    The master one is having trouble with Jenkins but is not important for the release.

  19. PVince81 commented on Nov 7, 2014

    @PVince81
    Contributor

    Removing gold.
    Should we close this and continue in #11792 ?

  20. modified the milestones: , 2014-sprint-07 on Nov 10, 2014
  21. DeepDiver1975 commented on Jan 7, 2015

    @DeepDiver1975
    Contributor

    Should we close this and continue in #11792 ?

    yes - THX

  22. locked as resolved and limited conversation to collaborators on Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions