Server: Sabre\DAV\Exception\MethodNotAllowed: The resource you tried to create already exists

Created on 4 Nov 2017  路  14Comments  路  Source: nextcloud/server

As the title says there's many errors in my log file (see attached). As far as I can read the logs the Windows 10 or iOS Apps try to create a directory (Photos) that already exists.

The problem is, that I can see no way in resolving this. If I want to access the file list via browser I get a "connection lost" message. The Windows 10 or iOS apps are not connecting, too. I deleted the folder on the server and locally but without a connection there's no way to solve this.

What can I do on the command line for example? I deleted the file locks, trash bins, re-scanned all files and stuff like that with no effect.

Maybe someone has a hint.

nextcloud.zip

0. Needs triage bug dav needs info

Most helpful comment

It seems like this wasn't implemented. The message Sabre\DAV\Exception\MethodNotAllowed: The resource you tried to create already exists is still a fatal error for me (Nextcloud 13.0.2).

All 14 comments

  1. The Nextcloud developer mostly needs all information about your server and don't want to extract it from the log file. Therefore I recommend to fulfill the whole formula (Nextcloud version, version of used web server, database version, installed apps etc).

  2. When I search for "mkcol webdav 405" the first result points to this: https://github.com/owncloud/core/issues/8536. Maybe it helps you.

  3. There are some exceptions while running a database-select in your logfile. I suppose it comes from the restriction that SQLLite does not support multi-access. Maybe it would make sense to use SQL instead.

See the comment from @brunt82

I also have a lot of these messages in my logs. Perhaps, this could be fixed by logging MethodNotAllowed as Debug, not Fatal.

I also have a lot of these messages in my logs. Perhaps, this could be fixed by logging MethodNotAllowed as Debug, not Fatal.

We already implemented this and will ship it in 13.0.0

It seems like this wasn't implemented. The message Sabre\DAV\Exception\MethodNotAllowed: The resource you tried to create already exists is still a fatal error for me (Nextcloud 13.0.2).

Same here receiving the same fatal error message on Nextcloud 13.0.2 all checks pass for security and setup warnings. MariaDB version 10.0.34 PHP 7.2.5 Ubuntu 16.04 completely up to date.

Fatalwebdav2018-05-25T16:23:14+0900
Sabre\DAV\Exception\MethodNotAllowed: The resource you tried to create already exists
/usr/share/nginx/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 590: Sabre\DAV\Server->createCollection('Sync Folder/Del...', Object(Sabre\DAV\MkCol))
[internal function] Sabre\DAV\CorePlugin->httpMkcol(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/usr/share/nginx/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
/usr/share/nginx/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method MKCOL', Array)
/usr/share/nginx/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/usr/share/nginx/nextcloud/apps/dav/appinfo/v1/webdav.php - line 80: Sabre\DAV\Server->exec()
/usr/share/nginx/nextcloud/remote.php - line 164: require_once('/usr/share/ngin...')
{main}

I'm in on this one too.

Steps to reproduce

  1. I don't know

Expected behavior

No error of "Sabre\DAV\Exception\MethodNotAllowed" appears in the logs.

Actual behavior

The error's appear.

Server configuration detail

Operating system: Linux 4.4.0-127-generic #153-Ubuntu SMP Sat May 19 10:58:46 UTC 2018 x86_64

Webserver: Apache/2.4.18 (cgi-fcgi)

Database: mysql 10.0.34 (_actually MariaDB_)

PHP version: 7.0.30-0ubuntu0.16.04.1
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, session, standard, cgi-fcgi, mysqlnd, PDO, xml, apcu, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, imap, intl, json, ldap, exif, mcrypt, mysqli, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, redis, shmop, SimpleXML, soap, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 13.0.2 - 13.0.2.1

Updated from an older Nextcloud/ownCloud or fresh install: Updated

Where did you install Nextcloud from: directly from the NextCloud site for Ubuntu instructions

Signing status

Array

List of activated apps

Enabled:
 - activity: 2.6.1
 - admin_notifications: 1.0.1
 - announcementcenter: 3.2.1
 - apporder: 0.4.1
 - audioplayer: 2.3.0
 - bookmarks: 0.11.0
 - bruteforcesettings: 1.0.3
 - calendar: 1.6.1
 - checksum: 0.4.0
 - circles: 0.13.6
 - comments: 1.3.0
 - contacts: 2.1.3
 - dashboard: 4.0.6
 - dav: 1.4.6
 - deck: 0.3.1
 - drawio: 0.8.9
 - federatedfilesharing: 1.3.1
 - federation: 1.3.0
 - files: 1.8.0
 - files_downloadactivity: 1.2.0
 - files_pdfviewer: 1.2.1
 - files_retention: 1.2.0
 - files_sharing: 1.5.0
 - files_texteditor: 2.5.1
 - files_trashbin: 1.3.0
 - files_versions: 1.6.0
 - files_videoplayer: 1.2.0
 - firstrunwizard: 2.2.1
 - flowupload: 0.0.7
 - gallery: 18.0.0
 - gpxedit: 0.0.8
 - gpxmotion: 0.0.6
 - gpxpod: 2.2.2
 - groupfolders: 1.2.0
 - issuetemplate: 0.3.0
 - logreader: 2.0.0
 - lookup_server_connector: 1.1.0
 - metadata: 0.6.0
 - news: 12.0.1
 - nextcloud_announcements: 1.2.0
 - notes: 2.3.2
 - notifications: 2.1.2
 - oauth2: 1.1.0
 - ocr: 3.3.6
 - ocsms: 1.12.7
 - password_policy: 1.3.0
 - phonetrack: 0.2.7
 - polls: 0.8.1
 - provisioning_api: 1.3.0
 - quota_warning: 1.2.0
 - radio: 0.6.1
 - rainloop: 5.1.0
 - ransomware_protection: 1.1.0
 - richdocuments: 2.0.8
 - serverinfo: 1.3.0
 - sharebymail: 1.3.0
 - socialsharing_diaspora: 1.0.2
 - socialsharing_email: 1.0.3
 - socialsharing_facebook: 1.0.2
 - socialsharing_googleplus: 1.0.2
 - socialsharing_twitter: 1.0.2
 - spreed: 3.2.1
 - survey_client: 1.1.0
 - systemtags: 1.3.0
 - tasks: 0.9.6
 - telephoneprovider: 1.0.1
 - theming: 1.4.5
 - twofactor_backupcodes: 1.2.3
 - updatenotification: 1.3.0
 - weather: 1.5.1
 - workflowengine: 1.3.0
Disabled:
 - admin_audit
 - encryption
 - files_external
 - files_reader
 - orcid
 - user_external
 - user_ldap
 - user_saml
 - zenodo

Configuration (config/config.php)

{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "cloud.myexample.com"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "13.0.2.1",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_smtpauthtype": "LOGIN",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "587",
    "mail_smtpauth": 1,
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "maintenance": false,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "theme": "",
    "updater.secret": "***REMOVED SENSITIVE VALUE***",
    "loglevel": 0,
    "default_language": "en",
    "enable_previews": true,
    "preview_max_x": 2048,
    "preview_max_y": 2048,
    "preview_max_scale_factor": 10,
    "preview_max_filesize_image": 50,
    "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
    "preview_office_cl_parameters": " --headless --nologo --nofirststartwizard --invisible --norestore --convert-to pdf --outdir ",
    "enabledPreviewProviders": [
        "OC\\Preview\\PNG",
        "OC\\Preview\\JPEG",
        "OC\\Preview\\GIF",
        "OC\\Preview\\BMP",
        "OC\\Preview\\XBitmap",
        "OC\\Preview\\SVG",
        "OC\\Preview\\TIFF",
        "OC\\Preview\\MP3",
        "OC\\Preview\\TXT",
        "OC\\Preview\\Font",
        "OC\\Preview\\MarkDown",
        "OC\\Preview\\Movie",
        "OC\\Preview\\MSOffice2003",
        "OC\\Preview\\MSOffice2007",
        "OC\\Preview\\MSOfficeDoc",
        "OC\\Preview\\OpenDocument",
        "OC\\Preview\\PDF",
        "OC\\Preview\\Postscript",
        "OC\\Preview\\StarOffice"
    ],
    "tempdirectory": "\/home\/adminuser\/domains\/cloud.myexample.com\/tmp\/nextcloudtemp",
    "overwrite.cli.url": "https:\/\/cloud.myexample.com"
}

Client configuration

Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Operating system: Ubuntu 18.04 workstation

Logs

Nextcloud log

Here are my log top info's on this topic:
_caveat: ordered lists start with 0 in the NextCloud log display_

Fatal | webdav | Sabre\DAV\Exception\MethodNotAllowed:聽The resource you tried to create already exists

  1. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 590: Sabre\DAV\Server->createCollection('Mapping Data/gp...', Object(Sabre\DAV\MkCol))
  2. [internal function] Sabre\DAV\CorePlugin->httpMkcol(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
  3. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
  4. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method MKCOL', Array)
  5. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
  6. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/apps/dav/appinfo/v1/webdav.php - line 80: Sabre\DAV\Server->exec()
  7. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/remote.php - line 164: require_once('/home/adminuser/d...'){main}

Fatal | webdav | Sabre\DAV\Exception\MethodNotAllowed:聽The resource you tried to create already exists

  1. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 590: Sabre\DAV\Server->createCollection('Mapping Data/gp...', Object(Sabre\DAV\MkCol))
  2. [internal function] Sabre\DAV\CorePlugin->httpMkcol(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
  3. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
  4. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method MKCOL', Array)
  5. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
  6. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/apps/dav/appinfo/v1/webdav.php - line 80: Sabre\DAV\Server->exec()
  7. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/remote.php - line 164: require_once('/home/adminuser/d...')
  8. {main}

Fatal | webdav | Sabre\DAV\Exception\MethodNotAllowed:聽The resource you tried to create already exists

  1. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 590: Sabre\DAV\Server->createCollection('Mapping Data/gp...', Object(Sabre\DAV\MkCol))
  2. [internal function] Sabre\DAV\CorePlugin->httpMkcol(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
  3. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
  4. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method MKCOL', Array)
  5. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
  6. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/apps/dav/appinfo/v1/webdav.php - line 80: Sabre\DAV\Server->exec()
  7. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/remote.php - line 164: require_once('/home/adminuser/d...')
  8. {main}

Fatal | webdav | Sabre\DAV\Exception\MethodNotAllowed:聽The resource you tried to create already exists

  1. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 590: Sabre\DAV\Server->createCollection('Mapping Data/gp...', Object(Sabre\DAV\MkCol))
  2. [internal function] Sabre\DAV\CorePlugin->httpMkcol(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
  3. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
  4. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method MKCOL', Array)
  5. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
  6. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/apps/dav/appinfo/v1/webdav.php - line 80: Sabre\DAV\Server->exec()
  7. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/remote.php - line 164: require_once('/home/adminuser/d...')
  8. {main}

@MorrisJobke could you please comment on the last 3 comments? I stumbled upon this a while back and was happy that this was implemented in nc 13 according to your post from Jan https://github.com/nextcloud/server/issues/7067#issuecomment-356003005.

Unfortunately it seems that people still seem to run into this problem with nc 13.0.2. I'm still on 12.0.9 and there it hasn't been fixed for sure, but why do people still see this with 13.0.2?

@MorrisJobke Thanks for reopening this issue. Any chance you could also remove the needs info label, since there's no more information needed (at least not from the user community). It should be rather obvious what happened here:

Either the fix was not shipped or the fix is broken.

cc @icewind1991 @rullzer

Latest error messages today and I upgraded to 13.0.4 recently:

=============================================
_(Might be during Rainloop access?)_
Debug
Sabre\DAV\Exception\NotAuthenticated:聽No public access to this resource., 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, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured

  1. [internal function] Sabre\DAV\Auth\Plugin->beforeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))

  2. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)

  3. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 466: Sabre\Event\EventEmitter->emit('beforeMethod', Array)

  4. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))

  5. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/apps/dav/lib/Server.php - line 287: Sabre\DAV\Server->exec()

  6. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/apps/dav/appinfo/v2/remote.php - line 35: OCA\DAV\Server->exec()

  7. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/remote.php - line 164: require_once('/home/adminuser/d...'){main}

