Create backup failed when updating from 16.0.3 to 16.0.5 via Updater

Nextcloud version 16.03:
Operating system and version unknown (webhosted):
Apache or nginx version unknown (webhosted):
PHP version 7.3:

The issue you are facing:
When running the Updater for the first time it fails creating a backup with an internal server error. When trying to update at a later time the updater says that the backup has been created successfully. At first try to continue updating the system was left in an unfixable state and was unavailable. At the second try the backup could not be created as well but the update could be successfully done.

Is this the first time you’ve seen this error? N:
As described before.

Steps to replicate it:

  1. I set up a new nextcloud instance on a subdomain of my hosted webspace via web installer. It currently installs to 16.0.3
  2. Trying to update via updater tool
  3. Fail of backup create step

The output of your Nextcloud log in Admin > Logging:

Admin logging only consists of ERRORS like this:

[PHP] Error: opendir(/var/tmp/): failed to open dir: Permission denied at /mnt/***/htdocs/tempcloud/lib/private/TempManager.php#190

GET /cron.php
from *** at 2019-10-09T17:01:58+00:00

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

<?php
$CONFIG = array (
  'instanceid' => '****',
  'passwordsalt' => '****',
  'secret' => '****',
  'trusted_domains' => 
  array (
    0 => '****',
  ),
  'datadirectory' => '/mnt/***/htdocs/tempcloud/data',
  'dbtype' => 'mysql',
  'version' => '16.0.3.0',
  'overwrite.cli.url' => '****',
  'dbname' => '****',
  'dbhost' => 'r****',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '****',
  'dbpassword' => '****',
  'installed' => true,
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
  'updater.secret' => '****',
);

The output of your Apache/nginx/system log in /var/log/____:
Not available. Hosted webspace.

1 Like

So what are the permissions at
/mnt/***/htdocs/tempcloud/
? The user running the nextcloud instance needs write access there.

1 Like

When logging in into my webspace vis ssh and running ls -l it shows that the owner has rwx and is customer. However I‘m not sure if this is the user running the instance. Would guess it is though.
If the user has no write permission it hadn‘t been possible to install a new instance in the first place. Or am I wrong?

1 Like

That’s right, but you need write access to the data directory too. What is the result of
ls -l /mnt/***/htdocs/tempcloud/
? Is it owned by customer too? Has it rwx too? Is customer your login name?

1 Like

Output for data dir is as follows:
drwxr-x--- 7 4290626 customer 4096 Oct 9 18:43 data

rw is set for each item (dir and file) in dir tempcloud. Owner is also customer.
customer is not my login name. My login name is the domain name.

1 Like

Tried again with a new instance and this is the error message I get in the updater:

Parsing response failed. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body> <h1>Internal Server Error</h1> <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>Please contact the server administrator at service@webmailer.de to inform them of the time this error occurred, and the actions you performed just before this error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

And this updater.log-content:

2019-10-13T17:58:04+0200 nKvEmeNW6g [info] request to updater
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] currentStep()
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] show HTML page
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] current version: 16.0.3 build time: 2019-07-09T12:01:37+00:00 185087e9bc46c1ef08e165e1ac979827dc05d469
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] getUpdateServerResponse()
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] updaterServer: https://updates.nextcloud.com/updater_server/
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] releaseChannel: stable
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] internal version: 16.0.3.0
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] updateURL: https://updates.nextcloud.com/updater_server/?version=16x0x3x0xxxstablexx2019-07-09T12%3A01%3A37%2B00%3A00+185087e9bc46c1ef08e165e1ac979827dc05d469x7x3x9
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] getUpdateServerResponse response: Array
(
    [version] => 16.0.5.1
    [versionstring] => Nextcloud 16.0.5
    [url] => https://download.nextcloud.com/server/releases/nextcloud-16.0.5.zip
    [web] => https://docs.nextcloud.com/server/16/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=16.0.5
    [autoupdater] => 1
    [eol] => 0
    [signature] => iAsxJoaWRQ/1A0M3PuiDehji4x0Ci158wpa5IAv+oZbuWdhOqZjcZbLf/2cWWeCL
ggZX8WJpdJw8ZDKNtInVpfcbI558mu0L9axjl7Cpl9T8lvF9uXOa26tgeuVV5Zh0
TKlB2rdZESjvMgCNgK7WgsYqCwspvnUsRRthssuSHA0mLCJuFDr73FiDi4fQPBlr
UuRojwQ1uHlNgct/cBElCwqCWkX4mx4CRC0jQh7jV/rdF4Cy0+ajWXMOBJgkyDkG
CLEAXZOCRmDQGFJT30TACL+cVYTrhMHGsha8I4v5/LOQhYQRaDLVqHPbrvJ2ge1N
ZGWQu68eon7Vfr0iKKPJ3A==
)

