Update Fails: 19.0.6 -> 20.0.3 (Verifying Integrity)

Hi everyone,

I’ve been having problems updating from 19.0.6(.2 I believe) to 20.0.3.

The updater runs fine until it verifies integrity, then fails with:

Parsing response failed.
v Show detailed response
[nothing]

Observations:

  • No relevant log entries (neither in data/updater.log nor in the Settings -> Administration -> Logging)

Tested:

  • Clean update, removing data/updater-... entirely
  • Restoring previous 19.0.6 installation

Anyone else having similar issues?

PS: Not sure if this is the right category to post this into as it sounds to be reserved for first-time installations only (please let me know to move it).

PPS: Some preliminary debugging indicates that something’s going astray in this call: updater/index.php at 61a84cc34b45927d0927b027f5aa7e8e10a34a67 · nextcloud/updater · GitHub
The log entry [info] storage location: [...] from this call: $this->getDownloadedFilePath() still prints, but the openssl_verify call doesn’t return any more.

PPPS*: This is probably addressed in this issue: Update to 20.0.2 fails at integrity check · Issue #316 · nextcloud/updater · GitHub


Potential Solutions

  • Ensuring the Nextcloud’s PHP configuration has access to >=512MB of memory
2 Likes

Yes, I am having the same issue.
I clean up updater-xxxx folder in data directory and retry again and still the same.
Can’t figure out what is causing it.

@tinkyx and anyone having the same issue: The problem is most likely the instance running out of memory. Raising PHP’s memory_limit to >=512M solved the issue in our case.

Let me know if you experience the same so I can mark this as the solution.

4 Likes

Hi Bossi

No, it doesn’t work. Still the same. I have set memory limit to 512M and checked in nextcloud to make sure it is using 512M and it is. Then try to do update it still happens with that error. I was updating all the updates so far without any issue. I even updated to 19.0.6 and no issue, just after that there is an update for 20.0.3 so I try to update that too and the error started since then.

BTW, I have 2G of memory on my server instance.

Might be worth doing some debugging. Have a look at my original post, I’m linking to the source that defines the steps performed by the updater. Try setting some $this->silentLog("...") statements and monitor data/updater.log to see where the process fails.

Hi Bossi

I have reset my php config files and tried again. Yes, it works.
That was memory limitation issue.

Why would it happens while there is no issue like that before?

Thanks
TIN

1 Like

Hi @tinkyx,

Good to hear your case traces back to the same cause.

As to what you’re wondering, well I’d assume some parameters have changed. I believe the routine calculating the downloaded binary’s integrity runs out of memory (which looks like using openssl libraries); so, at a random guess, something in the routine or the libraries has changed that is affecting resource management, or maybe an increase of the input (file-size) has tripped a certain limit that now violates that certain <512MB memory threshold - it seems to be either one of those two.

Please feel free to mark my first reply as a solution; hopefully it’ll help others as well!

Hi Bossi,

I have no idea how to mark as solution.

Hi @tinkyx, I believe you just tick the box below the post that says “Solution” :slight_smile: I’ll do it for you.

I faced the same problem while trying to update through the web interface… My only solution was the manual upgrade approach through the shell… Only then did it work! Just in case this helps anyone…

setting php memory limit to 512M works for me.

2 Likes

Hi @le0, to add some additional context, since setting the memory limit to the required 512M seems to be the predominant solution - are you sure you

  • updated the memory_limit in the correct php.config (as multiple can be defined on a system that might compliment and override each other)?
  • Restarted your webserver as reqiuired for the changes to take effect?
  • verified the change of your settings in the Nextcloud Settings > Administration > Overview > Security & setup warnings section?

Hi @bossi and thank you for your remark!

No, I can’t say I have, since I only found this thread after having upgraded the way I describe…

I totally agree with you that updating the memory_limit is the predominant solution, yet I only wished to contribute here what worked for me after succesive failures with the web interface updater being stuck in ‘step 5, verifying integrity…’.

It intrigued me that there was no such problem with manually updating via the shell and I thought that I should add that to the discussion here…I forgot to mention that my setup runs on an old RPi B+

Thank you all for your support and apologies if anyone mistook my answer as misleading!

Hi @le0,

Thanks for the additional detail - it helps to put things into perspective and distill things down to be as clear as possible - not that you had been confusing in any way in your previous post.

The Raspberry Pi 1 B+ has 512MiB by the looks of it, so one factor that allowed for success in your case. The crux in your case is (please correct me anyone if I’m off here) that PHP is parameterized in what configuration it runs against - e.g. one system can have multiple configs and the runtime environment picks the one to use. I.e. the web updater would usually run PHP against the config the web server selects (e.g. the PHP installation usually has a config dedicated to Apache’s use), while Nextcloud’s occ command probably (and I’m not 100% certain here) runs against its own config, which might already be set to >=512M. Again - this is a guess and I might be wrong, but if that’s how the Nextcloud updater is configured that could explain why you had success updating through the CLI and failed using the web interface.

Hi

Just for the sake of others who need to find correct php.ini file, they can simply set memory limit in Virtualmin.

Just follow below Menu structure.
Virtualmin/Services/PHP-FPM_Configuration/Resource_Limits/Maximum_Memory_Allocation

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.