[MDEV-21849] installation fails on Ubuntu 19.10 Created: 2020-03-01  Updated: 2020-03-01  Resolved: 2020-03-01

Status: Closed
Project: MariaDB Server
Component/s: Packaging, Platform Debian
Affects Version/s: 10.4.10
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Philip orleans Assignee: Sergei Golubchik
Resolution: Duplicate Votes: 0
Labels: None
Environment:

Linux


Issue Links:
Duplicate
is duplicated by MDEV-21331 installation fails in an server with ... Closed

 Description   

this fails over and over in Ubuntu 19.10, a platform supported. The installation is from repositories.

apt -y install mariadb-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  galera-4 libcgi-fast-perl libcgi-pm-perl libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl libhtml-parser-perl libhtml-tagset-perl
  libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libmariadb3 libmysqlclient21 libterm-readkey-perl libtimedate-perl
  liburi-perl mariadb-client-10.4 mariadb-client-core-10.4 mariadb-common mariadb-server-10.4 mariadb-server-core-10.4 mysql-common socat
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx mariadb-test tinyca
The following NEW packages will be installed:
  galera-4 libcgi-fast-perl libcgi-pm-perl libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl libhtml-parser-perl libhtml-tagset-perl
  libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libmariadb3 libmysqlclient21 libterm-readkey-perl libtimedate-perl
  liburi-perl mariadb-client-10.4 mariadb-client-core-10.4 mariadb-common mariadb-server mariadb-server-10.4 mariadb-server-core-10.4 mysql-common socat
0 upgraded, 27 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/28.6 MB of archives.
After this operation, 224 MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 113568 files and directories currently installed.)
Preparing to unpack .../0-mysql-common_1%3a10.4.12+maria~eoan_all.deb ...
Unpacking mysql-common (1:10.4.12+maria~eoan) ...
Selecting previously unselected package mariadb-common.
Preparing to unpack .../1-mariadb-common_1%3a10.4.12+maria~eoan_all.deb ...
Unpacking mariadb-common (1:10.4.12+maria~eoan) ...
Selecting previously unselected package galera-4.
Preparing to unpack .../2-galera-4_26.4.3-eoan_amd64.deb ...
Unpacking galera-4 (26.4.3-eoan) ...
Selecting previously unselected package libdbi-perl:amd64.
Preparing to unpack .../3-libdbi-perl_1.642-1_amd64.deb ...
Unpacking libdbi-perl:amd64 (1.642-1) ...
Selecting previously unselected package libmariadb3:amd64.
Preparing to unpack .../4-libmariadb3_1%3a10.4.12+maria~eoan_amd64.deb ...
Unpacking libmariadb3:amd64 (1:10.4.12+maria~eoan) ...
Selecting previously unselected package mariadb-client-core-10.4.
Preparing to unpack .../5-mariadb-client-core-10.4_1%3a10.4.12+maria~eoan_amd64.deb ...
Unpacking mariadb-client-core-10.4 (1:10.4.12+maria~eoan) ...
Selecting previously unselected package mariadb-client-10.4.
Preparing to unpack .../6-mariadb-client-10.4_1%3a10.4.12+maria~eoan_amd64.deb ...
Unpacking mariadb-client-10.4 (1:10.4.12+maria~eoan) ...
Selecting previously unselected package mariadb-server-core-10.4.
Preparing to unpack .../7-mariadb-server-core-10.4_1%3a10.4.12+maria~eoan_amd64.deb ...
Unpacking mariadb-server-core-10.4 (1:10.4.12+maria~eoan) ...
Selecting previously unselected package socat.
Preparing to unpack .../8-socat_1.7.3.2-2ubuntu3_amd64.deb ...
Unpacking socat (1.7.3.2-2ubuntu3) ...
Setting up mysql-common (1:10.4.12+maria~eoan) ...
Setting up mariadb-common (1:10.4.12+maria~eoan) ...
(Reading database ... 113958 files and directories currently installed.)
Preparing to unpack .../00-mariadb-server-10.4_1%3a10.4.12+maria~eoan_amd64.deb ...
Failed to stop mysql.service: Unit mysql.service not loaded.
'systemctl stop mysql' returned 5
There is a MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!
dpkg: error processing archive /tmp/apt-dpkg-install-jrBfdt/00-mariadb-server-10.4_1%3a10.4.12+maria~eoan_amd64.deb (--unpack):
 new mariadb-server-10.4 package pre-installation script subprocess returned error exit status 1
Selecting previously unselected package libhtml-tagset-perl.
Preparing to unpack .../01-libhtml-tagset-perl_3.20-3_all.deb ...
Unpacking libhtml-tagset-perl (3.20-3) ...
Selecting previously unselected package liburi-perl.
Preparing to unpack .../02-liburi-perl_1.76-1_all.deb ...
Unpacking liburi-perl (1.76-1) ...
Selecting previously unselected package libhtml-parser-perl.
Preparing to unpack .../03-libhtml-parser-perl_3.72-3build2_amd64.deb ...
Unpacking libhtml-parser-perl (3.72-3build2) ...
Selecting previously unselected package libcgi-pm-perl.
Preparing to unpack .../04-libcgi-pm-perl_4.44-1_all.deb ...
Unpacking libcgi-pm-perl (4.44-1) ...
Selecting previously unselected package libfcgi-perl.
Preparing to unpack .../05-libfcgi-perl_0.78-2build2_amd64.deb ...
Unpacking libfcgi-perl (0.78-2build2) ...
Selecting previously unselected package libcgi-fast-perl.
Preparing to unpack .../06-libcgi-fast-perl_1%3a2.15-1_all.deb ...
Unpacking libcgi-fast-perl (1:2.15-1) ...
Selecting previously unselected package libmysqlclient21:amd64.
Preparing to unpack .../07-libmysqlclient21_8.0.19-0ubuntu0.19.10.3_amd64.deb ...
Unpacking libmysqlclient21:amd64 (8.0.19-0ubuntu0.19.10.3) ...
Selecting previously unselected package libdbd-mysql-perl:amd64.
Preparing to unpack .../08-libdbd-mysql-perl_4.050-2build1_amd64.deb ...
Unpacking libdbd-mysql-perl:amd64 (4.050-2build1) ...
Selecting previously unselected package libencode-locale-perl.
Preparing to unpack .../09-libencode-locale-perl_1.05-1_all.deb ...
Unpacking libencode-locale-perl (1.05-1) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../10-libhtml-template-perl_2.97-1_all.deb ...
Unpacking libhtml-template-perl (2.97-1) ...
Selecting previously unselected package libtimedate-perl.
Preparing to unpack .../11-libtimedate-perl_2.3000-2_all.deb ...
Unpacking libtimedate-perl (2.3000-2) ...
Selecting previously unselected package libhttp-date-perl.
Preparing to unpack .../12-libhttp-date-perl_6.02-1_all.deb ...
Unpacking libhttp-date-perl (6.02-1) ...
Selecting previously unselected package libio-html-perl.
Preparing to unpack .../13-libio-html-perl_1.001-1_all.deb ...
Unpacking libio-html-perl (1.001-1) ...
Selecting previously unselected package liblwp-mediatypes-perl.
Preparing to unpack .../14-liblwp-mediatypes-perl_6.04-1_all.deb ...
Unpacking liblwp-mediatypes-perl (6.04-1) ...
Selecting previously unselected package libhttp-message-perl.
Preparing to unpack .../15-libhttp-message-perl_6.18-1_all.deb ...
Unpacking libhttp-message-perl (6.18-1) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../16-libterm-readkey-perl_2.38-1_amd64.deb ...
Unpacking libterm-readkey-perl (2.38-1) ...
Selecting previously unselected package mariadb-server.
Preparing to unpack .../17-mariadb-server_1%3a10.4.12+maria~eoan_all.deb ...
Unpacking mariadb-server (1:10.4.12+maria~eoan) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-jrBfdt/00-mariadb-server-10.4_1%3a10.4.12+maria~eoan_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)



 Comments   
Comment by Sergei Golubchik [ 2020-03-01 ]

The error is

Failed to stop mysql.service: Unit mysql.service not loaded.
'systemctl stop mysql' returned 5
There is a MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!

And the code that does it is (simplified)

    if ! pgrep -x mysqld > /dev/null; then return; fi
    systemctl stop mysql

You must have a running mysqld process that pgrep finds, but it wasn't started via systemd. That's why installation fails.

Comment by Philip orleans [ 2020-03-01 ]

This is the same issue that I reported long ago. If the server has
containers, those containers have MariaDB installed, then the installation
fails.
The installer needs to check if the mysqld process belongs to the server
and not to a container.
Nearly every server now is using containers for mission-critical apps, and
we cannot stop them to install MariaDB

On Sun, Mar 1, 2020 at 10:23 AM Sergei Golubchik (Jira) <jira@mariadb.org>

Comment by Sergei Golubchik [ 2020-03-01 ]

Ah, thanks. I'll close it as a duplicate and raise the priority of the other one.

Generated at Thu Feb 08 09:10:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.