2019-10-13T17:58:04+0200 nKvEmeNW6g [info] checkForUpdate() Array
(
    [version] => 16.0.5.1
    [versionstring] => Nextcloud 16.0.5
    [url] => https://download.nextcloud.com/server/releases/nextcloud-16.0.5.zip
    [web] => https://docs.nextcloud.com/server/16/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=16.0.5
    [autoupdater] => 1
    [eol] => 0
    [signature] => iAsxJoaWRQ/1A0M3PuiDehji4x0Ci158wpa5IAv+oZbuWdhOqZjcZbLf/2cWWeCL
ggZX8WJpdJw8ZDKNtInVpfcbI558mu0L9axjl7Cpl9T8lvF9uXOa26tgeuVV5Zh0
TKlB2rdZESjvMgCNgK7WgsYqCwspvnUsRRthssuSHA0mLCJuFDr73FiDi4fQPBlr
UuRojwQ1uHlNgct/cBElCwqCWkX4mx4CRC0jQh7jV/rdF4Cy0+ajWXMOBJgkyDkG
CLEAXZOCRmDQGFJT30TACL+cVYTrhMHGsha8I4v5/LOQhYQRaDLVqHPbrvJ2ge1N
ZGWQu68eon7Vfr0iKKPJ3A==
)

2019-10-13T17:58:04+0200 nKvEmeNW6g [info] getChangelogURL()
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] end of checkForUpdate() Update to Nextcloud 16.0.5 available. (channel: "stable")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">https://download.nextcloud.com/server/releases/nextcloud-16.0.5.zip</code><br /><a class="external_link" href="https://nextcloud.com/changelog/#16-0-5" target="_blank" rel="noreferrer noopener">Open changelog ↗</a>
2019-10-13T17:58:41+0200 DCouSSgzjm [info] request to updater
2019-10-13T17:58:41+0200 DCouSSgzjm [info] currentStep()
2019-10-13T17:58:41+0200 DCouSSgzjm [info] POST request for step "1"
2019-10-13T17:58:41+0200 DCouSSgzjm [info] startStep("1")
2019-10-13T17:58:41+0200 DCouSSgzjm [info] checkForExpectedFilesAndFolders()
2019-10-13T17:58:41+0200 DCouSSgzjm [info] end of checkForExpectedFilesAndFolders()
2019-10-13T17:58:41+0200 DCouSSgzjm [info] endStep("1")
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] request to updater
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] currentStep()
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] Step 1 is in state "end".
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] POST request for step "2"
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] startStep("2")
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] checkWritePermissions()
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] end of checkWritePermissions()
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] endStep("2")
2019-10-13T17:58:42+0200 VrJ8HGillf [info] request to updater
2019-10-13T17:58:42+0200 VrJ8HGillf [info] currentStep()
2019-10-13T17:58:42+0200 VrJ8HGillf [info] Step 2 is in state "end".
2019-10-13T17:58:42+0200 VrJ8HGillf [info] POST request for step "3"
2019-10-13T17:58:42+0200 VrJ8HGillf [info] startStep("3")
2019-10-13T17:58:42+0200 VrJ8HGillf [info] createBackup()
2019-10-13T18:01:58+0200 VrJ8HGillf [info] end of createBackup()
2019-10-13T18:01:58+0200 VrJ8HGillf [info] endStep("3")

Unfortunately it doesn´t tell anything about errors. However it seems that write permissions are granted because it doesn´t abort after checkWritePermissions().

1 Like

Tried again with original instance. Now the updater wanted to update to 16.0.6.

Error message while creating backup:

Parsing response failed. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body> <h1>Internal Server Error</h1> <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>Please contact the server administrator at service@webmailer.de to inform them of the time this error occurred, and the actions you performed just before this error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

Is it possible to update server version by creating a new instance with the web installer and setting the config file?

1 Like

Found the error in the server log files. The problem is that the php max_execution_time is set to 120s. Backup needs longer than that and therefore the script is terminated.
Unfortunately in my shared hosting environment it is not possible to change that setting.

2 Likes

Same problem here including the

Parsing response failed.

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body> <h1>Internal Server Error</h1> <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>Please contact the server administrator at service@webmailer.de to inform them of the time this error occurred, and the actions you performed just before this error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

Just last week I switched from PHP 7.2 to PHP 7.3 (because of the passwords app complaints), and I see my max_execution_time is set to 30.

I raised the value, but right now I’m stuck with that

Step 3 is currently in process. Please reload this page later.

message if I try to run the web updater again. I forget how to fix that, but I’ll look around at old posts and see if it’s already on the forum.