Forcing me to upgrade

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

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.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

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 :heart:

Nextcloud version (eg, 20.0.5): 28.0.0
Operating system and version (eg, Ubuntu 20.04): 22.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.52
PHP version (eg, 7.4): 8.2

The issue you are facing:
Forced upgrade to NC 28. Now several key apps I use is not supported yet.
But most critical is the forced upgrade.

I entered my instance through a browser, and was meet by the “several apps needs to be upgraded” and the button, and I could not ignore this one.
As I uses snapshotting I just gave it a try using occ upgrade. Alas it ended up in an internal server error.

I then reverted to the snapshot of the same morning, so I was now again at the “forced” upgrade screen. This time I ran my full update and upgrade script, and it patched my NC to version 28.0.0. No error 500 this time, but many of my most used apps did not yet have a supported version. So I reverted to the snapshot of yesterday (still forcing my to “upgrade”). I reverted to a snapshot one day peior to that: Same enforcement. In order to prevent loosing any data and for the sake of the unconvenience of my users if I had to revert to older snapshots yet again and then had to restore “newer” files and passwords etc, I decided to run my script to update/upgrade to NC 28. It does work, but I am mostly concerned with the forced upgrading.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

Is this relevant?

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

Not really relevant for this error.

The output of your Apache/nginx/system log in /var/log/____:

Not really relevant.

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

Not really relevant.

Sorry, maybe it’s to early in the morning for me, but how have you been forced to upgrade your Nextcloud instance?

Did it just update on its own, or do you have some sort of auto-upgrade script running?

As you’re not telling exactly how you installed your Nextcloud on your system (manually, snap, package manager) we can only assume that your using some kind of package manager/snap packages where you didn’t pay attention that a new Nextcloud version will be installed.

Perhaps you could clear things up a little and tell us more about how you installed Nextcloud on your machine :slight_smile:

I do not know how and what brought the instance into needing upgrade. I was on 27.1.4.1.

I am not auto-updating but I always waits until my most needed apps are supported. This time when I loggedin to the portal, instead of showing me the content of dashboard, it showed me this window (damn that I did not screenshot that), that several apps needed to be upgraded and I could do that by clicking the button on screen, or run the OCC command upgrade.
As the CLI fan that I am, I choose the OCC path. Everything went smooth on screen, but NC returned an internal server error and the version of NC was now suddently bumped up to 27.1.4.11 instead of 27.1.4.1 as I would expect it to. This is when I reverted to my snapshot of this morning, and tried to simply just skip this upgrade step. However no matter what I did, I could not bypass this “Several apps needs to be upgraded” screen.

I have installed everything manually in a Linux Container. I am using PostGres as DB.

This instance has been running for years. I know my NC inside and out, and I have restored it, repaired it and brought it back from total breakdown several times. I am creating this because I frankly has no idea - as I have never seen this behaviour before - how NC is “prevented” from functioning normally if not upgrading.

Ok, really strange because I’ve never seen any automated update of Nextcloud before… There’s always some user action needed.

Does anybody else have admin rights in your instance who might have triggered the update?

NC did not auto update.

NC presented me - as a welcome screen on the portal - to a message I could not just bypass by going to an app or files etc (it keapt sending me back to this one), that several needed to be upgraded. There was a button to allow me to do it on screen, or it told me that I could also use the OCC command: upgrade

Without doing ANY of those, I ran occ status

  • installed: true
  • version: 27.1.4.1 (expected)
  • versionstring: 27.1.4
  • edition:
  • maintenance: false
  • needsDbUpgrade: true (this stood out)
  • productname: Nextcloud
  • extendedSupport: false

As I do snapshotting I thougth that I was safe by then just do as it said, so I ran
occ upgrade

It upgraded a lot of apps, and I noticed no NC updating (it did not start a server update). All went smooth according to the OCC output.
I then refreshed browser window, and a HTTP error 500 was thrown in my face.

I then ran occ status:

  • installed: true
  • version: 27.1.4.11 (wth?!)
  • versionstring: 27.1.4
  • edition:
  • maintenance: false
  • needsDbUpgrade: false (This now was back to expected)
  • productname: Nextcloud
  • extendedSupport: false

Still because I do snapshotting, I reverted to this mornings snapshot, and was yet again meet by that browser window. Instead of running the OCC upgrade, I instead executed my own upgrade script, which updated NC to:

  • installed: true
  • version: 28.0.0.11
  • versionstring: 28.0.0
  • edition:
  • maintenance: false
  • needsDbUpgrade: false
  • productname: Nextcloud
  • extendedSupport: false

Yes it now runs and works, but I rather would have waited with the update. I guess there might have been something else I could have done to upgrade DB wihtout bricking my system, but it does concern me how this can happen? I guess that the background cronjobs do verifications, version checks and apps stuff, so it might have done some re-indexing or something else.

What concerns me is that the OCC upgrade is meant to be run only after updating to a new version. As I only updates to new versions manually, this is what worries me a little.

Hmm, looks like something or someone has executed the updater.phar.

Either a script running automatically? Or someone was runing it from the webui or from the command line…

1 Like

That can have happened only if I was drunk and at least one week ago. I am the only one with admin rights. Truth be told, then the admin user is the only one, and no one but me have access to those creds. Cannot login in the user interface unless I adds the user to the noMfa group through OCC first. The only other way is through OCC. However I cannot completely deny I have not run the update script during the week. However if I had, the version outputtet by the occ status was either wrong, or it did not have any updates when I ran the script.

I mean, in theory it could of course also have been caused by a buggy app or a bug in Nextcloud itself, but I just don’t think that’s very likely, otherwise we’d probably already be seeing posts from other users with the same issue…

Isnt rather this the problem?

This state would have been fine, wouldnt it?

Please explain that to me? By actually updating I was able to move on. The issue is that if I did NOT update and followed what NC asked me to, I was NOT able to move on.

Yes, if it had worked. But I still do not think it is fine that I has to run an upgrade in the first place, if I have not initiated any update prior to this?

You ran your own upgrade script which upgraded you to 28.

I thought it looked fine after pressing the button but apparently you reverted to the old, not-working state ans thus were greeted with the same problem again…

1 Like

I am sorry but you completely lost me here.

Let me summarize because frankly it seems that you implies that building our own scripts is an issue, regardkess if they work or not, and also because they are possible culprits of issues even without executing them?

1:
I have NO cronjob executing my upgrade scripts.

2:
I runs OCC commands occasionally to update APPS, but not server.

3:
The day before this was experienced, I had no issues in the portal. In fact I was using deck and talk just fine - in a browser.

4:
Then I woke up, loggedin to the portal and was meet by the described error message.

5:
Regardless of what I have done, then reverting to a snapshot from the day that I was using it with no issues at all, should not present the issue.

6:
I even tried reverting to a snapshot PRIOR to the day where it still worked great.

Hmm, that seems indeed strange:

Mine says:

occ status
- installed: true
  - version: 27.1.4.1
  - versionstring: 27.1.4
  - edition: 
  - maintenance: false
  - needsDbUpgrade: false
  - productname: Nextcloud
  - extendedSupport: false

Maybe a previous update (from 27.1.3 to 27.1.4) didn’t finish properly? But then again, why did it work fine for a while and then suddenly promt for an update?

i still think the most likely possibility is that something has triggered the updater.phar. However, for me this doesn’t explain the .11 as an extension of the version number. But honestly, I have no idea what this extension means or according to which criteria it is generated…

Do you have an explanation for this @szaimen ?

I found it out myself, while upgrading one of my test instances:

Before the upgrade occ status shows:

  • installed: true
  • version: 27.1.4.1
  • versionstring: 27.1.4
  • edition:
  • maintenance: false
  • needsDbUpgrade: false
  • productname: Nextcloud
  • extendedSupport: false

After running the updater.phar (before executing occ upgrade) it shows:

  • installed: true
  • version: 28.0.0.11
  • versionstring: 28.0.0
  • edition:
  • maintenance: false
  • needsDbUpgrade: true
  • productname: Nextcloud
  • extendedSupport: false

…and the web ui promts for an upgrade to Nextcloud 28 (after manually turning off maintainance mode)

After running occ upgrade it shows:

  • installed: true
  • version: 28.0.0.11
  • versionstring: 28.0.0
  • edition:
  • maintenance: false
  • needsDbUpgrade: false
  • productname: Nextcloud
  • extendedSupport: false

So again, I think something or someone must have executed the updater.phar on your instance.

1 Like