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

upgrade page shown although upgrade already completed #10362

Closed
himpierre opened this issue Jul 24, 2018 · 24 comments
Closed

upgrade page shown although upgrade already completed #10362

himpierre opened this issue Jul 24, 2018 · 24 comments
Assignees
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: install and update

Comments

@himpierre
Copy link

himpierre commented Jul 24, 2018

Steps to reproduce

  1. execute sudo -u www-data php updater/updater.phar
  2. disable maintenance mode
  3. visit web site
  4. be greated with the upgrade page

Expected behaviour

regular login page

Actual behaviour

upgrade page is shown

Server configuration

Operating system: Ubuntu 16.04

Web server: Apache 2.4

Database: Mariadb

PHP version: 7.2

Nextcloud version: 13.0.5.2

Updated from an older Nextcloud/ownCloud or fresh install: Upgrade from 13.0.4

Where did you install Nextcloud from: tar

Signing status:

Signing status
No errors have been found.

List of activated apps:

Enabled:
  - activity: 2.6.1
  - bruteforcesettings: 1.1.0
  - calendar: 1.6.1
  - comments: 1.3.0
  - contacts: 2.1.5
  - dav: 1.4.7
  - deck: 0.4.0
  - dropit: 0.1.1
  - federatedfilesharing: 1.3.1
  - federation: 1.3.0
  - files: 1.8.0
  - files_external: 1.4.1
  - files_pdfviewer: 1.2.1
  - files_sharing: 1.5.0
  - files_texteditor: 2.5.1
  - files_trashbin: 1.3.0
  - files_versions: 1.6.0
  - files_videoplayer: 1.2.0
  - firstrunwizard: 2.2.1
  - gallery: 18.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.1.0
  - nextcloud_announcements: 1.2.0
  - notifications: 2.1.2
  - oauth2: 1.1.1
  - password_policy: 1.3.0
  - polls: 0.8.1
  - provisioning_api: 1.3.0
  - richdocuments: 2.0.10
  - serverinfo: 1.3.0
  - sharebymail: 1.3.0
  - spreed: 3.2.5
  - spreedme: 0.3.11
  - survey_client: 1.1.0
  - systemtags: 1.3.0
  - tasks: 0.9.6
  - theming: 1.4.5
  - twofactor_backupcodes: 1.2.3
  - updatenotification: 1.3.0
  - user_ldap: 1.3.1
  - workflowengine: 1.3.0
Disabled:
  - admin_audit
  - encryption
  - passman
  - twofactor_totp
  - user_external
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "trusted_domains": [
            "nextcloud.mydomain.de"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/nextcloud.mydomain.de",
        "dbtype": "mysql",
        "version": "13.0.5.2",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "mail_smtpmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "loglevel": 3,
        "log_rotate_size": 104857600,
        "maintenance": false,
        "updater.release.channel": "stable",
        "theme": "",
        "lost_password_link": "disabled"
    }
}

Nothing specific in the log. When I hit the upgrade button, the upgrade succeeds but i would expect to already being done.

@himpierre
Copy link
Author

Here the output of updater.phar

Current version is 13.0.4.

Update to Nextcloud 13.0.5 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-13.0.5.zip

Steps that will be executed:
[ ] Check for expected files
[ ] Check for write permissions
[ ] Enable maintenance mode
[ ] Create backup
[ ] Downloading
[ ] Verify integrity
[ ] Extracting
[ ] Replace entry points
[ ] Delete old files
[ ] Move new files in place
[ ] Done

Start update? [y/N] y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Enable maintenance mode
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] Y
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
Updating database schema
Updated database
Checking for update of app activity in appstore
Checked for update of app "activity" in appstore 
Checking for update of app bruteforcesettings in appstore
Checked for update of app "bruteforcesettings" in appstore 
Checking for update of app calendar in appstore
Checked for update of app "calendar" 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 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 dropit in appstore
Checked for update of app "dropit" 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_external in appstore
Checked for update of app "files_external" 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_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 gallery in appstore
Checked for update of app "gallery" 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 nextcloud_announcements in appstore
Checked for update of app "nextcloud_announcements" in appstore 
Checking for update of app notifications in appstore
Checked for update of app "notifications" in appstore 
Checking for update of app oauth2 in appstore
Checked for update of app "oauth2" in appstore 
Checking for update of app password_policy in appstore
Checked for update of app "password_policy" in appstore 
Checking for update of app polls in appstore
Checked for update of app "polls" in appstore 
Checking for update of app provisioning_api in appstore
Checked for update of app "provisioning_api" in appstore 
Checking for update of app richdocuments in appstore
Checked for update of app "richdocuments" in appstore 
Checking for update of app serverinfo in appstore
Checked for update of app "serverinfo" in appstore 
Checking for update of app sharebymail in appstore
Checked for update of app "sharebymail" in appstore 
Checking for update of app spreed in appstore
Checked for update of app "spreed" in appstore 
Checking for update of app spreedme in appstore
Checked for update of app "spreedme" in appstore 
Checking for update of app survey_client in appstore
Checked for update of app "survey_client" in appstore 
Checking for update of app systemtags in appstore
Checked for update of app "systemtags" in appstore 
Checking for update of app tasks in appstore
Checked for update of app "tasks" in appstore 
Checking for update of app theming in appstore
Checked for update of app "theming" in appstore 
Checking for update of app twofactor_backupcodes in appstore
Checked for update of app "twofactor_backupcodes" in appstore 
Checking for update of app updatenotification in appstore
Checked for update of app "updatenotification" in appstore 
Checking for update of app user_ldap in appstore
Checked for update of app "user_ldap" in appstore 
Checking for update of app workflowengine in appstore
Checked for update of app "workflowengine" in appstore 
Starting code integrity check...
Finished code integrity check
Update successful
Maintenance mode is kept active
Reset log level

Keep maintenance mode active? [y/N] N

Maintenance mode is disabled

The error happens too when I upgrade via web + occ upgrade command.

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #2898 (Upgrade Issue), #9795 (Upgrade error), #943 ("pages" files are shown as directories.), #6024 (App with multi-lingual names is shown as Array when upgrading), and #7614 (Image preview in sharing page should show the full image).

@MorrisJobke
Copy link
Member

I have seen this as well :/

Do you have the opcache enabled?

cc @rullzer @nickvergessen Ideas why this happens?

@himpierre
Copy link
Author

Do you have the opcache enabled?

Yes.

@himpierre
Copy link
Author

Uh. By the way. I had this effect upgrading from 13.0.1 to 13.0.2 and so on too. It happens on two of my 4 instances only. The main difference is ldap. Only the instances with ldap user management show this behaviour. Don't know if thats the reason or not.

@rullzer
Copy link
Member

rullzer commented Jul 24, 2018

@MorrisJobke yes I have also experinced this (but only on my production instance).
No LDAP here tough...

And no real idea why it happens.

@MorrisJobke
Copy link
Member

I thought it is related to the opcache (a few seconds of caching), but apparently it also happens after yesterdays upgrade and there it was in this mode for a longer period. My idea here was:

  • upgrade happens and updates the config.php
  • you refresh the web UI and it still has the old cached config.php
  • => it asks for update again

Sadly this also was the case after a few hours and didn't went away. :/ So it need to be something else.

@MorrisJobke
Copy link
Member

Could it be that this happens when an app is upgraded from the appstore? For me the first update run had following log message:

{"reqId":"65XTk2ypWJ7ta1A5Worz","level":1,"time":"2018-07-23T12:34:30+00:00","remoteAddr":"","user":"--","app":"updater","method":"--","url":"\/occ","message":"\\OC\\Updater::upgradeAppStoreApp: Update app \"spreed\" from appstore","userAgent":"--","version":"13.0.5.0"}

Could you check if there is also an upgrade of an app present in your first upgrade?

@himpierre
Copy link
Author

Could you check if there is also an upgrade of an app present in your first upgrade?

I can do the next time but i don't think there was.

Here the complete log of the update run: https://nopaste.fluffycloud.de/?012be90bfad34ece#8XJVeZiqs/k4+G+4FaWm3ZItyIT/BvLDQza7g6ZKevY=

@MorrisJobke
Copy link
Member

I can do the next time but i don't think there was.

Doesn't seem to be :/

But it says it says both times:

starting upgrade from 13.0.4.0 to 13.0.5.2

... so there seems to be some caching hitting in :/

@himpierre
Copy link
Author

Apache vs Nginx? Both of my apache installations work without problem. The nginx ones show that problem.

@MorrisJobke
Copy link
Member

Apache vs Nginx? Both of my apache installations work without problem. The nginx ones show that problem.

Same here - I'm on nginx as well.

@rullzer
Copy link
Member

rullzer commented Jul 24, 2018

For me Nginx as well. But I think that is a coincidence.

Since I run the updater from the cli. And then again an occ upgrade from the cli. (since I had it before). So nginx doesn't come into play here.

@himpierre
Copy link
Author

For me Nginx as well. But I think that is a coincidence.

I guess you're right. One of my supposed to be nginx installations is in fact apache.

