-
Notifications
You must be signed in to change notification settings - Fork 190
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
Upgrade from Nextcoud 19.0.4 to 20.0.0 fails during execution of occ upgrade #876
Comments
related to #820 (same but other class constant) |
FYI i have a snapshot of the 19.0.4 install from just before the uppgrade to 20.0.0 so i can do the whole ting again, with a bit of manual work. |
What do I do to complete the upgrade after a crash like this? I just ran |
I have no clue on what state the database tables for the news app will be in, or any other tables for that matter. I would recommend to restore from backup or snapshot and await a fix for this before uppgrading to 20.0. I have not enough understanding of what goes wrong to be able to investigate this myself, but as i have snapshots if anyone tells me what to do i can redo the whole thing, trigger the bug and dump additional information. |
I could start the container by removing the directory containing the Then the container started and I could resume upgrade process by using I did not tryed to re-install the news app. |
The migration worked well with this simple patch:
I'm not sure why the constant would be accessed on the EDIT: The migration worked, but the news App doesn't work anymore... |
That's odd, that class constant didn't work before. |
I had the same issue in a docker-image when upgrading nextcloud from 19.0.4.2 to 20.0.1.1 I fixed it by calling this
|
Should be fixed in the latest release |
This just happened to me while ugrading from 19.0.5 to 20.0.2 on SmartOS/Nginx/PostgreSQL/PHP-FPM. The
Manual run:
A run of |
@SMillerDev I just tested this with 15.0.6
Open browser create new admin user, uncheck the auto install option (just takes too much time)
Watch upgrade process, fails with news.
to force it to start again.
|
It wouldn't show up here though, this is only for database migrations unfortunately. I think we need to have a new 15.1 RC and test with that. |
Yea I don't know how to do that docker runs the upgrade automatically |
I tried, it didn't work I can't test it like this, nextcloud doesn't care about the new local version it pulls 15.0.6 from the appstore |
I have kind of worked around this bug. If i disable and then remove News from the 19.0.4 installation. Then uppgrade to 20. And lastly install news again and enable it, i dont get any errors and it seems to work. It seems i might have to reload the news app now and then as it gets stuck on a white screen, but if that issue has anything to do with this one i dont know. |
@SMillerDev I retired this again |
This comment has been minimized.
This comment has been minimized.
As there where no further complains I will consider this solved. |
How to use GitHub
Steps to reproduce
Expected behaviour
I expect the upgrade to finish and me having an upgraded nextcloud installation.
Actual behaviour
The uppgrade process starts and then fails after a while. From what i can see it fails during the migration of data belonging to the news app.
Restarting the upgrade once again, by running ./occ upgrade finishes the upgrade with no further errors. But leaves me wondering what state my installation is in.
Server configuration
Operating system:
Ubuntu 20.04.1 LTS
Web server:
Apache 2.4.41-4ubuntu3.1
Database:
SQLite 3.31.1-4ubuntu0.2
PHP version:
Php 7.4.3-4ubuntu2.2
Nextcloud version: (see Nextcloud admin page) **
20.0.0
Updated from an older Nextcloud/ownCloud or fresh install:
19.0.4
Where did you install Nextcloud from:
web updater
Signing status:
Signing status
No errors have been found.List of activated apps:
App list
root@HOSTNAME:/var/www/nextcloud# sudo -u www-data php occ app:list
Enabled:
Disabled:
Nextcloud configuration:
Config report
root@HOSTNAME:/var/www/nextcloud# sudo -u www-data php occ config:list system
{
"system": {
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"localhost",
"HOSTNAME",
"REMOVED SENSITIVE VALUE",
"REMOVED SENSITIVE VALUE"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"dbtype": "sqlite3",
"version": "20.0.0.9",
"installed": true,
"forcessl": true,
"appcodechecker": false,
"theme": "",
"maintenance": false,
"secret": "REMOVED SENSITIVE VALUE",
"mail_from_address": "REMOVED SENSITIVE VALUE",
"mail_smtpmode": "smtp",
"mail_domain": "REMOVED SENSITIVE VALUE",
"appstore.experimental.enabled": true,
"loglevel": 0,
"trashbin_retention_obligation": "auto",
"enabledPreviewProviders": [
"OC\Preview\Image",
"OC\Preview\MP3",
"OC\Preview\TXT",
"OC\Preview\MarkDown",
"OC\Preview\Epub",
"OC\Preview\PDF"
],
"updatechecker": false,
"overwrite.cli.url": "REMOVED SENSITIVE VALUE",
"ldapIgnoreNamingRules": false,
"ldapProviderFactory": "OCA\User_LDAP\LDAPProviderFactory",
"memcache.local": "\OC\Memcache\APCu",
"app_install_overwrite": [
"files_opds",
"files_ebookreader",
"files_reader",
"dashboard"
],
"has_rebuilt_cache": true,
"updater.release.channel": "beta",
"updater.secret": "REMOVED SENSITIVE VALUE"
}
}
Are you using external storage, if yes which one: local/smb/sftp/...
None
Are you using encryption: yes/no
No
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No
Client configuration
Browser:
Firefox 81.0.1 (64-bit)
Operating system:
Fedora 32
Logs
root@HOSTNAME:/var/www/nextcloud# sudo -u www-data php7.4 ./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
Setting log level to debug
Updating database schema
Updated database
Disabled incompatible app: calendar
Disabled incompatible app: circles
Disabled incompatible app: quicknotes
Disabled incompatible app: quota_warning
Disabled incompatible app: spreed
Updating ...
Migrate old user config
Done
2/2 [============================] 100%
Updated to 1.6.0
Updating ...
Updated to 1.1.0
Updating ...
Updated to 1.10.1
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 2.0.1
Updating <files_rightclick> ...
Updated <files_rightclick> to 0.17.0
Updating <files_videoplayer> ...
Updated <files_videoplayer> to 1.9.0
Updating ...
Updated to 2.5.0
Updating ...
Updated to 1.2.0
Updating ...
Updated to 1.4.0
Updating <provisioning_api> ...
Updated <provisioning_api> to 1.10.0
Updating ...
Updated to 0.8.0
Updating ...
Updated to 1.10.0
Updating ...
Updated to 1.2.0
Updating ...
Updated to 1.3.0
Updating <twofactor_backupcodes> ...
Updated <twofactor_backupcodes> to 1.9.0
Updating ...
Updated to 1.10.0
Updating ...
Updated to 1.4.0
Updating ...
Updated to 1.10.1
Updating <lookup_server_connector> ...
Updated <lookup_server_connector> to 1.8.0
Updating ...
Updated to 1.8.0
Updating <password_policy> ...
Updated <password_policy> to 1.10.1
Updating <user_ldap> ...
Updated <user_ldap> to 1.10.2
Updating ...
Updated to 1.15.0
Updating ...
Updated to 2.13.1
Updating <cloud_federation_api> ...
Updated <cloud_federation_api> to 1.3.0
Updating ...
Fix broken values of calendar objects
Done
0/0 [----->----------------------] 0%
Updated to 1.16.0
Updating <files_sharing> ...
Updated <files_sharing> to 1.12.0
Updating <files_trashbin> ...
Updated <files_trashbin> to 1.10.1
Updating <files_versions> ...
Updated <files_versions> to 1.13.0
Updating ...
Updated to 1.10.0
Updating ...
Updated to 2.2.0
Updating <admin_audit> ...
Updated <admin_audit> to 1.10.0
Updating ...
Updated to 1.10.0
Updating ...
Updated to 2.9.0
Updating <nextcloud_announcements> ...
Updated <nextcloud_announcements> to 1.9.0
Updating ...
Updated to 2.8.0
Updating ...
Updated to 1.10.0
Updating ...
Updated to 1.11.0
Checking for update of app accessibility in appstore
Checked for update of app "accessibility" in appstore
Checking for update of app activity in appstore
Checked for update of app "activity" in appstore
Checking for update of app admin_audit in appstore
Checked for update of app "admin_audit" in appstore
Checking for update of app apporder in appstore
Checked for update of app "apporder" in appstore
Checking for update of app audioplayer in appstore
Checked for update of app "audioplayer" in appstore
Checking for update of app bookmarks in appstore
Checked for update of app "bookmarks" in appstore
Checking for update of app bruteforcesettings in appstore
Checked for update of app "bruteforcesettings" in appstore
Checking for update of app carnet in appstore
Checked for update of app "carnet" in appstore
Checking for update of app cloud_federation_api in appstore
Checked for update of app "cloud_federation_api" in appstore
Checking for update of app comments in appstore
Checked for update of app "comments" in appstore
Checking for update of app contacts in appstore
Checked for update of app "contacts" in appstore
Checking for update of app contactsinteraction in appstore
Checked for update of app "contactsinteraction" in appstore
Checking for update of app dav in appstore
Checked for update of app "dav" in appstore
Checking for update of app deck in appstore
Checked for update of app "deck" in appstore
Checking for update of app federatedfilesharing in appstore
Checked for update of app "federatedfilesharing" in appstore
Checking for update of app federation in appstore
Checked for update of app "federation" in appstore
Checking for update of app files in appstore
Checked for update of app "files" in appstore
Checking for update of app files_markdown in appstore
Checked for update of app "files_markdown" in appstore
Checking for update of app files_mindmap in appstore
Checked for update of app "files_mindmap" in appstore
Checking for update of app files_pdfviewer in appstore
Checked for update of app "files_pdfviewer" in appstore
Checking for update of app files_rightclick in appstore
Checked for update of app "files_rightclick" in appstore
Checking for update of app files_sharing in appstore
Checked for update of app "files_sharing" in appstore
Checking for update of app files_texteditor in appstore
Checked for update of app "files_texteditor" in appstore
Checking for update of app files_trashbin in appstore
Checked for update of app "files_trashbin" in appstore
Checking for update of app files_versions in appstore
Checked for update of app "files_versions" in appstore
Checking for update of app files_videoplayer in appstore
Checked for update of app "files_videoplayer" in appstore
Checking for update of app firstrunwizard in appstore
Checked for update of app "firstrunwizard" in appstore
Checking for update of app gpxpod in appstore
Update app gpxpod from appstore
Checked for update of app "gpxpod" in appstore
Checking for update of app logreader in appstore
Checked for update of app "logreader" in appstore
Checking for update of app lookup_server_connector in appstore
Checked for update of app "lookup_server_connector" in appstore
Checking for update of app metadata in appstore
Checked for update of app "metadata" in appstore
Checking for update of app news in appstore
Update app news from appstore
An unhandled exception has been thrown:
Error: Undefined class constant 'DEFAULT_SETTINGS' in /var/www/nextcloud/apps/news/lib/Migration/MigrateConfig.php:49
Stack trace:
#0 [internal function]: OCA\News\Migration\MigrateConfig->__construct()
nextcloud/server#1 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(101): ReflectionClass->newInstanceArgs()
nextcloud/server#2 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(109): OC\AppFramework\Utility\SimpleContainer->buildClass()
nextcloud/server#3 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve()
nextcloud/server#4 /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(455): OC\AppFramework\Utility\SimpleContainer->query()
nextcloud/server#5 /var/www/nextcloud/lib/private/ServerContainer.php(140): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()
nextcloud/server#6 /var/www/nextcloud/lib/private/Repair.php(119): OC\ServerContainer->query()
nextcloud/server#7 /var/www/nextcloud/lib/private/legacy/OC_App.php(1035): OC\Repair->addStep()
nextcloud/server#8 /var/www/nextcloud/lib/private/legacy/OC_App.php(979): OC_App::executeRepairSteps()
nextcloud/server#9 /var/www/nextcloud/lib/private/Installer.php(206): OC_App::updateApp()
nextcloud/server#10 /var/www/nextcloud/lib/private/Updater.php(452): OC\Installer->updateAppstoreApp()
nextcloud/server#11 /var/www/nextcloud/lib/private/Updater.php(260): OC\Updater->upgradeAppStoreApps()
nextcloud/server#12 /var/www/nextcloud/lib/private/Updater.php(130): OC\Updater->doUpgrade()
nextcloud/server#13 /var/www/nextcloud/core/Command/Upgrade.php(255): OC\Updater->upgrade()
nextcloud/server#14 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute()
nextcloud/server#15 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1000): Symfony\Component\Console\Command\Command->run()
nextcloud/server#16 /var/www/nextcloud/3rdparty/symfony/console/Application.php(271): Symfony\Component\Console\Application->doRunCommand()
nextcloud/server#17 /var/www/nextcloud/3rdparty/symfony/console/Application.php(147): Symfony\Component\Console\Application->doRun()
nextcloud/server#18 /var/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
nextcloud/server#19 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
nextcloud/server#20 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
root@HOSTNAME:/var/www/nextcloud#
Web server error log
Web server error log
This is the whole file, i cleared it before uppgrading.
[Wed Oct 14 17:53:35.497311 2020] [mpm_prefork:notice] [pid 74790] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Wed Oct 14 17:53:35.497492 2020] [core:notice] [pid 74790] AH00094: Command line: '/usr/sbin/apache2'
[Wed Oct 14 18:02:40.070631 2020] [access_compat:error] [pid 74857] [client 192.168.8.165:58264] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Wed Oct 14 18:02:55.475188 2020] [access_compat:error] [pid 74855] [client 192.168.8.165:58278] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Wed Oct 14 19:39:38.620532 2020] [access_compat:error] [pid 74853] [client 192.168.8.165:59110] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
Nextcloud log (data/nextcloud.log)
Nextcloud log
Last 10 entries, i have skimmed trough the logfile and its huge but i cant see anything relevant in it.
{"reqId":"WUbOOH3ABuMiE61hp5bv","level":0,"time":"2020-10-14T18:05:28+00:00","remoteAddr":"192.168.1.10","user":"MY_USERNAME","app":"contacts","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0","version":"20.0.0.9"}
{"reqId":"WUbOOH3ABuMiE61hp5bv","level":0,"time":"2020-10-14T18:05:28+00:00","remoteAddr":"192.168.1.10","user":"MY_USERNAME","app":"files_sharing","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0","version":"20.0.0.9"}
{"reqId":"WUbOOH3ABuMiE61hp5bv","level":0,"time":"2020-10-14T18:05:28+00:00","remoteAddr":"192.168.1.10","user":"MY_USERNAME","app":"onlyoffice","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0","version":"20.0.0.9"}
{"reqId":"WUbOOH3ABuMiE61hp5bv","level":0,"time":"2020-10-14T18:05:28+00:00","remoteAddr":"192.168.1.10","user":"MY_USERNAME","app":"files_markdown","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0","version":"20.0.0.9"}
{"reqId":"WUbOOH3ABuMiE61hp5bv","level":0,"time":"2020-10-14T18:05:28+00:00","remoteAddr":"192.168.1.10","user":"MY_USERNAME","app":"files_mindmap","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0","version":"20.0.0.9"}
{"reqId":"WUbOOH3ABuMiE61hp5bv","level":0,"time":"2020-10-14T18:05:28+00:00","remoteAddr":"192.168.1.10","user":"MY_USERNAME","app":"files_texteditor","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0","version":"20.0.0.9"}
{"reqId":"WUbOOH3ABuMiE61hp5bv","level":0,"time":"2020-10-14T18:05:28+00:00","remoteAddr":"192.168.1.10","user":"MY_USERNAME","app":"metadata","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0","version":"20.0.0.9"}
{"reqId":"WUbOOH3ABuMiE61hp5bv","level":0,"time":"2020-10-14T18:05:28+00:00","remoteAddr":"192.168.1.10","user":"MY_USERNAME","app":"polls","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0","version":"20.0.0.9"}
{"reqId":"WUbOOH3ABuMiE61hp5bv","level":0,"time":"2020-10-14T18:05:28+00:00","remoteAddr":"192.168.1.10","user":"MY_USERNAME","app":"qownnotesapi","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0","version":"20.0.0.9"}
{"reqId":"WUbOOH3ABuMiE61hp5bv","level":0,"time":"2020-10-14T18:05:28+00:00","remoteAddr":"192.168.1.10","user":"MY_USERNAME","app":"twofactor_totp","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0","version":"20.0.0.9"}
root@livamu:/var/www/nextcloud/data#
Browser log
Browser log
I dont think there are any relevant browser logs to include. The whole failure occurs outside of the browser, and i sadly dont have any console logs left after the uppgrade procedure from the web browser. I might be able to trigger this whole thing again if it is badly needed.The text was updated successfully, but these errors were encountered: