Update to 11.0.3 fails (web updater)


I have an urgent request:

On my installation (clean centos 7.3, dedicated to run nextcloud) the update from 11.0.2.to 11.0.3 fails. My nextcloud is now unusable because it shows the ‘Update now’ screen permanently - no way to log in or use it.

Available file system space is not an issue here. (190G free disk space in /, single partition).

Can I just abort the upgrade and stick with 11.0.2 meanwhile? I need a working instance back here!

Steps to reproduce

  1. Follow the notification that nextclud 11.0.3 is available (currently installed i 11.0.2)
  2. Follow the dialog
  3. Finish update

Expected behaviour

Updates suceeds

Actual behaviour

Update fails:

Preparing update
Set log level to debug
Turned on maintenance mode
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘SELECT DISTINCT(TABLE_NAME) AS table FROM INFORMATION_SCHEMA . COLUMNS WHERE TABLE_SCHEMA = ? AND (COLLATION_NAME <> ‘utf8_bin’ OR CHARACTER_SET_NAME <> ‘utf8’) AND TABLE_NAME LIKE “oc_%”’ with params [“nextcloud_db”]: SQLSTATE[HY000]: General error: 1 Can’t create/write to file ‘/var/tmp/#sql_81b_0.MAI’ (Errcode: 2)

Server configuration

Operating system:
Centos 7.3

Web server:


PHP version:

Nextcloud version: (see Nextcloud admin page)

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

Where did you install Nextcloud from:

Signing status:

Signing status

Shows the update failed screen

List of activated apps:

App list - activity: 2.4.1 - calendar: 1.5.2 - comments: 1.1.0 - dav: 1.1.1 - direct_menu: 0.10.1 - federatedfilesharing: 1.1.1 - files: 1.6.1 - files_downloadactivity: 1.0.1 - files_pdfviewer: 1.0.1 - files_sharing: 1.1.1 - files_texteditor: 2.2 - files_trashbin: 1.1.0 - files_versions: 1.4.0 - files_videoplayer: 1.0.0 - firstrunwizard: 2.0 - gallery: 16.0.0 - logreader: 2.0.0 - lookup_server_connector: 1.0.0 - nextcloud_announcements: 1.0 - notifications: 1.0.1 - password_policy: 1.1.0 - provisioning_api: 1.1.0 - serverinfo: 1.1.1 - sharebymail: 1.0.1 - survey_client: 0.1.5 - systemtags: 1.1.3 - theming: 1.1.1 - twofactor_backupcodes: 1.0.0 - updatenotification: 1.1.1 - workflowengine: 1.1.1

I’m seeing a common theme with these failed updates: permission issues. Based on the error message you posted, it’s saying it can’t write to /var/tmp which is necessary for storing temporary files.[quote=“feli74, post:1, topic:11929”]
General error: 1 Can’t create/write to file ‘/var/tmp/#sql_81b_0.MAI’ (Errcode: 2)

Can you try changing your /var/tmp permissions by running these?

sudo chown root:root /var/tmp
sudo chmod 1777 /var/tmp

Then retry the update?

I honesty don’t know about aborting the upgrade at this point, so what I would do is attempt to proceed forward if possible. Otherwise, you did a back up right? You could always restore to that and start fresh.

The filesystem is not the issue here. The directory is writable and empty.

What specifically are the permissions on /var/tmp? Have you checked to make sure there’s enough free space on your drive?

If you’re sure the filesystem is not the issue here, although that’s not clear to me since you haven’t provided those details, you need to figure out why else this error is happening. I googled that error message and found some other things to check regarding the MySQL config and server, but that’s beyond my level of experience so I just want to also mention that to you.

A quick thing to try which shouldn’t hurt anything would be to restart the mysql server, or even the entire server and see if that makes any difference.

Yes permissions are good (777) and I have around 190GB of space on the filesystem.
My deployment is mariadb based so the database files shouldn’t be in /var/tmp anyway…Do you have any clue what the updater is trying to do here?

I’ll give restart a shot…

Ok, restarting mariadb solved the issue. The upgrade completed successfully.

I’m glad that worked for you because I was out of ideas :smiley:

for me the GUI update always fails

I use the command line

set weak permissions
sudo -u www-data php updater.phar
set strong permissions

Just to confirm:
Same os, same version of nextcloud, same error:
restart of mariadb solved the issue also for me.
systemctl restart mariadb