Error during upgrade from 9.0.53 to 10.0.1

Hi all,

I’m currently facing an issue during upgrade:
# sudo -u www-data php 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
Checking whether the database schema can be updated (this can take a long time depending on the database size)
Done
27/27 [============================] 100%
Checked database schema update
Checking updates of apps
Checked database schema update for apps
Updating database schema
Updated database
Exception: files can’t be disabled.
Update failed
Maintenance mode is kept active
Reset log level
#
Then, nothing… any idea what’s causing this issue ?

Thank you in advance.

BR

Can you check your logfile (data/nextcloud.log)?
Can you rerun the command being more informative:
sudo -u www-data php occ -vvvv upgrade

Thanks !

Here the content of nextcloud.log file after re-launching the upgrade command with “-vvvv” option:
{"reqId":"ppZfrh7h8x6y\/OLEKO52","remoteAddr":"","app":"cli","message":"Memcache \\OC\\Memcache\\Redis not available for local cache","level":1,"time":"2016-10-30T13:10:26+00:00","method":"--","url":"--","user":"--"} {"reqId":"ppZfrh7h8x6y\/OLEKO52","remoteAddr":"","app":"cli","message":"Memcache \\OC\\Memcache\\Redis not available for distributed cache","level":1,"time":"2016-10-30T13:10:26+00:00","method":"--","url":"--","user":"--"} {"reqId":"ppZfrh7h8x6y\/OLEKO52","remoteAddr":"","app":"core","message":"starting upgrade from 9.0.53.0 to 9.1.1.5","level":0,"time":"2016-10-30T13:10:29+00:00","method":"--","url":"--","user":"--"} {"reqId":"D614z\/oQWHo9NXQ8uggi","remoteAddr":"","app":"cron","message":"Update required, skipping cron","level":0,"time":"2016-10-30T13:15:05+00:00","method":"--","url":"--","user":"--"} {"reqId":"ppZfrh7h8x6y\/OLEKO52","remoteAddr":"","app":"core","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"files can't be disabled.\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/app.php(423): OC\\\\App\\\\AppManager->disableApp('files')\\n#1 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/lib\\\/private\\\/Updater.php(433): OC_App::disable('files')\\n#2 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/lib\\\/private\\\/Updater.php(277): OC\\\\Updater->checkAppsRequirements()\\n#3 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/lib\\\/private\\\/Updater.php(151): OC\\\\Updater->doUpgrade('9.1.1.5', '9.0.53.0')\\n#4 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/core\\\/Command\\\/Upgrade.php(292): OC\\\\Updater->upgrade()\\n#5 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/3rdparty\\\/symfony\\\/console\\\/Command\\\/Command.php(259): OC\\\\Core\\\\Command\\\\Upgrade->execute(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#6 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/3rdparty\\\/symfony\\\/console\\\/Application.php(844): Symfony\\\\Component\\\\Console\\\\Command\\\\Command->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#7 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/3rdparty\\\/symfony\\\/console\\\/Application.php(192): Symfony\\\\Component\\\\Console\\\\Application->doRunCommand(Object(OC\\\\Core\\\\Command\\\\Upgrade), Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#8 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/3rdparty\\\/symfony\\\/console\\\/Application.php(123): Symfony\\\\Component\\\\Console\\\\Application->doRun(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#9 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/lib\\\/private\\\/Console\\\/Application.php(146): Symfony\\\\Component\\\\Console\\\\Application->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#10 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/console.php(90): OC\\\\Console\\\\Application->run()\\n#11 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/occ(11): require_once('\\\/var\\\/www\\\/html\\\/s...')\\n#12 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/lib\\\/private\\\/App\\\/AppManager.php\",\"Line\":258}","level":3,"time":"2016-10-30T13:16:56+00:00","method":"--","url":"--","user":"--"}

Can you comment all memcaches in your config/config.php. At least this hasn’t be configured properly Memcache \OC\Memcache\Redis not available for local cache

Not sure if the other errors are a follow up or perhaps completely unrelated.

Okay, I remove lines related to memcache in my config.php file but still problem.

# sudo -u www-data php occ -vvv 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
2016-10-30T16:20:38+00:00 Set log level to debug
2016-10-30T16:20:38+00:00 Repair step: Repair MySQL database engine
2016-10-30T16:20:38+00:00 Repair step: Repair MySQL collation
2016-10-30T16:20:38+00:00 Repair step: Repair SQLite autoincrement
2016-10-30T16:20:38+00:00 Repair step: Repair duplicate entries in oc_lucene_status
2016-10-30T16:20:38+00:00 Repair info: removing duplicate entries from lucene_status
2016-10-30T16:20:38+00:00 Checking whether the database schema can be updated (this can take a long time depending on the database size)
2016-10-30T16:20:38+00:00  Checking table oc_appconfig
2016-10-30T16:20:46+00:00  Checking table oc_storages
2016-10-30T16:20:52+00:00  Checking table oc_mounts
2016-10-30T16:21:02+00:00  Checking table oc_mimetypes
2016-10-30T16:21:03+00:00  Checking table oc_filecache
2016-10-30T16:24:13+00:00  Checking table oc_group_user
2016-10-30T16:24:18+00:00  Checking table oc_group_admin
2016-10-30T16:24:23+00:00  Checking table oc_groups
2016-10-30T16:24:29+00:00  Checking table oc_preferences
2016-10-30T16:24:33+00:00  Checking table oc_properties
2016-10-30T16:24:41+00:00  Checking table oc_share
2016-10-30T16:24:44+00:00  Checking table oc_jobs
2016-10-30T16:24:46+00:00  Checking table oc_users
2016-10-30T16:24:50+00:00  Checking table oc_authtoken
2016-10-30T16:24:52+00:00  Checking table oc_bruteforce_attempts
2016-10-30T16:24:54+00:00  Checking table oc_vcategory
2016-10-30T16:24:57+00:00  Checking table oc_vcategory_to_object
2016-10-30T16:25:00+00:00  Checking table oc_systemtag
2016-10-30T16:25:07+00:00  Checking table oc_systemtag_object_mapping
2016-10-30T16:25:14+00:00  Checking table oc_systemtag_group
2016-10-30T16:25:19+00:00  Checking table oc_privatedata
2016-10-30T16:25:24+00:00  Checking table oc_file_locks
2016-10-30T16:26:10+00:00  Checking table oc_comments
2016-10-30T16:26:17+00:00  Checking table oc_comments_read_markers
2016-10-30T16:26:19+00:00  Checking table oc_credentials
2016-10-30T16:26:22+00:00  Checking table oc_admin_sections
2016-10-30T16:26:28+00:00  Checking table oc_admin_settings
2016-10-30T16:26:34+00:00 Checked database schema update
2016-10-30T16:26:34+00:00 Checking updates of apps
2016-10-30T16:26:34+00:00 Checked database schema update for apps
2016-10-30T16:26:34+00:00 Updating database schema
2016-10-30T16:26:36+00:00 Updated database
2016-10-30T16:26:36+00:00 Exception: files can't be disabled.
2016-10-30T16:26:36+00:00 Update failed
2016-10-30T16:26:36+00:00 Maintenance mode is kept active
2016-10-30T16:26:36+00:00 Reset log level
#

and in nextcloud.log:

{"reqId":"vgafgHwfI523ylMOxWaB","remoteAddr":"","app":"core","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"files can't be disabled.\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/app.php(423): OC\\\\App\\\\AppManager-
>disableApp('files')\\n#1 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/lib\\\/private\\\/Updater.php(433): OC_App::disable('files')\\n#2 \\\/var
\\\/www\\\/html\\\/site\\\/nextcloud\\\/lib\\\/private\\\/Updater.php(277): OC\\\\Updater->checkAppsRequirements()\\n#3 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/lib\\\/private\\\/Updater.php(151): OC\\\\Updater->doUpgrade('9.1.1.5', '9.0.53.0')\\n#4 \\\/var\\\/www\\\/html\\\/site\\\/n$xtcloud\\\/core\\\/Command\\\/Upgrade.php(292): OC\\\\Updater->upgrade()\\n#5 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/3rdparty\\\/symfony\$\/console\\\/Command\\\/Command.php(259): OC\\\\Core\\\\Command\\\\Upgrade->execute(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput)$ Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#6 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/3rdparty\\\/symfony\\\/c$nsole\\\/Application.php(844): Symfony\\\\Component\\\\Console\\\\Command\\\\Command->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\Argv$nput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#7 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/3rdparty\\\/symfon$
\\\/console\\\/Application.php(192): Symfony\\\\Component\\\\Console\\\\Application->doRunCommand(Object(OC\\\\Core\\\\Command\\\\Upgrade), Objec$
(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#8 \\\/var\\\/www\$
\/html\\\/site\\\/nextcloud\\\/3rdparty\\\/symfony\\\/console\\\/Application.php(123): Symfony\\\\Component\\\\Console\\\\Application->doRun(Obje$
t(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#9 \\\/var\\\/www$
\\/html\\\/site\\\/nextcloud\\\/lib\\\/private\\\/Console\\\/Application.php(146): Symfony\\\\Component\\\\Console\\\\Application->run(Object(Sym$
ony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#10 \\\/var\\\/www\\\/h$
ml\\\/site\\\/nextcloud\\\/console.php(90): OC\\\\Console\\\\Application->run()\\n#11 \\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/occ(11): req$
ire_once('\\\/var\\\/www\\\/html\\\/s...')\\n#12 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/site\\\/nextcloud\\\/lib\\\/private\\\/App\\\/AppM$
nager.php\",\"Line\":258}","level":3,"time":"2016-10-30T16:26:36+00:00","method":"--","url":"--","user":"--"}

Did you delete all old code? Especially from the app-folder? For the upgrade, only keep the config/ and data/-folder:

Yep, I downloaded new release, rename current nextcloud folder, unzip new release and move config sub-folder from previous version to new one.
data folder is outside of nextcloud.

In that case, you should report this to the bugtracker https://github.com/nextcloud/server/issues. All previous reports did this error with mixed code, but your upgrade method looks all right.

OKay, thank you for your time !

I’ll open a bug.