Update from Jessie to Stretch failed due to mariadb

If none of the more specific forums is the right place to ask

Update from Jessie to Stretch failed due to mariadb

Postby Lieta » 2017-07-03 14:47

Hi.
apt-get dist-upgrade failed with following error:
Code: Select all
Setting up mariadb-server-10.1 (10.1.23-9+deb9u1) ...
Installing new version of config file /etc/apparmor.d/usr.sbin.mysqld ...
Installing new version of config file /etc/init.d/mysql ...
Installing new version of config file /etc/logrotate.d/mysql-server ...
Installing new version of config file /etc/mysql/debian-start ...
Created symlink /etc/systemd/system/mysql.service → /lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /lib/systemd/system/mariadb.service.
Job for mariadb.service failed because a timeout was exceeded.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mariadb.service - MariaDB database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Mon 2017-07-03 11:49:54 EEST; 5ms ago
  Process: 26331 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 26240 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 26237 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 26235 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 26331 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"
   CGroup: /system.slice/mysql.service
           ├─22193 /bin/sh /usr/bin/mysqld_safe
           └─22541 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/v…06

jūl 03 11:48:12 lieta systemd[1]: Starting MariaDB database server...
jūl 03 11:49:43 lieta systemd[1]: mariadb.service: Start operation timed out. Terminating.
jūl 03 11:49:54 lieta systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
jūl 03 11:49:54 lieta systemd[1]: Failed to start MariaDB database server.
jūl 03 11:49:54 lieta systemd[1]: mariadb.service: Unit entered failed state.
jūl 03 11:49:54 lieta systemd[1]: mariadb.service: Failed with result 'timeout'.
dpkg: error processing package mariadb-server-10.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of default-mysql-server:
 default-mysql-server depends on mariadb-server-10.1; however:
  Package mariadb-server-10.1 is not configured yet.

dpkg: error processing package default-mysql-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Processing triggers for menu (2.1.47) ...
Processing triggers for systemd (232-25) ...
Errors were encountered while processing:
 mariadb-server-10.1
 default-mysql-server
N: Ignoring file '50unattended-upgrades.ucf-old' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
E: Sub-process /usr/bin/dpkg returned an error code (1)


On systemctl start mariadb.service /var/log/mysql/error.log shows:
Code: Select all
2017-07-03 18:04:59 140400182649408 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2017-07-03 18:04:59 140400182649408 [Note] InnoDB: The InnoDB memory heap is disabled
2017-07-03 18:04:59 140400182649408 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-07-03 18:04:59 140400182649408 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-07-03 18:04:59 140400182649408 [Note] InnoDB: Compressed tables use zlib 1.2.8
2017-07-03 18:04:59 140400182649408 [Note] InnoDB: Using Linux native AIO
2017-07-03 18:04:59 140400182649408 [Note] InnoDB: Using SSE crc32 instructions
2017-07-03 18:04:59 140400182649408 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-07-03 18:04:59 140400182649408 [Note] InnoDB: Completed initialization of buffer pool
2017-07-03 18:04:59 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:04:59 140400182649408 [Note] InnoDB: Retrying to lock the first data file
2017-07-03 18:05:00 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:01 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:02 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:03 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:04 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:05 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:06 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:07 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:08 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:09 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:10 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:11 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:12 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:13 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:14 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:15 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:16 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:17 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:18 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:19 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:05:20 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
...
2017-07-03 18:06:38 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:06:39 140400182649408 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2017-07-03 18:06:39 140400182649408 [Note] InnoDB: Unable to open the first data file
2017-07-03 18:06:39 7fb177036240  InnoDB: Operating system error number 1 in a file operation.
InnoDB: Error number 1 means 'Operation not permitted'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
2017-07-03 18:06:39 140400182649408 [ERROR] InnoDB: Can't open './ibdata1'
2017-07-03 18:06:39 140400182649408 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2017-07-03 18:06:39 140400182649408 [ERROR] Plugin 'InnoDB' init function returned error.
2017-07-03 18:06:39 140400182649408 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-07-03 18:06:39 140400182649408 [Note] Plugin 'FEEDBACK' is disabled.
2017-07-03 18:06:39 140400182649408 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-07-03 18:06:39 140400182649408 [ERROR] Aborting

How to fix it?
Lieta
 
Posts: 6
Joined: 2016-04-28 17:48

Re: Update from Jessie to Stretch failed due to mariadb

Postby Lysander » 2017-07-04 10:38

In absence of any other kind of answer, please have a read of these short topics and post back.

viewtopic.php?f=30&t=49029

viewtopic.php?f=30&t=47078
User avatar
Lysander
 
Posts: 332
Joined: 2017-02-23 10:07
Location: London

Re: Update from Jessie to Stretch failed due to mariadb

Postby Lieta » 2017-07-04 12:14

Looks like issue fixed.
Code: Select all
mysql_upgrade -u root

was required
Lieta
 
Posts: 6
Joined: 2016-04-28 17:48


Return to General Questions

Who is online

Users browsing this forum: No registered users and 1 guest

fashionable