Federation Sharing: Error 503 Service unavailable

Yesterday I updated my Nextcloud from last version of 14 to 15.0.2. Since then I have the following problem, but I do not know if it is directly related to the update.

I have three federation shared folder from 2 different servers. Since the update everything works fine. But now I can’t open this folder mostly.
In the web interface I get the message: Speicher ist vorübergehend nicht verfügbar (english: Space is temporarily unavailable)
With my Webdav Client I get the message: HTTP Request failed: (503) service unavailable
And the iOS Nextcloud App shows: Request failed: service unavailable (503)

I can’t move, rename or delete this shared folder.
I wrote most at the top because I get access to it sometimes, but very rarely.

The occ commands have not changed anything:
files:scan
maintenance:repair

Even deleting and re-adding the folder brought no success

Why is it that federation sharing is no longer possible?


Nextcloud version: 15.0.2
Operating system and version: Red Hat 4.8.5-28
Apache or nginx version: Apache/2.4.37 (Unix)
PHP version: 7.1.26

The output of your Nextcloud log in Admin > Logging:

{"reqId":"XEXsNLEbgyYoAdRmU8xWVAAAAFI","level":4,"time":"2019-01-21T15:58:44+00:00","remoteAddr":"::ffff:93.195.63.22","user":"christoph","app":"webdav","method":"PROPFIND","url":"\/remote.php\/dav\/files\/christoph\/ZEW-2019","message":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"","Code":0,"Trace":[{"file":"\/var\/www\/virtual\/cloud\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/Tree.php","line":76,"function":"getChild","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["ZEW-2019"]},{"file":"\/var\/www\/virtual\/cloud\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":967,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->","args":["files\/christoph\/ZEW-2019"]},{"file":"\/var\/www\/virtual\/cloud\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":1666,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->","args":["files\/christoph\/ZEW-2019",["{DAV:}getlastmodified","{DAV:}getetag","{DAV:}getcontenttype","{DAV:}resourcetype","{http:\/\/owncloud.org\/ns}fileid","{http:\/\/owncloud.org\/ns}permissions","{http:\/\/owncloud.org\/ns}size","{DAV:}getcontentlength","{http:\/\/nextcloud.org\/ns}has-preview","{http:\/\/nextcloud.org\/ns}mount-type","{http:\/\/nextcloud.org\/ns}is-encrypted","{http:\/\/open-collaboration-services.org\/ns}share-permissions","{http:\/\/owncloud.org\/ns}tags","{http:\/\/owncloud.org\/ns}favorite","{http:\/\/owncloud.org\/ns}owner-id","{http:\/\/owncloud.org\/ns}owner-display-name","{http:\/\/owncloud.org\/ns}share-types"],1]},{"file":"\/var\/www\/virtual\/cloud\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php","line":355,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Generator"},false]},{"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https:\/\/cloud.xxxxxxxxx.com\/remote.php\/dav\/files\/christoph\/ZEW-2019","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/virtual\/cloud\/html\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpPropFind"],[{"absoluteUrl":"https:\/\/cloud.xxxxxxxxx.com\/remote.php\/dav\/files\/christoph\/ZEW-2019","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/virtual\/cloud\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:PROPFIND",[{"absoluteUrl":"https:\/\/cloud.xxxxxxxxx.com\/remote.php\/dav\/files\/christoph\/ZEW-2019","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/virtual\/cloud\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https:\/\/cloud.xxxxxxxxx.com\/remote.php\/dav\/files\/christoph\/ZEW-2019","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/virtual\/cloud\/html\/apps\/dav\/lib\/Server.php","line":301,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/virtual\/cloud\/html\/apps\/dav\/appinfo\/v2\/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/virtual\/cloud\/html\/remote.php","line":163,"args":["\/var\/www\/virtual\/cloud\/html\/apps\/dav\/appinfo\/v2\/remote.php"],"function":"require_once"}],"File":"\/var\/www\/virtual\/cloud\/html\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php","Line":225,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.14; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"15.0.2.0"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'xxxxxx',
  'passwordsalt' => 'xxxxxxx',
  'secret' => 'xxxxxx',
  'trusted_domains' => 
  array (
    0 => 'xxxxx',
    1 => 'cloud.xxxxx.com',
    2 => 'xxxxx',
  ),
  'datadirectory' => '/home/cloud/data',
  'overwrite.cli.url' => 'https://cloud.xxxxx.com',
  'dbtype' => 'mysql',
  'version' => '15.0.2.0',
  'dbname' => 'xxxxx',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxx',
  'dbpassword' => 'xxxxx',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'forcessl' => true,
  'maintenance' => false,
  'loglevel' => 0,
  'data-fingerprint' => 'xxxxxx',
  'theme' => '',
  'updater.release.channel' => 'stable',
  'updater.secret' => 'xxxxxx',
);

Hi Foomep,

are you using some kind of reverse Proxy or are they directly accessible?

Hello Pecadis

mhmm… I think is directly accessible.
My nextcloud is installed on a shared space at uberspace. That’s why I do not know if I can answer your question correctly.

Here is another formatted logfile. Maybe this helps…

Zusammenfassung
[webdav] Fatal: Sabre\DAV\Exception\ServiceUnavailable:  at <<closure>>

 0. /var/www/virtual/cloud/html/3rdparty/sabre/dav/lib/DAV/Tree.php line 76
    getChild("Audioaufnahme")
 1. /var/www/virtual/cloud/html/3rdparty/sabre/dav/lib/DAV/Server.php line 967
    getNodeForPath("files/christoph ... e")
 2. /var/www/virtual/cloud/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1666
    getPropertiesIteratorForPath("files/christoph ... e", ["{DAV:}resource ... "], 1)
 3. /var/www/virtual/cloud/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 355
    generateMultiStatus(Generator {}, false)
 4. <<closure>>
    httpPropFind(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
 5. /var/www/virtual/cloud/html/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    call_user_func_array([Sabre\DAV\CorePlugin {},"httpPropFind"], [Sabre\HTTP\Requ ... }])
 6. /var/www/virtual/cloud/html/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    emit("method:PROPFIND", [Sabre\HTTP\Requ ... }])
 7. /var/www/virtual/cloud/html/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
 8. /var/www/virtual/cloud/html/apps/dav/lib/Server.php line 301
    exec()
 9. /var/www/virtual/cloud/html/apps/dav/appinfo/v2/remote.php line 35
    exec()
10. /var/www/virtual/cloud/html/remote.php line 163
    require_once("/var/www/virtua ... p")

PROPFIND /remote.php/dav/files/christoph/XXXX/XXXX/Audioaufnahme
from 2003:f1:13c0:4800:708a:9033:f283:4f57 by christoph at 2019-01-28T20:37:43+00:00

for me it looks like Apache is not handling/passing the requests through or PHP is not Processing it.

a few Questions to narrow it down:

  • can you access your Cloud per domain name? (Browser)
  • can you access it with IP? (also in Browser ,you may need to add the IP to the Trusted Domains)
  • what is happening when you use curl https://cloud.YOURDOMAIN.com/remote.php/files/YOURUSER (Commandline, change the Points in Capital letters according to your setup)
  • Is it happening mutually? so e.g. Server 1 can reach server 2 but not the other way around?

Hello Pecadis,

thank you for your patience.

Yes i have access. And i have no other problems with my cloud. I use CalDav, CardDav and WebDav. I have access with the mac client and the iOS client too.

My cloud works on a shared space. If i use the IP-Address (IPv4) i get a website from uberspace. I added my domains correctly like this manual.

I get on my home computer the same answer like from shell on uberspace:

$ curl https://cloud.MYDOMAIN.com/remote.php/files/christoph   
 <?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
  <s:message>No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured</s:message>
</d:error>

From the shared server i get the same error (command from my home computer and the shell on uberspace):

$ curl https://cloud.SHAREDDOMAIN.de/remote.php/files/USERNAME
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
  <s:message>No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured</s:message>
</d:error>

How can I check this? With the curl command?

I contacted the uberspace support and they sayed, and they said it could be the php interpreter. I restart php and it works. I have to watch the phenomenon again a bit, but it looks good so far.
Thanks for your help