@MorrisJobke
Copy link
Member

Just ran into this again and the config.php still had 'version' => '13.0.5.2', in it after the upgrade to 14.0.0 beta 1. :/

@MorrisJobke
Copy link
Member

{"reqId":"fU5N6KkqZii3DmyTd5vM","level":1,"time":"2018-07-26T12:42:52+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"\/occ","message":"\\OC\\Repair::step: Repair step: Add preview background cleanup job","userAgent":"--","version":"13.0.5.2"}
{"reqId":"fU5N6KkqZii3DmyTd5vM","level":1,"time":"2018-07-26T12:42:52+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"\/occ","message":"\\OC\\Repair::step: Repair step: Queue a one-time job to cleanup old backups of the updater","userAgent":"--","version":"13.0.5.2"}
{"reqId":"fU5N6KkqZii3DmyTd5vM","level":1,"time":"2018-07-26T12:42:52+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"\/occ","message":"\\OC\\Repair::step: Repair step: Repair pending cron jobs","userAgent":"--","version":"13.0.5.2"}
{"reqId":"fU5N6KkqZii3DmyTd5vM","level":1,"time":"2018-07-26T12:42:52+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"\/occ","message":"\\OC\\Repair::info: Repair info: Repaired 3 pending cron job(s).","userAgent":"--","version":"13.0.5.2"}
{"reqId":"fU5N6KkqZii3DmyTd5vM","level":1,"time":"2018-07-26T12:42:52+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"\/occ","message":"\\OC\\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"--","version":"13.0.5.2"}
{"reqId":"fU5N6KkqZii3DmyTd5vM","level":1,"time":"2018-07-26T12:42:57+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"\/occ","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"--","version":"13.0.5.2"}
{"reqId":"fU5N6KkqZii3DmyTd5vM","level":1,"time":"2018-07-26T12:42:57+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"\/occ","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"--","version":"14.0.0.13"}
{"reqId":"fU5N6KkqZii3DmyTd5vM","level":1,"time":"2018-07-26T12:42:57+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"\/occ","message":"\\OC\\Updater::maintenanceActive: Maintenance mode is kept active","userAgent":"--","version":"14.0.0.13"}
{"reqId":"fU5N6KkqZii3DmyTd5vM","level":1,"time":"2018-07-26T12:42:57+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"\/occ","message":"\\OC\\Updater::resetLogLevel: Reset log level to Debug(0)","userAgent":"--","version":"14.0.0.13"}
{"reqId":"OAqeIJzWONABvczUQXPq","level":0,"time":"2018-07-26T12:43:12+00:00","remoteAddr":"192.168.1.1","user":"--","app":"no app in context","method":"GET","url":"\/index.php","message":"No cache entry found for \/appdata_ocaded994a20\/preview\/1016261 (storage: local::\/data\/, internalPath: appdata_ocaded994a20\/preview\/1016261)","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit\/605.1.15 (KHTML, like Gecko) Version\/11.1.2 Safari\/605.1.15","version":"13.0.5.2"}

@MorrisJobke
Copy link
Member

I guess I know what happened:

https://github.com/nextcloud/updater/blob/112877345faf15d74b86a42316741c2be2292aba/lib/Updater.php#L318

This one reads the cached config from the opcache and still holds the old version info. Thus causing the update page to reappear.

@MorrisJobke
Copy link
Member

Options: either clear opcache right before that or disable the maintenance mode before the updater.phar triggers occ upgrade.

@MorrisJobke MorrisJobke self-assigned this Jul 26, 2018
@nickvergessen
Copy link
Member

Why is that not using the config class? DI?

@MorrisJobke
Copy link
Member

Why is that not using the config class? DI?

Because it's not the server code ;) It's the updater.phar - goal of this to have it completely independent from the actual code it replaces ;)

@himpierre
Copy link
Author

So what is the current workaround? Not using updater.phar? Is that enough?

thanks and cheers

@himpierre
Copy link
Author

@MorrisJobke may I ask what the suggested workoaround is for the time being?

@MorrisJobke
Copy link
Member

@MorrisJobke may I ask what the suggested workoaround is for the time being?

run updater.phar, but don't let it execute occ upgrade itself, but do it manually. Or just run occ upgrade again.

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 12, 2019
@skjnldsv
Copy link
Member

skjnldsv commented Sep 9, 2020

As there is no feedback since a while I will close this ticket. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen.

@skjnldsv skjnldsv closed this as completed Sep 9, 2020
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 bug feature: install and update
Projects
None yet
Development

No branches or pull requests

6 participants