=============================================
_(Might be during Rainloop access?)_
Debug
Sabre\DAV\Exception\NotAuthenticated:聽No public access to this resource., 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, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured

  1. [internal function] Sabre\DAV\Auth\Plugin->beforeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))

  2. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)

  3. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 466: Sabre\Event\EventEmitter->emit('beforeMethod', Array)

  4. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))

  5. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/apps/dav/lib/Server.php - line 287: Sabre\DAV\Server->exec()

  6. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/apps/dav/appinfo/v2/remote.php - line 35: OCA\DAV\Server->exec()

  7. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/remote.php - line 164: require_once('/home/adminuser/d...'){main}

=============================================
_(Multiples of this at the same time, maube when user logs in and sees files screen.)_
Fatal
Sabre\DAV\Exception\MethodNotAllowed:聽The resource you tried to create already exists

  1. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 594: Sabre\DAV\Server->createCollection('Mapping Data/gp...', Object(Sabre\DAV\MkCol))

  2. [internal function] Sabre\DAV\CorePlugin->httpMkcol(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))

  3. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)

  4. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method MKCOL', Array)

  5. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))

  6. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/apps/dav/appinfo/v1/webdav.php - line 80: Sabre\DAV\Server->exec()

  7. /home/adminuser/domains/cloud.myexample.com/public_html/nextcloud/remote.php - line 164: require_once('/home/adminuser/d...'){main}

=============================================

I dont see any solutine.
I have the same problem:
Sabre\DAV\Exception\MethodNotAllowed: The resource you tried to create already exists

/home1/hostitte/public_html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 594: Sabre\DAV\Server->createCollection('files/stevenc88...', Object(Sabre\DAV\MkCol)) [internal function] Sabre\DAV\CorePlugin->httpMkcol(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response)) /home1/hostitte/public_html/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array) /home1/hostitte/public_html/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method MKCOL', Array) /home1/hostitte/public_html/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response)) /home1/hostitte/public_html/apps/dav/lib/Server.php - line 287: Sabre\DAV\Server->exec() /home1/hostitte/public_html/apps/dav/appinfo/v2/remote.php - line 35: OCA\DAV\Server->exec() /home1/hostitte/public_html/remote.php - line 164: require_once('/home1/hostitte...') {main}

Do you still see this issue?

I don't see the **Sabre\DAV\Exception\** genre of errors anymore.

Was this page helpful?
0 / 5 - 0 ratings