vm icon indicating copy to clipboard operation
vm copied to clipboard

Update to 13.0.2 using update.sh fails with error while mysqldump

Open flostyen opened this issue 8 years ago • 8 comments

Steps to reproduce

  1. Upgrade from 13.0.1 to 13.0.2 using "/var/scripts/update.sh"
  2. Update fails/stops with error:

Latest release is: 13.0.2. Current version is: 13.0.1. New version available! Upgrade continues... Checking latest released version on the Nextcloud download server and if it's possible to download... nextcloud-13.0.2.tar.bz2 100%[========>] 42.76M 9.56MB/s in 4.5s Backing up files and upgrading to Nextcloud 13.0.2 in 10 seconds... Press CTRL+C to abort. Doing mysqldump of nextcloud_db... mysqldump: Got error: 1932: "Table 'nextcloud_db.oc_passman_credentials' doesn't exist in engine" when using LOCK TABLES

Expected behaviour

Update to 13.0.2 works

Actual behaviour

Update to 13.0.2 fails

Server configuration

Normal nextcloud vm installation VM version 13.0.1.1 Updated from an older installed version or fresh install: Fresh install at 13.0.1.1, first update to 13.0.2

flostyen avatar May 27 '18 20:05 flostyen

@collysucker Are you running MariaDB or MySQL?

This is the current update scripts logic: https://github.com/nextcloud/vm/blob/master/nextcloud_update.sh#L151-L196 As you can see it's just a regular mysqldump. The specific line is: https://github.com/nextcloud/vm/blob/master/nextcloud_update.sh#L185

~~Are you running sudo bash /var/scripts/update.sh?~~ Didn't read properly, I can see that you do now.

enoch85 avatar May 28 '18 09:05 enoch85

@collysucker Can you deactivate Talk or Spreed and see if that helps as the problem seems related to that?

enoch85 avatar May 29 '18 07:05 enoch85

I've tried it again with first activating maintenance mode, but the result is the same.

@enoch85 Talk is already deactivated/is not even installed.

flostyen avatar May 30 '18 12:05 flostyen

@collysucker You still didn't answer my question: Are you running MariaDB or MySQL?

mysqldump: Got error: 1932: "Table 'nextcloud_db.oc_passman_credentials' doesn't exist in engine"

That row tells me that this is not an error in the script, rather something missing in DB. And now when I'm not that tired I can see that it's Passman causing issues. Have you tried to deactivate it, or activate it?

I've tried it again with first activating maintenance mode, but the result is the same.

You don't have to do anything, the script takes care of everything for you.

I think the issue is very strange as it's just a DB backup taking place. You could comment that row out and skip the DB backup if you want, but please make sure to have a proper backup somewhere else.

enoch85 avatar May 30 '18 13:05 enoch85

@collysucker Any update here?

enoch85 avatar Jun 07 '18 12:06 enoch85

@enoch85 I've created an issue in passman: https://github.com/nextcloud/passman/issues/483

I hope they can help. I'll keep you posted.

flostyen avatar Jun 08 '18 18:06 flostyen

OK, lets close this then.

enoch85 avatar Jun 09 '18 08:06 enoch85

I found the solution to the issue:

  1. Disable the nextcloud (occ) app "passman".
  2. Remove the nextcloud (occ) app "passman".
  3. Go to your database and remove all passman tables:
root@xyz:/var/www/nextcloud# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 465848
Server version: 10.2.14-MariaDB-10.2.14+maria~xenial-log mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


MariaDB [(none)]>
MariaDB [(none)]>
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| XXXXXX  |
| XXXXXX  |
| nextcloud_db       |
| XXXXXX  |
+--------------------+
4 rows in set (0.00 sec)

MariaDB [(none)]>
MariaDB [(none)]> use nextcloud_db;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [nextcloud_db]> show tables;
+---------------------------------+
| Tables_in_nextcloud_db          |
+---------------------------------+
[...]
| oc_passman_credentials          |
| oc_passman_delete_vault_request |
| oc_passman_files                |
| oc_passman_revisions            |
| oc_passman_share_request        |
| oc_passman_sharing_acl          |
| oc_passman_vaults               |
[...]
+---------------------------------+
XX rows in set (0.00 sec)

MariaDB [nextcloud_db]> drop table oc_passman_credentials;
Query OK, 0 rows affected, 1 warning (0.02 sec)

MariaDB [nextcloud_db]> drop table oc_passman_delete_vault_request;
Query OK, 0 rows affected, 1 warning (0.00 sec)

MariaDB [nextcloud_db]> drop table oc_passman_files;
Query OK, 0 rows affected, 1 warning (0.00 sec)

MariaDB [nextcloud_db]> drop table oc_passman_revisions;
Query OK, 0 rows affected, 1 warning (0.00 sec)

MariaDB [nextcloud_db]> drop table oc_passman_share_request;
Query OK, 0 rows affected, 1 warning (0.01 sec)

MariaDB [nextcloud_db]> drop table oc_passman_sharing_acl;
Query OK, 0 rows affected, 1 warning (0.00 sec)

MariaDB [nextcloud_db]> drop table oc_passman_vaults;
Query OK, 0 rows affected, 1 warning (0.00 sec)

MariaDB [nextcloud_db]>
MariaDB [nextcloud_db]> quit
Bye

  1. I tried to reinstall but disable passman (not sure if this is necessary):
root@xyz:/var/www/nextcloud# cd /var/www/nextcloud; sudo -u www-data php ./occ app:install passman
passman already installed
root@xyz:/var/www/nextcloud#
root@xyz:/var/www/nextcloud# cd /var/www/nextcloud; sudo -u www-data php ./occ app:disable passman
No such app enabled: passman
root@xyz:/var/www/nextcloud#
  1. Run update again: root@xyz:/var/www/nextcloud# /var/scripts/update.sh

-> worked.

Thanks for the support enoch85 :)

flostyen avatar Jul 23 '18 13:07 flostyen