The officially official Devuan Forum!

You are not logged in.

#1 2022-08-20 20:55:00

mknoop
Member
Registered: 2017-05-18
Posts: 69  

mariadb on ceres

Mariadb-server-10.6 will not install during "apt-get upgrade'" on ceres.  When I tried looking for bug reports on the devuan bug tracking system it says the package does not exist, nor apparently any of the mariadb packages.  I thought that mariadb used systemd on debian, so there should be devuan specific packages.
I have not had this update problem on debian-sid.
I am baffled.

Offline

#2 2022-08-20 21:15:17

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: mariadb on ceres

Not ours. (There's no "devuan" in the version.) So you won't find it in our bug system. Check debian bug reports.

The package still contains an init script, so it can use systemd or sysvinit.

What exactly happened? Did you lose the package upgrading to ceres from daedalus, or on a regular upgrade in ceres, or the package just refuses to install. Did you get any error messages?

apt-cache search mariadb-server
mariadb-server - MariaDB database server (metapackage depending on the latest version)
mariadb-server-10.6 - MariaDB database server binaries
mariadb-server-core-10.6 - MariaDB database core server files

apt policy mariadb-server
mariadb-server:
  Installed: (none)
  Candidate: 1:10.6.8-1
  Version table:
     1:10.6.9-1 10
         10 http://deb.devuan.org/merged ceres/main amd64 Packages
     1:10.6.8-1 500
        500 http://deb.devuan.org/merged daedalus/main amd64 Packages

$ apt policy mariadb-server-10.6
mariadb-server-10.6:
  Installed: (none)
  Candidate: 1:10.6.8-1
  Version table:
     1:10.6.9-1 10
         10 http://deb.devuan.org/merged ceres/main amd64 Packages
     1:10.6.8-1 500
        500 http://deb.devuan.org/merged daedalus/main amd64 Packages

$ apt-file list mariadb-server-10.6
mariadb-server-10.6: /etc/init.d/mariadb
<snip>

Offline

#3 2022-08-20 21:36:44

mknoop
Member
Registered: 2017-05-18
Posts: 69  

Re: mariadb on ceres

It was a regular ceres system upgrade (apt-get upgrade).

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up mariadb-server-10.6 (1:10.6.9-1) ...
Stopping MariaDB database server: mariadbd.
Starting MariaDB database server: mariadbd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mariadb, action "start" failed.
dpkg: error processing package mariadb-server-10.6 (--configure):
installed mariadb-server-10.6 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
mariadb-server depends on mariadb-server-10.6 (>= 1:10.6.9-1); however:
  Package mariadb-server-10.6 is not configured yet.

dpkg: error processing package mariadb-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mariadb-server-10.6
mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Offline

#4 2022-08-20 22:29:09

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: mariadb on ceres

I can't reproduce the error. I'm running daedalus, installed mariadb-server, then installed the version from ceres. So I upgraded from 1:10.6.8-1 to 1:10.6.9-1 without error. The service got stopped and started successfully.

I don't know what else to do. Maybe someone running ceres would get a different result.

Well, maybe dpkg --configure -a or dpkg-reconfigure mariadb-server-10.6

Offline

#5 2022-08-21 05:38:26

mknoop
Member
Registered: 2017-05-18
Posts: 69  

Re: mariadb on ceres

I tried them both, but neither helps.  I've been poking around /var/log files and /usr/share/doc/mariadb-server-10.6, but I can't figure anything out.

Offline

#6 2022-08-21 15:54:26

chris2be8
Member
Registered: 2018-08-11
Posts: 307  

Re: mariadb on ceres

The interesting part looks to be:

mknoop wrote:

Starting MariaDB database server: mariadbd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mariadb, action "start" failed.

What happens if you invoke the start script manually? Does that produce any interesting messages?

Was mariadb running OK before the upgrade (or is this a new install)?

If it's a new install do you need to do any first time setup steps?

Offline

#7 2022-08-21 17:35:23

mknoop
Member
Registered: 2017-05-18
Posts: 69  

Re: mariadb on ceres

I went into /etc/init.d - entered sudo ./mariadb start and got:

Starting MariaDB database server: mariadbd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!

Not interesting.

Everything was fine before the upgrade.

It is an old system running on a QEMU virtual machine.
I have a parallel debian-sid vm, and the upgrade there went fine.

Offline

#8 2022-08-22 08:39:57

etech
Member
From: France - South West
Registered: 2022-03-13
Posts: 23  

Re: mariadb on ceres

Hi mknoop,
Have you run 'mysql_secure_installation' before trying to launch the service?
Mariadb works flawlessly on my Devuan Daedalus machines.

Offline

#9 2022-08-22 17:21:47

mknoop
Member
Registered: 2017-05-18
Posts: 69  

Re: mariadb on ceres

Here is what happened:

sudo mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
Enter current password for root (enter for none):
Aborting!

Cleaning up...

I tried typing the root password, and I tried just hitting enter.  I got the same resuilt,.

Offline

#10 2022-08-22 17:51:49

Andre4freedom
Member
Registered: 2017-11-15
Posts: 174  

Re: mariadb on ceres

Just an idea: sudo is not always the same as root.
I suggest to do a
su -
That switches your shell to the root account. Then try to change to the script directory and run it (as root user)
After the (hopefully) successful installation you just leave the root shell
Ctrl-D
And your shell will be back to your user again.
Good luck.

Offline

#11 2022-08-22 18:00:17

mknoop
Member
Registered: 2017-05-18
Posts: 69  

Re: mariadb on ceres

I was not sure which script you were referring to, so I tried it on both "./mariad start" and "mysql_secure_installation".

No difference from using sudo.

Offline

#12 2022-08-23 10:20:55

Andre4freedom
Member
Registered: 2017-11-15
Posts: 174  

Re: mariadb on ceres

Sorry it didn't help.
I was referring to your post:

sudo mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

Offline

#13 2022-08-24 07:41:03

mknoop
Member
Registered: 2017-05-18
Posts: 69  

Re: mariadb on ceres

I found this in syslog.  Does anyone see a clue?

Aug 24 02:19:07 devuan-ceres mysqld_safe: Starting mariadbd daemon with databases from /var/lib/mysql
Aug 24 02:19:07 devuan-ceres mysqld_safe: Starting mariadbd daemon with databases from /var/lib/mysql
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [Note] /usr/sbin/mariadbd (server 10.6.9-MariaDB-1) starting as process 1443 ...
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [Note] /usr/sbin/mariadbd (server 10.6.9-MariaDB-1) starting as process 1441 ...
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [ERROR] mariadbd: Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [Note] InnoDB: Number of pools: 1
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [Note] InnoDB: Using generic crc32 instructions
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [Note] InnoDB: Using liburing
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [Note] InnoDB: Completed initialization of buffer pool
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1651026,1651026
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [ERROR] InnoDB: Missing FILE_CHECKPOINT at 1651026 between the checkpoint 1651026 and the end 1651038.
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [Note] InnoDB: Starting shutdown...
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [ERROR] Plugin 'InnoDB' init function returned error.
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [Note] Plugin 'FEEDBACK' is disabled.
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [ERROR] Unknown/unsupported storage engine: InnoDB
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [ERROR] Aborting

Offline

#14 2022-08-24 16:48:20

chris2be8
Member
Registered: 2018-08-11
Posts: 307  

Re: mariadb on ceres

Does /var/lib/mysql/aria_log_control exist?
Would mysqld be able to write to it? Post output from stat '/var/lib/mysql/aria_log_control' if you are not sure.
Would mysqld be able to write to /var/lib/mysql/ ?

I'm just guessing what to look at, I don't run mariadb myself.

Offline

#15 2022-08-24 19:56:24

mknoop
Member
Registered: 2017-05-18
Posts: 69  

Re: mariadb on ceres

/var/lib/mysql$ stat aria_log_control
  File: aria_log_control
  Size: 52            Blocks: 8          IO Block: 4096   regular file
Device: 801h/2049d    Inode: 404111      Links: 1
Access: (0660/-rw-rw----)  Uid: (  112/   mysql)   Gid: (  120/   mysql)
Access: 2022-08-24 14:52:13.500000000 -0500
Modify: 2022-08-24 14:37:32.160000000 -0500
Change: 2022-08-24 14:37:32.160000000 -0500
Birth: 2020-09-11 16:02:07.848000000 -0500

I do not know how to interpret this.

Offline

#16 2022-08-25 00:01:36

rbit
Member
Registered: 2018-06-12
Posts: 46  

Re: mariadb on ceres

These log entries look very similar to an issue I had at the beginning of the year.

mknoop wrote:

Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1651026,1651026
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [ERROR] InnoDB: Missing FILE_CHECKPOINT at 1651026 between the checkpoint 1651026 and the end 1651038.
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [ERROR] Plugin 'InnoDB' init function returned error.
Aug 24 02:19:07 devuan-ceres mysqld: 2022-08-24  2:19:07 0 [ERROR] Unknown/unsupported storage engine: InnoDB

What fixed it for me was removing (actually, renaming, in case it was needed later; it wasn't) the file /var/lib/mysql/ib_logfile0

cd /var/lib/mysql
mv ib_logfile0 ib_logfile0.bad-renamed
service mariadb start

Offline

#17 2022-08-25 04:21:59

mknoop
Member
Registered: 2017-05-18
Posts: 69  

Re: mariadb on ceres

That's it!

I did that and tried to start mariadb.  That worked, so I did another apt-get upgrade.  The server finished installing, stopped, and then started again succesfully.

Thank you very much, rbit.

Offline

#18 2022-08-25 16:15:10

chris2be8
Member
Registered: 2018-08-11
Posts: 307  

Re: mariadb on ceres

mknoop wrote:

/var/lib/mysql$ stat aria_log_control
  File: aria_log_control
  Size: 52            Blocks: 8          IO Block: 4096   regular file
Device: 801h/2049d    Inode: 404111      Links: 1
Access: (0660/-rw-rw----)  Uid: (  112/   mysql)   Gid: (  120/   mysql)
Access: 2022-08-24 14:52:13.500000000 -0500
Modify: 2022-08-24 14:37:32.160000000 -0500
Change: 2022-08-24 14:37:32.160000000 -0500
Birth: 2020-09-11 16:02:07.848000000 -0500

I do not know how to interpret this.

That says the file is owned by mysql, has group mysql and can be read and written by user mysql and any user in group mysql. Which all looks OK to me.

The last 4 lines of output say when it was last accessed (ie read), modified (written to), had it's directory entry changed and when it was first created.

Unfortunately the man page for stat is not very clear. But running it against a few files with known characteristics it's fairly easy to work out what it means.

As I said I don't run mariadb, so I was just guessing from the first error message in the log extract. So kudos to rbit.

Offline

#19 2022-10-20 14:06:00

nixer
Member
From: North Carolina, USA
Registered: 2016-11-30
Posts: 211  

Re: mariadb on ceres

This forum thread is not that old, yet, so I thought I would add to it.  I too had this same exact problem and it kept showing up "sometimes" when I had to reboot or restart the mysql service.  I finally found what I "think" is a solution.  I was having to delete the /var/lib/mysql/ib_logfile0 file to get mysql (mariadb-server) to start.  I have been using this for a few weeks on more than one server and have not had any problems, yet.  Also, my problem was showing up on chimaera, not ceres.

Steps involved:
- Stop mysql service before editing the file below
- In /etc/mysql/mariadb.conf.d/50-server.cnf file, add this (toward the bottom)

Under this line:

[mariadb]

Add this content:

innodb_fast_shutdown = 0

I hope this helps.

Last edited by nixer (2022-10-20 14:06:23)

Offline

Board footer