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

Desktop Sync Client - Moving files deletes and creates them #4188

Closed
carboneater opened this issue Apr 2, 2017 · 2 comments
Closed

Desktop Sync Client - Moving files deletes and creates them #4188

carboneater opened this issue Apr 2, 2017 · 2 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap client: 💻 desktop

Comments

@carboneater
Copy link

carboneater commented Apr 2, 2017

Steps to reproduce

  1. Install Nextcloud Sync Client (Does not happen in OwnCloud Sync client)
  2. Set up a file sync
  3. Create a file on your system. Sync client will replicate it.
  4. Create a folder on your system and move the file in it. (You might need big files to notice the behaviour, I noticed because of my music library re-syncing.)

Expected behaviour

The new folder gets created and files are moved across systems without changing the timestamp. (Same as using the webpage)
From the local nextcloud sync client activity log:

4/2/17 12:09:06 PM, 1337/NCTEST2/NCTEST, tsunami,  Downloaded,       2 B (Actually NOT OK)
4/2/17 12:08:07 PM, 1337/NCTEST,                  tsunami,  Moved to 1337/NCTEST2/NCTEST,          
4/2/17 12:07:19 PM, 1337/NCTEST2,                tsunami,  Uploaded,          
4/2/17 12:06:53 PM, 1337/NCTEST,                  tsunami,  Uploaded,       2 B

Actual behaviour

The new folder gets created. The sync client reports that the files are moved.
However, in the server's activity log, it reports that the files were deleted and re-created inside the new folder. Thus changing the files' timestamps and forcing a re-syncing of all moved files.
From activity logs on a remote sync client:

4/2/17 12:09:05 PM,  1337/NCTEST,                   tsunami,     Deleted,           (NOT OK)
4/2/17 12:08:06 PM,  1337/NCTEST2/NCTEST,  tsunami,     Downloaded,       2 B (NOT OK)
4/2/17 12:08:00 PM,  1337/NCTEST2,                 tsunami,     Downloaded,           (OK)
4/2/17 12:07:00 PM,  1337/NCTEST,                    tsunami,    Downloaded,       2 B (OK)

Server configuration

Operating system:
Debian Testing x86_64
Web server:
NGINX 1.10.3
Database:
mariadb Ver 15.1 Distrib 10.1.22-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
PHP version:
PHP 7.0.16-3
Nextcloud version: (see Nextcloud admin page)
11.0.1 & 11.0.2
Updated from an older Nextcloud/ownCloud or fresh install:
Owncloud 9.0 -> 12.0 -> Nextcloud 10 -> 11
(Replaced owncloud sync client by nextcloud's to get the new bug)
Where did you install Nextcloud from:
nextcloud.com tarball
Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - activity: 2.4.1
  - comments: 1.1.0
  - dav: 1.1.1
  - federatedfilesharing: 1.1.1
  - federation: 1.1.1
  - files: 1.6.1
  - files_pdfviewer: 1.0.1
  - files_sharing: 1.1.1
  - files_texteditor: 2.2
  - files_trashbin: 1.1.0
  - files_versions: 1.4.0
  - files_videoplayer: 1.0.0
  - firstrunwizard: 2.0
  - gallery: 16.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.0.0
  - nextcloud_announcements: 1.0
  - notifications: 1.0.1                                                                                                                                                                        
  - password_policy: 1.1.0                                                                                                                                                                      
  - provisioning_api: 1.1.0                                                                                                                                                                     
  - serverinfo: 1.1.1                                                                                                                                                                           
  - sharebymail: 1.0.1                                                                                                                                                                          
  - survey_client: 0.1.5                                                                                                                                                                        
  - systemtags: 1.1.3
  - templateeditor: 0.2
  - theming: 1.1.1
  - twofactor_backupcodes: 1.0.0
  - updatenotification: 1.1.1
  - user_ldap: 1.1.2
  - workflowengine: 1.1.1
Disabled:
  - admin_audit
  - encryption
  - external
  - files_accesscontrol
  - files_automatedtagging
  - files_external
  - files_retention
  - user_external
  - user_saml

The content of config/config.php:

Config report
{
    "system": {
        "updatechecker": false,
        "instanceid": "oc6n6tqq77xl",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "tsunami.ageg.ca",
            "nextcloud.ageg.ca"
        ],
        "datadirectory": "\/srv\/owncloud\/data",
        "overwrite.cli.url": "https:\/\/tsunami.ageg.ca",
        "dbhost": "localhost",
        "dbname": "nextcloud",
        "dbtype": "mysql",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "version": "11.0.2.7",
        "logtimezone": "UTC",
        "installed": true,
        "theme": "",
        "forcessl": true,
        "forceSSLforSubdomains": true,
        "openssl": {
            "config": "\/etc\/ssl\/openssl.cnf"
        },
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "127.0.0.1",
            "port": 6379
        },
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_from_address": "serveur",
        "mail_domain": "ageg.ca",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "sleipnir.ageg.ca",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "ldapIgnoreNamingRules": false,
        "loglevel": 2,
        "maintenance": false,
        "trashbin_retention_obligation": "auto",
        "htaccess.RewriteBase": "\/",
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory"
    }
}

Are you using external storage, if yes which one: Local

Are you using encryption: no (filesystem LUKS, but not nextcloud's encryption)

Are you using an external user-backend, if yes which one: LDAP with Slapd

LDAP configuration (delete this part if not used)

LDAP config
+-------------------------------+------------------------------------------------------------+
| Configuration                 | s01                                                        |
+-------------------------------+------------------------------------------------------------+
| hasMemberOfFilterSupport      |                                                            |
| hasPagedResultSupport         |                                                            |
| homeFolderNamingRule          |                                                            |
| lastJpegPhotoLookup           | 0                                                          |
| ldapAgentName                 | ***                    |
| ldapAgentPassword             | ***                                                        |
| ldapAttributesForGroupSearch  |                                                            |
| ldapAttributesForUserSearch   |                                                            |
| ldapBackupHost                |                                                            |
| ldapBackupPort                |                                                            |
| ldapBase                      | dc=ageg,dc=ca                                              |
| ldapBaseGroups                | dc=ageg,dc=ca                                              |
| ldapBaseUsers                 | dc=ageg,dc=ca                                              |
| ldapCacheTTL                  | 600                                                        |
| ldapConfigurationActive       | 1                                                          |
| ldapDynamicGroupMemberURL     |                                                            |
| ldapEmailAttribute            | mail                                                       |
| ldapExperiencedAdmin          | 0                                                          |
| ldapExpertUUIDGroupAttr       |                                                            |
| ldapExpertUUIDUserAttr        |                                                            |
| ldapExpertUsernameAttr        |                                                            |
| ldapGroupDisplayName          | cn                                                         |
| ldapGroupFilter               |                                                            |
| ldapGroupFilterGroups         |                                                            |
| ldapGroupFilterMode           | 0                                                          |
| ldapGroupFilterObjectclass    |                                                            |
| ldapGroupMemberAssocAttr      | uniqueMember                                               |
| ldapHost                      | ldapi:///                                                  |
| ldapIgnoreNamingRules         |                                                            |
| ldapLoginFilter               | (&(|(objectclass=inetOrgPerson))(|(uid=%uid)(|(cn=%uid)))) |
| ldapLoginFilterAttributes     | cn                                                         |
| ldapLoginFilterEmail          | 0                                                          |
| ldapLoginFilterMode           | 0                                                          |
| ldapLoginFilterUsername       | 1                                                          |
| ldapNestedGroups              | 0                                                          |
| ldapOverrideMainServer        |                                                            |
| ldapPagingSize                | 500                                                        |
| ldapPort                      | 389                                                        |
| ldapQuotaAttribute            |                                                            |
| ldapQuotaDefault              |                                                            |
| ldapTLS                       | 0                                                          |
| ldapUserDisplayName           | displayname                                                |
| ldapUserDisplayName2          |                                                            |
| ldapUserFilter                | (|(objectclass=inetOrgPerson))                             |
| ldapUserFilterGroups          |                                                            |
| ldapUserFilterMode            | 0                                                          |
| ldapUserFilterObjectclass     | inetOrgPerson                                              |
| ldapUuidGroupAttribute        | auto                                                       |
| ldapUuidUserAttribute         | auto                                                       |
| turnOffCertCheck              | 0                                                          |
| turnOnPasswordChange          | 0                                                          |
| useMemberOfToDetectMembership | 1                                                          |
+-------------------------------+------------------------------------------------------------+

Client configuration

Browser:
Nextcloud sync client v2.3.1
Operating system:
Debian Sid

Logs

Web server error log

Web server error log
2017/04/02 12:08:56 [error] 12602#12602: *502409 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.63.0.55, server: tsunami.ageg.ca, request: "GET /cron.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock", host: "tsunami.ageg.ca"

Nextcloud log (data/nextcloud.log)

Nextcloud log
(Limitted to daily logs. Server time uses UTC. Local (above logs) are in North-American Eastern Daylight Savings Time (GMT-4) )
{"reqId":"kavlpCHwiKW\/Q8J+noUq","remoteAddr":"24.157.180.157","app":"no app in context","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'UPDATE `oc_mounts` SET `storage_id` = ?, `mount_point` = ?, `mount_id` = ? WHERE (`user_id` = ?) AND (`root_id` = ?)' with params [\\\"1\\\", \\\"\\\\\\\/1249d780-705f-1036-960a-c1e8ddd96a57\\\\\\\/files\\\\\\\/Pour les Pr\\\\u00e9sidents\\\\\\\/\\\", null, \\\"1249d780-705f-1036-960a-c1e8ddd96a57\\\", 103745]:\\n\\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(996): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'UPDATE `oc_moun...', Array)\\n#2 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/DB\\\/Connection.php(215): Doctrine\\\\DBAL\\\\Connection->executeUpdate('UPDATE `oc_moun...', Array, Array)\\n#3 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Query\\\/QueryBuilder.php(208): OC\\\\DB\\\\Connection->executeUpdate('UPDATE `oc_moun...', Array, Array)\\n#4 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/DB\\\/QueryBuilder\\\/QueryBuilder.php(177): Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder->execute()\\n#5 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Config\\\/UserMountCache.php(182): OC\\\\DB\\\\QueryBuilder\\\\QueryBuilder->execute()\\n#6 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Config\\\/UserMountCache.php(129): OC\\\\Files\\\\Config\\\\UserMountCache->updateCachedMount(Object(OC\\\\Files\\\\Config\\\\LazyStorageMountInfo))\\n#7 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Config\\\/MountProviderCollection.php(134): OC\\\\Files\\\\Config\\\\UserMountCache->registerMounts(Object(OC\\\\User\\\\User), Array)\\n#8 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Filesystem.php(449): OC\\\\Files\\\\Config\\\\MountProviderCollection->registerMounts(Object(OC\\\\User\\\\User), Array)\\n#9 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Filesystem.php(375): OC\\\\Files\\\\Filesystem::initMountPoints('1249d780-705f-1...')\\n#10 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/util.php(235): OC\\\\Files\\\\Filesystem::init('1249d780-705f-1...', '\\\/1249d780-705f-...')\\n#11 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php(123): OC_Util::setupFS('1249d780-705f-1...')\\n#12 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Backend\\\/AbstractBasic.php(105): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->validateUserPass(*** sensitive parameters replaced ***)\\n#13 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php(251): Sabre\\\\DAV\\\\Auth\\\\Backend\\\\AbstractBasic->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#14 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php(154): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->auth(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#15 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(199): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#16 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(150): Sabre\\\\DAV\\\\Auth\\\\Plugin->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#17 [internal function]: Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#18 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#19 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(466): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#20 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#21 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(227): Sabre\\\\DAV\\\\Server->exec()\\n#22 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#23 \\\/var\\\/www\\\/nextcloud\\\/remote.php(165): require_once('\\\/var\\\/www\\\/nextcl...')\\n#24 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":116}","level":3,"time":"2017-04-02T00:47:21+00:00","method":"PROPFIND","url":"\/remote.php\/dav\/files\/1249d780-705f-1036-960a-c1e8ddd96a57\/","user":"1249d780-705f-1036-960a-c1e8ddd96a57","version":"11.0.2.7"}
{"reqId":"kavlpCHwiKW\/Q8J+noUq","remoteAddr":"24.157.180.157","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Doctrine\\\\DBAL\\\\Exception\\\\DriverException: An exception occurred while executing 'UPDATE `oc_mounts` SET `storage_id` = ?, `mount_point` = ?, `mount_id` = ? WHERE (`user_id` = ?) AND (`root_id` = ?)' with params [\\\"1\\\", \\\"\\\\\\\/1249d780-705f-1036-960a-c1e8ddd96a57\\\\\\\/files\\\\\\\/Pour les Pr\\\\u00e9sidents\\\\\\\/\\\", null, \\\"1249d780-705f-1036-960a-c1e8ddd96a57\\\", 103745]:\\n\\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(199): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(150): Sabre\\\\DAV\\\\Auth\\\\Plugin->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 [internal function]: Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(466): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#5 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(227): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\\n#8 \\\/var\\\/www\\\/nextcloud\\\/remote.php(165): require_once('\\\/var\\\/www\\\/nextcl...')\\n#9 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php\",\"Line\":162,\"User\":\"1249d780-705f-1036-960a-c1e8ddd96a57\"}","level":4,"time":"2017-04-02T00:47:21+00:00","method":"PROPFIND","url":"\/remote.php\/dav\/files\/1249d780-705f-1036-960a-c1e8ddd96a57\/","user":"1249d780-705f-1036-960a-c1e8ddd96a57","version":"11.0.2.7"}
{"reqId":"gYezYMaj1oS8CtL9w9va","remoteAddr":"24.212.31.76","app":"core","message":"Login failed: 'COOkto' (Remote IP: '24.212.31.76')","level":2,"time":"2017-04-02T03:08:13+00:00","method":"POST","url":"\/index.php\/login","user":"--","version":"11.0.2.7"}
{"reqId":"FGQV9pNr+PRqJz45nKUa","remoteAddr":"10.63.0.55","app":"user_ldap","message":"Bind failed: 49: Invalid credentials","level":2,"time":"2017-04-02T16:06:10+00:00","method":"POST","url":"\/index.php\/login","user":"--","version":"11.0.2.7"}
{"reqId":"FGQV9pNr+PRqJz45nKUa","remoteAddr":"10.63.0.55","app":"core","message":"Login failed: 'carboneater' (Remote IP: '10.63.0.55')","level":2,"time":"2017-04-02T16:06:10+00:00","method":"POST","url":"\/index.php\/login","user":"--","version":"11.0.2.7"}

Browser log

Browser log
Sync client logs already included as part of the expected/actual behaviours
@MorrisJobke
Copy link
Member

cc @rullzer @pfiff45 Maybe a good starter 😉

@LukasReschke We also talked about this, right?

@MorrisJobke MorrisJobke added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Apr 3, 2017
@MorrisJobke
Copy link
Member

Looks like #5424 and twos was backported to 12.0.1. Could you retest with this version of the server? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap client: 💻 desktop
Projects
None yet
Development

No branches or pull requests

2 participants