Support intro
Sorry to hear you’re facing problems
help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.
The following error is reported during the update from 13.0.5 to 13.0.6
Using the same update procedure with previous releases, that normally works fine.
# occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing 'INSERT INTO oc_filecache (fileid, storage, parent, name, mimetype, mimepart, mtime, encrypted, path, path_hash, etag, storage_mtime, permissions, size, unencrypted_size, checksum) SELECT fileid, storage, parent, name, mimetype, mimepart, mtime, encrypted, path, path_hash, etag, storage_mtime, permissions, size, unencrypted_size, checksum FROM __temp__oc_filecache':
SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: oc_filecache.fileid
Update failed
Maintenance mode is kept active
Reset log level
Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can
Nextcloud version (eg, 12.0.2): 13.0.5 -> 13.0.6
Operating system and version (eg, Ubuntu 17.04): openSUSE_42.2
Apache or nginx version (eg, Apache 2.4.25): apache2 2.4.23
PHP version (eg, 7.1): 7.0.7
The issue you are facing:
Upgrade fails
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- install nextcloud 13.0.6
- occ upgrade
The update procedure is the same as all preceding updates. Those were succesfull.
The output of your Nextcloud log in Admin > Logging:
{"reqId":"84o4cpC4DpTk9erpjvc8","level":0,"time":"2018-09-08T15:32:35+02:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"starting upgrade from 13.0.5.2 to 13.0.6.1","userAgent":"--","version":"13.0.5.2"}
{"reqId":"84o4cpC4DpTk9erpjvc8","level":3,"time":"2018-09-08T15:32:39+02:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\UniqueConstraintViolationException\",\"Message\":\"An exception occurred while executing 'INSERT INTO oc_filecache (fileid, storage, parent, name, mimetype, mimepart, mtime, encrypted, path, path_hash, etag, storage_mtime, permissions, size, unencrypted_size, checksum) SELECT fileid, storage, parent, name, mimetype, mimepart, mtime, encrypted, path, path_hash, etag, storage_mtime, permissions, size, unencrypted_size, checksum FROM __temp__oc_filecache':\\n\\nSQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: oc_filecache.fileid\",\"Code\":0,\"Trace\":\"#0 \\\/srv\\\/www\\\/vhosts\\\/owncloud.server-fqdn\\\/nextcloud-13.0.6\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractSQLiteDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/srv\\\/www\\\/vhosts\\\/owncloud.server-fqdn\\\/nextcloud-13.0.6\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(964): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOSqlite\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'INSERT INTO oc_...')\\n#2 \\\/srv\\\/www\\\/vhosts\\\/owncloud.server-fqdn\\\/nextcloud-13.0.6\\\/lib\\\/private\\\/Repair\\\/SqliteAutoincrement.php(96): Doctrine\\\\DBAL\\\\Connection->query('INSERT INTO oc_...')\\n#3 \\\/srv\\\/www\\\/vhosts\\\/owncloud.server-fqdn\\\/nextcloud-13.0.6\\\/lib\\\/private\\\/Repair.php(93): OC\\\\Repair\\\\SqliteAutoincrement->run(Object(OC\\\\Repair))\\n#4 \\\/srv\\\/www\\\/vhosts\\\/owncloud.server-fqdn\\\/nextcloud-13.0.6\\\/lib\\\/private\\\/Updater.php(258): OC\\\\Repair->run()\\n#5 \\\/srv\\\/www\\\/vhosts\\\/owncloud.server-fqdn\\\/nextcloud-13.0.6\\\/lib\\\/private\\\/Updater.php(139): OC\\\\Updater->doUpgrade('13.0.6.1', '13.0.5.2')\\n#6 \\\/srv\\\/www\\\/vhosts\\\/owncloud.server-fqdn\\\/nextcloud-13.0.6\\\/core\\\/Command\\\/Upgrade.php(270): OC\\\\Updater->upgrade()\\n#7 \\\/srv\\\/www\\\/vhosts\\\/owncloud.server-fqdn\\\/nextcloud-13.0.6\\\/3rdparty\\\/symfony\\\/console\\\/Command\\\/Command.php(264): OC\\\\Core\\\\Command\\\\Upgrade->execute(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#8 \\\/srv\\\/www\\\/vhosts\\\/owncloud.server-fqdn\\\/nextcloud-13.0.6\\\/3rdparty\\\/symfony\\\/console\\\/Application.php(874): Symfony\\\\Component\\\\Console\\\\Command\\\\Command->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#9 \\\/srv\\\/www\\\/vhosts\\\/owncloud.server-fqdn\\\/nextcloud-13.0.6\\\/3rdparty\\\/symfony\\\/console\\\/Application.php(228): Symfony\\\\Component\\\\Console\\\\Application->doRunCommand(Object(OC\\\\Core\\\\Command\\\\Upgrade), Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#10 \\\/srv\\\/www\\\/vhosts\\\/owncloud.server-fqdn\\\/nextcloud-13.0.6\\\/3rdparty\\\/symfony\\\/console\\\/Application.php(130): Symfony\\\\Component\\\\Console\\\\Application->doRun(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#11 \\\/srv\\\/www\\\/vhosts\\\/owncloud.server-fqdn\\\/nextcloud-13.0.6\\\/lib\\\/private\\\/Console\\\/Application.php(173): Symfony\\\\Component\\\\Console\\\\Application->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#12 \\\/srv\\\/www\\\/vhosts\\\/owncloud.server-fqdn\\\/nextcloud-13.0.6\\\/console.php(90): OC\\\\Console\\\\Application->run()\\n#13 \\\/srv\\\/www\\\/vhosts\\\/owncloud.server-fqdn\\\/nextcloud-13.0.6\\\/occ(11): require_once('\\\/srv\\\/www\\\/vhosts...')\\n#14 {main}\",\"File\":\"\\\/srv\\\/www\\\/vhosts\\\/owncloud.server-fqdn\\\/nextcloud-13.0.6\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractSQLiteDriver.php\",\"Line\":48}","userAgent":"--","version":"13.0.5.2"}
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'datadirectory' => '/srv/owncloud',
'dbtype' => 'sqlite3',
'defaultapp' => 'bookmarks',
'version' => '13.0.5.2',
'installed' => true,
'logfile' => '/var/log/nextcloud/nextcloud.log',
'log_rotate_size' => 1048576,
'loglevel' => 0,
'theme' => '',
'trusted_domains' =>
array (
),
'maintenance' => false,
'memcache.local' => '\\OC\\Memcache\\APCu',
'forcessl' => true,
'forceSSLforSubdomains' => true,
'htaccess.RewriteBase' => '/',
'trashbin_retention_obligation' => 'auto, 30',
);
The output of your Apache/nginx/system log in /var/log/____
:
webserve is down during the upgrade