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

Sync fails randomly #3491

Closed
nodomain opened this issue Jul 23, 2015 · 7 comments
Closed

Sync fails randomly #3491

nodomain opened this issue Jul 23, 2015 · 7 comments

Comments

@nodomain
Copy link

Hi,

when syncing some files cannot be synced.

Following error occurs. How can this happen and how can this be fixed? Perhaps a hash collision?

{"reqId":"RvI6RotnifUtpAZJOOAY","remoteAddr":"2.242.145.108","app":"webdav","message":"Exception: {\"Message\":\"An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`,`mimetype`,`mtime`,`size`,`etag`,`storage_mtime`,`permissions`,`encrypted`,`parent`,`path_hash`,`path`,`name`,`storage`) SELECT ?,?,?,?,?,?,?,?,?,?,?,?,? FROM `oc_filecache` WHERE `storage` = ? AND `path_hash` = ? HAVING COUNT(*) = 0' with params [\\\"3\\\", \\\"4\\\", 1437655813, 407525, \\\"71a454fc2175f8b739a81223e8c42c0b\\\", 1437655813, 27, 1, \\\"15364\\\", \\\"65d66885085cc10d771bc8537a418fbb\\\", \\\"files\\\\\\\/xxxxx\\\\\\\/xxxz.pdf\\\", \\\" xxxz.pdf\\\", \\\"4\\\", \\\"4\\\", \\\"65d66885085cc10d771bc8537a418fbb\\\"]:\\n\\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-65d66885085cc10d771bc8537a418fbb' for key 'fs_storage_path_hash'\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(116): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/var\\\/www\\\/html\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(996): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'INSERT INTO `oc...', Array)\\n#2 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/db\\\/connection.php(151): Doctrine\\\\DBAL\\\\Connection->executeUpdate('INSERT INTO `oc...', Array, Array)\\n#3 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/db\\\/adapter.php(93): OC\\\\DB\\\\Connection->executeUpdate('INSERT INTO `*P...', Array)\\n#4 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/db\\\/connection.php(190): OC\\\\DB\\\\Adapter->insertIfNotExist('*PREFIX*filecac...', Array, Array)\\n#5 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/files\\\/cache\\\/cache.php(322): OC\\\\DB\\\\Connection->insertIfNotExist('*PREFIX*filecac...', Array, Array)\\n#6 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/files\\\/cache\\\/scanner.php(225): OC\\\\Files\\\\Cache\\\\Cache->put('files\\\/XXXXXXr F...', Array)\\n#7 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/files\\\/cache\\\/scanner.php(188): OC\\\\Files\\\\Cache\\\\Scanner->addToCache('files\\\/XXXXXXr F...', Array, -1)\\n#8 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/connector\\\/sabre\\\/file.php(208): OC\\\\Files\\\\Cache\\\\Scanner->scanFile('files\\\/XXXXXXr F...')\\n#9 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/connector\\\/sabre\\\/directory.php(113): OC\\\\Connector\\\\Sabre\\\\File->put(Resource id #33)\\n#10 \\\/var\\\/www\\\/html\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1053): OC\\\\Connector\\\\Sabre\\\\Directory->createFile('6. XXXXXX...', Resource id #33)\\n#11 \\\/var\\\/www\\\/html\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(513): Sabre\\\\DAV\\\\Server->createFile('XXXXXX...', Resource id #33, NULL)\\n#12 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#13 \\\/var\\\/www\\\/html\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#14 \\\/var\\\/www\\\/html\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(469): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#15 \\\/var\\\/www\\\/html\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#16 \\\/var\\\/www\\\/html\\\/apps\\\/files\\\/appinfo\\\/remote.php(83): Sabre\\\\DAV\\\\Server->exec()\\n#17 \\\/var\\\/www\\\/html\\\/remote.php(132): require_once('\\\/var\\\/www\\\/html\\\/a...')\\n#18 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":66}","level":4,"time":"2015-07-23T14:50:13+02:00"}

Newest client and server, Windows 7.
PHP Version 5.6.9-0+deb8u1, Debian 8.1, Apache 2.4.10.

@guruz
Copy link
Contributor

guruz commented Jul 24, 2015

Could you please also post this on the server issue tracker and link to the issue here?
https://github.com/owncloud/core

What error message do you see in the client?

You can also start the client with --logwindow

@nodomain
Copy link
Author

The client fails with "Operation canceled" or something similar. I already copied the error message in the JSON excerpt, it states that the INSERT into the Cache table fails because of duplicated values.
Integrity constraint violation: 1062 Duplicate entry ....

@guruz
Copy link
Contributor

guruz commented Jul 24, 2015

And you don't see any "Connection Closed" or "Connection Timeout" error in the client?

@nodomain
Copy link
Author

As far as I remember, no. I am going to verify that though.

Am 24.07.2015 um 10:49 schrieb Markus Goetz notifications@github.com:

And you don't see any "Connection Closed" or "Connection Timeout" error in the client?


Reply to this email directly or view it on GitHub.

@guruz
Copy link
Contributor

guruz commented Jul 29, 2015

^^ @PVince81 @icewind1991

@PVince81
Copy link
Contributor

@nodomain if you're using encryption and ownCloud server 8.1.0, then it is likely to be owncloud/core#17594

@guruz
Copy link
Contributor

guruz commented Jul 30, 2015

let's continue in owncloud/core#17851

@guruz guruz closed this as completed Jul 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants