Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MariaDB 10.2.14 fails #509

Closed
flostyen opened this issue Apr 4, 2018 · 5 comments
Closed

Update MariaDB 10.2.14 fails #509

flostyen opened this issue Apr 4, 2018 · 5 comments
Assignees
Labels

Comments

@flostyen
Copy link

flostyen commented Apr 4, 2018

Steps to reproduce

  1. Execute "sudo bash /var/scripts/update.sh" on freshly installed 13.0.1 nextcloud appliance vm.
  2. Updated show the following lines:
ncadmin@nas:~$ sudo bash /var/scripts/update.sh
[sudo] password for ncadmin:
mariadb-common set on hold.
mariadb-client-10.0 set on hold.
mariadb-server set on hold.
mariadb-client set on hold.
mariadb-client-core-10.0 set on hold.
mariadb-server-10.0 set on hold.
mariadb-plugin-connect set on hold.
mariadb-plugin-mroonga set on hold.
mariadb-plugin-oqgraph set on hold.
mariadb-plugin-spider set on hold.
mariadb-plugin-tokudb set on hold.
mariadb-server-core-10.0 set on hold.
mariadb-test set on hold.
mariadb-test-data set on hold.
mariadb-client-10.2 set on hold.
mariadb-server-10.2 set on hold.
mariadb-backup-10.2 set on hold.
mariadb-backup-10.2-dbgsym set on hold.
mariadb-client-core-10.2 set on hold.
mariadb-client-10.2-dbgsym set on hold.
mariadb-client-core-10.2-dbgsym set on hold.
mariadb-plugin-aws-key-management-10.2 set on hold.
mariadb-plugin-aws-key-management-10.2-dbgsym set on hold.
mariadb-plugin-connect-dbgsym set on hold.
mariadb-plugin-cracklib-password-check set on hold.
mariadb-plugin-cracklib-password-check-dbgsym set on hold.
mariadb-plugin-gssapi-client set on hold.
mariadb-plugin-gssapi-client-dbgsym set on hold.
mariadb-plugin-gssapi-server set on hold.
mariadb-plugin-gssapi-server-dbgsym set on hold.
mariadb-plugin-mroonga-dbgsym set on hold.
mariadb-plugin-oqgraph-dbgsym set on hold.
mariadb-plugin-rocksdb set on hold.
mariadb-plugin-rocksdb-dbgsym set on hold.
mariadb-plugin-spider-dbgsym set on hold.
mariadb-plugin-tokudb-dbgsym set on hold.
mariadb-server-core-10.2 set on hold.
mariadb-server-10.2-dbgsym set on hold.
mariadb-server-core-10.2-dbgsym set on hold.
mariadb-test-dbgsym set on hold.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-cloud-tools-4.4.0-116 linux-cloud-tools-4.4.0-116-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mariadb-server-10.2 (10.2.14+maria~xenial) ...

Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl                                                                                                    -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mariadb.service - MariaDB 10.2.14 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: failed (Result: exit-code) since Wed 2018-04-04 21:49:23 CEST; 5ms ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 3818 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 3606 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && s                                                                                                   ystemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 3602 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 3598 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 3818 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"
    Tasks: 16
   Memory: 124.2M
      CPU: 299ms
   CGroup: /system.slice/mariadb.service
           └─1554 /usr/sbin/mysqld

Apr 04 21:49:23 nextcloud.fqdn mysqld[3818]: 2018-04-04 21:49:23 140531784976576 [Note] InnoDB: Starting shutdown...
Apr 04 21:49:23 nextcloud.fqdn mysqld[3818]: 2018-04-04 21:49:23 140531784976576 [ERROR] Plugin 'InnoDB' init function...error.
Apr 04 21:49:23 nextcloud.fqdn mysqld[3818]: 2018-04-04 21:49:23 140531784976576 [ERROR] Plugin 'InnoDB' registration ...ailed.
Apr 04 21:49:23 nextcloud.fqdn mysqld[3818]: 2018-04-04 21:49:23 140531784976576 [Note] Plugin 'FEEDBACK' is disabled.
Apr 04 21:49:23 nextcloud.fqdn mysqld[3818]: 2018-04-04 21:49:23 140531784976576 [ERROR] Unknown/unsupported storage e...InnoDB
Apr 04 21:49:23 nextcloud.fqdn mysqld[3818]: 2018-04-04 21:49:23 140531784976576 [ERROR] Aborting
Apr 04 21:49:23 nextcloud.fqdn systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Apr 04 21:49:23 nextcloud.fqdn systemd[1]: Failed to start MariaDB 10.2.14 database server.
Apr 04 21:49:23 nextcloud.fqdn systemd[1]: mariadb.service: Unit entered failed state.
Apr 04 21:49:23 nextcloud.fqdn systemd[1]: mariadb.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package mariadb-server-10.2 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mariadb-server-10.2
E: Sub-process /usr/bin/dpkg returned an error code (1)
mariadb-client-10.0 was already not hold.
mariadb-server was already not hold.
mariadb-client was already not hold.
mariadb-client-core-10.0 was already not hold.
mariadb-server-10.0 was already not hold.
mariadb-plugin-connect was already not hold.
mariadb-plugin-mroonga was already not hold.
mariadb-plugin-oqgraph was already not hold.
mariadb-plugin-spider was already not hold.
mariadb-plugin-tokudb was already not hold.
mariadb-server-core-10.0 was already not hold.
mariadb-test was already not hold.
mariadb-test-data was already not hold.
mariadb-backup-10.2 was already not hold.
mariadb-backup-10.2-dbgsym was already not hold.
mariadb-client-10.2-dbgsym was already not hold.
mariadb-client-core-10.2-dbgsym was already not hold.
mariadb-plugin-aws-key-management-10.2 was already not hold.
mariadb-plugin-aws-key-management-10.2-dbgsym was already not hold.
mariadb-plugin-connect-dbgsym was already not hold.
mariadb-plugin-cracklib-password-check was already not hold.
mariadb-plugin-cracklib-password-check-dbgsym was already not hold.
mariadb-plugin-gssapi-client was already not hold.
mariadb-plugin-gssapi-client-dbgsym was already not hold.
mariadb-plugin-gssapi-server was already not hold.
mariadb-plugin-gssapi-server-dbgsym was already not hold.
mariadb-plugin-mroonga-dbgsym was already not hold.
mariadb-plugin-oqgraph-dbgsym was already not hold.
mariadb-plugin-rocksdb was already not hold.
mariadb-plugin-rocksdb-dbgsym was already not hold.
mariadb-plugin-spider-dbgsym was already not hold.
mariadb-plugin-tokudb-dbgsym was already not hold.
mariadb-server-10.2-dbgsym was already not hold.
mariadb-server-core-10.2-dbgsym was already not hold.
mariadb-test-dbgsym was already not hold.
Canceled hold on mariadb-common.
Canceled hold on mariadb-client-10.2.
Canceled hold on mariadb-server-10.2.
Canceled hold on mariadb-client-core-10.2.
Canceled hold on mariadb-server-core-10.2.
Trying to upgrade the Redis Pecl extenstion...
Nothing to upgrade
Wed Apr  4 21:49:25 CEST 2018 : INFO:  Running on a terminal - (this script also supports running headless from crontab)

Wed Apr  4 21:49:25 CEST 2018 : INFO:  Updating netdata source from github...
Already up-to-date.
Wed Apr  4 21:49:26 CEST 2018 : INFO:  Nothing to be done! (use -f to force re-install)
/dev/fd/63: line 582: [: : integer expression expected
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or dir                                                                                                   ectory in /var/www/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /var/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrin                                                                                                   e\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#6 /var/www/nextcloud/lib/private/DB/ConnectionFactory.php(152): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Co                                                                                                   nfiguration), Object(Doctrine\Common\EventManager))
#7 /var/www/nextcloud/lib/private/Server.php(628): OC\DB\ConnectionFactory->getConnection('mysql', Array)
#8 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#9 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(116): Pimple\Container->offsetGet('OCP\\IDBConnecti...')
#10 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('OCP\\IDBConnecti...')
#11 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(164): OC\ServerContainer->query('OCP\\IDBConnecti...')
#12 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(109): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Util                                                                                                   ity\{closure}(Object(OC\Server))
#13 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(116): Pimple\Container->offsetGet('DatabaseConnect...')
#14 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('DatabaseConnect...')
#15 /var/www/nextcloud/lib/private/Server.php(1511): OC\ServerContainer->query('DatabaseConnect...')
#16 /var/www/nextcloud/lib/private/Server.php(332): OC\Server->getDatabaseConnection()
#17 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#18 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(116): Pimple\Container->offsetGet('OC\\Authenticati...')
#19 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...')
#20 /var/www/nextcloud/lib/private/Server.php(336): OC\ServerContainer->query('OC\\Authenticati...')
#21 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#22 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(116): Pimple\Container->offsetGet('OC\\Authenticati...')
#23 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...')
#24 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(164): OC\ServerContainer->query('OC\\Authenticati...')
#25 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(109): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Util                                                                                                   ity\{closure}(Object(OC\Server))
#26 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(116): Pimple\Container->offsetGet('OC\\Authenticati...')
#27 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...')
#28 /var/www/nextcloud/lib/private/Server.php(352): OC\ServerContainer->query('OC\\Authenticati...')
#29 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#30 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(116): Pimple\Container->offsetGet('OCP\\IUserSessio...')
#31 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('OCP\\IUserSessio...')
#32 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(164): OC\ServerContainer->query('OCP\\IUserSessio...')
#33 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(109): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Util                                                                                                   ity\{closure}(Object(OC\Server))
#34 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(116): Pimple\Container->offsetGet('UserSession')
#35 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('UserSession')
#36 /var/www/nextcloud/lib/private/Server.php(1380): OC\ServerContainer->query('UserSession')
#37 /var/www/nextcloud/lib/private/Server.php(688): OC\Server->getUserSession()
#38 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#39 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(116): Pimple\Container->offsetGet('OC\\App\\AppManag...')
#40 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('OC\\App\\AppManag...')
#41 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(164): OC\ServerContainer->query('OC\\App\\AppManag...')
#42 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(109): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Util                                                                                                   ity\{closure}(Object(OC\Server))
#43 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(116): Pimple\Container->offsetGet('AppManager')
#44 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('AppManager')
#45 /var/www/nextcloud/lib/private/Server.php(1684): OC\ServerContainer->query('AppManager')
#46 /var/www/nextcloud/lib/private/legacy/app.php(332): OC\Server->getAppManager()
#47 /var/www/nextcloud/lib/private/legacy/app.php(113): OC_App::getEnabledApps()
#48 /var/www/nextcloud/lib/base.php(661): OC_App::loadApps(Array)
#49 /var/www/nextcloud/lib/base.php(1080): OC::init()
#50 /var/www/nextcloud/console.php(46): require_once('/var/www/nextcl...')
#51 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#52 {main}Sorry but something went wrong. Please report this issue to https://github.com/nextcloud/vm/issues and include the output of the                                                                                                    error message. Thank you!
sudo -u www-data php /var/www/nextcloud/occ -V failed
ncadmin@nas:~$
ncadmin@nas:~$ sudo -u www-data php /var/www/nextcloud/occ -V failed
NAS 13.0.1
ncadmin@nas:~$
`



## Expected behaviour
Update runs through fine.

## Actual behaviour
Update crashes with the output shown above.

## Server configuration
Freshly installed nextcloud appliance 13.0.1 virtual machine.

**Server version:** (see your admin page)
Ubuntu Linux 16.04.1

**VM version** (Scripted install from master **OR** Released version)
nextcloud appliance 13.0.1 virtual machine

**Updated from an older installed version or fresh install:**
Fresh install

## Network
**Do you use DHCP?**
No, fix IP.

**Is port 80 and/or 443 open?**
Only 443-

## Logs / Screenshots
<!--
Please use http://hastebin.com/ for long error messages or logs. Thanks!
-->

#### Log file (/var/ncdata/nextcloud.log)

Insert your nextcloud.log file here


#### Installation log (command output)

Insert the CLI output here


#### Screenshoots
<!--
Please use http://imgur.com/ for screenshots. Thanks!
-->
@enoch85
Copy link
Member

enoch85 commented Apr 5, 2018

Hmm, I specifically set mariadb on hold just to avoid this. :(

I will fix it when I have time.

@enoch85 enoch85 added the bug label Apr 5, 2018
@enoch85 enoch85 self-assigned this Apr 5, 2018
@enoch85
Copy link
Member

enoch85 commented Apr 5, 2018

And thanks for reporting this! 👍

enoch85 pushed a commit that referenced this issue Apr 6, 2018
Fixes #509
@enoch85
Copy link
Member

enoch85 commented Apr 6, 2018

Though this error was due to that mariadb wasn't fully installed for some reason, so the update script isn't the error here.

I'll add the fix anyway just in case. It dosn't hurt anyone.

enoch85 pushed a commit that referenced this issue Apr 6, 2018
Fixes #509
@flostyen
Copy link
Author

flostyen commented Apr 8, 2018

Hi, thanks a lot for the help and quick response.

However I'm still struggeling with my database: When I stop the database service, "journalctl -xe" shows:
Apr 08 18:05:09 nextcloud.fqdn mysqld[2698]: 2018-04-08 18:05:09 140661917575360 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. Apr 08 18:05:10 nextcloud.fqdn mysqld[2698]: 2018-04-08 18:05:10 140661917575360 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11

I've checked and it looks like another(?) mysql instance is running at the same time:
root@nas:~# ps aux | grep mysql mysql 1549 0.7 2.3 1956628 96004 ? Ssl 02:11 0:00 /usr/sbin/mysqld

When I try to stop and restart it, it fails.

@enoch85
Copy link
Member

enoch85 commented Apr 9, 2018

Sorry, I'm no DB expert. Google is your friend here, or maybe the Nextcloud forums @ https://help.nextcloud.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants