Hi all, i’m running Nextcloud in Docker with the nextcloud:latest
image, with a separate MariaDB mariadb:latest
database container. You can check out my deployment ansible.
$ sudo docker container exec -it -u 33 nextcloud ./occ status
- installed: true
- version: 23.0.3.2
- versionstring: 23.0.3
- edition:
- maintenance: false
- needsDbUpgrade: false
- productname: Nextcloud
- extendedSupport: false
The issue you are facing:
Problem
Since the start of the month, my users’ Nextcloud clients on Android have been failing to sync photos to their Nextcloud accounts on my server.
The Android client gives a “Conflict” error when uploading photos to the YYYY/MM/ delimited folders, which doesn’t exist and isn’t created.
Workaround
Manually creating the month folder in the right place allows the uploads to happen, but that is a pain for my users to do by hand.
Is this the first time you’ve seen this error?
Yes. The previous months’ folders were automatically created without problem, so this is a regression.
Steps to replicate it:
- Configure an Android phone to sync photos to a time-stamped directory on Nextcloud
- Take a photo
- Experience a “Conflict” error.
- Confirm in web interface that file has not been uploaded
The output of your Nextcloud log in Admin > Logging:
The relevant lines seem to be triplets like this, which suggest that Nextcloud is failing to create the folder for the new month:
[webdav] Debug: The destination node is not found
MOVE /remote.php/dav/uploads/dave/8ef98cb10c7c6636c8392522f0505460/.file
from 82.25.95.4 by dave at 2022-04-08T21:13:25+00:00
[webdav] Debug: The resource you tried to create already exists
MKCOL /remote.php/dav/uploads/dave/8ef98cb10c7c6636c8392522f0505460
from 82.25.95.4 by dave at 2022-04-08T21:13:25+00:00
[webdav] Debug: File with name /InstantUpload/Camera/2022/04 could not be located
HEAD /remote.php/dav/files/dave//InstantUpload/Camera/2022/04/IMG_20220406_151200.jpg
from 82.25.95.4 by dave at 2022-04-08T21:13:24+00:00
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'htaccess.RewriteBase' => '/',
'memcache.local' => '\\OC\\Memcache\\APCu',
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/html/custom_apps',
'url' => '/custom_apps',
'writable' => true,
),
),
'trusted_proxies' =>
array (
0 => '172.16.0.0/12',
),
'passwordsalt' => 'REDACTED',
'secret' => 'REDACTED',
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'REDACTED',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'mysql',
'version' => '23.0.3.2',
'overwrite.cli.url' => 'http://localhost',
'overwriteprotocol' => 'https',
'dbname' => 'nextcloud',
'installed' => true,
'instanceid' => 'REDACTED',
'mail_smtpmode' => 'smtp',
'mail_smtphost' => '172.18.0.1',
'mail_sendmailmode' => 'smtp',
'mail_smtpport' => 25,
'mail_from_address' => 'admin',
'mail_domain' => 'REDACTED',
'loglevel' => 0,
'maintenance' => false,
'mail_smtpsecure' => '',
'mail_smtpauth' => false,
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpname' => '',
'mail_smtppassword' => '',
'dbhost' => 'nextcloud-db',
'dbuser' => 'nextcloud',
'dbpassword' => 'REDACTED',
);
The output of your Apache/nginx/system log in /var/log/____
:
<user IP> - dave [08/Apr/2022:21:34:01 +0000] "HEAD /remote.php/dav/files/dave//InstantUpload/Camera/2022/04/IMG_20220406_151200.jpg HTTP/1.1" 404 537 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1"
<user IP> - dave [08/Apr/2022:21:34:01 +0000] "MKCOL /remote.php/dav/uploads/dave/8ef98cb10c7c6636c8392522f0505460 HTTP/1.1" 405 895 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1"
<user IP> - dave [08/Apr/2022:21:34:01 +0000] "PROPFIND /remote.php/dav/uploads/dave/8ef98cb10c7c6636c8392522f0505460 HTTP/1.1" 207 1078 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1"
<user IP> - dave [08/Apr/2022:21:34:01 +0000] "MOVE /remote.php/dav/uploads/dave/8ef98cb10c7c6636c8392522f0505460/.file HTTP/1.1" 409 782 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1"
Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.
{"reqId":"TcXHVnypO0tOI6TozCJz","level":0,"time":"2022-04-08T21:48:26+00:00","remoteAddr":"REDACTED","user":"dave","app":"webdav","method":"HEAD","url":"/remote.php/dav/files/dave//InstantUpload/Camera/2022/04/IMG_20220406_151200.jpg","message":"File with name /InstantUpload/Camera/2022/04 could not be located","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.19.1","version":"23.0.3.2","exception":{"Exception":"Sabre\\DAV\\Exception\\NotFound","Message":"File with name /InstantUpload/Camera/2022/04 could not be located","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php","line":78,"function":"getChild","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["04"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php","line":73,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->","args":["files/dave/InstantUpload/Camera/2022/04"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":76,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->","args":["files/dave/InstantUpload/Camera/2022/04/IMG_20220406_151200.jpg"]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:GET",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"},false]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpHead","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:HEAD",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":339,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":166,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php","Line":233,"CustomMessage":"--"}}
{"reqId":"Xw5b3Rc7rmvyQmueWoop","level":0,"time":"2022-04-08T21:48:26+00:00","remoteAddr":"REDACTED","user":"dave","app":"webdav","method":"MKCOL","url":"/remote.php/dav/uploads/dave/8ef98cb10c7c6636c8392522f0505460","message":"The resource you tried to create already exists","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.19.1","version":"23.0.3.2","exception":{"Exception":"Sabre\\DAV\\Exception\\MethodNotAllowed","Message":"The resource you tried to create already exists","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":560,"function":"createCollection","class":"Sabre\\DAV\\Server","type":"->","args":["uploads/dave/8ef98cb10c7c6636c8392522f0505460",{"__class__":"Sabre\\DAV\\MkCol"}]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMkcol","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:MKCOL",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":339,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":166,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","Line":1184,"CustomMessage":"--"}}
{"reqId":"ozc3BUhAKr1b9PLik0p4","level":0,"time":"2022-04-08T21:48:27+00:00","remoteAddr":"REDACTED","user":"dave","app":"webdav","method":"MOVE","url":"/remote.php/dav/uploads/dave/8ef98cb10c7c6636c8392522f0505460/.file","message":"The destination node is not found","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.19.1","version":"23.0.3.2","exception":{"Exception":"Sabre\\DAV\\Exception\\Conflict","Message":"The destination node is not found","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":590,"function":"getCopyAndMoveInfo","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"}]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:MOVE",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":339,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":166,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","Line":750,"CustomMessage":"--"}}