• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Forwarded to devs Mariadb 10.6 /etc/my.cnf issue

Dave W

Regular Pleskian
Username:

TITLE

Mariadb 10.6 /etc/my.cnf issue

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Product version: Plesk Obsidian 18.0.44.3
OS version: AlmaLinux 8.6 x86_64
Build date: 2022/06/14 18:00
Revision: 706e0d50fa11eb71b2f8c735856695131f29ef86

PROBLEM DESCRIPTION

Clean install of AlmaLinux, no db server installed. We add the repo for MariaDB 10.6 to the server;

cat << EOF > /etc/yum.repos.d/MariaDB.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/$mariadb_version/rhel8-amd64
module_hotfixes=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF


so that the plesk installer will add Mariadb 10.6 while installing.

When plesk installs Mariadb fails to start because the my.cnf file has
bind-address = ::ffff:127.0.0.1
which is not compatible with MariaDB 10.6 and Mariadb fails to start.

Jun 30 03:32:25 alma.myhost.ie mariadbd[44410]: 2022-06-30 3:32:25 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Jun 30 03:32:25 alma.myhost.ie mariadbd[44410]: 2022-06-30 3:32:25 0 [Note] Server socket created on IP: '127.0.0.1'.
Jun 30 03:32:25 alma.myhost.ie mariadbd[44410]: 2022-06-30 3:32:25 0 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 22: Invalid argument
Jun 30 03:32:25 alma.myhost.ie mariadbd[44410]: 2022-06-30 3:32:25 0 [ERROR] Do you already have another server running on port: 3306 ?
Jun 30 03:32:25 alma.myhost.ie mariadbd[44410]: 2022-06-30 3:32:25 0 [ERROR] Aborting


STEPS TO REPRODUCE

Basic install of AlmaLinux
We add the repo for Mariadb 10.6
Run the plesk installer
MariaDB fails to start.

ACTUAL RESULT

From logs it seems the installer is installing a my.cnf from the Plesk repo

mariadb-server-3:10.3.32-2.module_el8.6.0+2867+72759d2f

which is not compatible with MariaDB 10.6

Further on the install logs:

Installing: MariaDB-shared-10.6.8-1.el8.x86_64 [6/282] Done
Running scriptlet: MariaDB-shared-10.6.8-1.el8.x86_64 [6/282] Done
Running scriptlet: MariaDB-common-10.6.8-1.el8.x86_64 [7/282] Done
Installing: MariaDB-common-10.6.8-1.el8.x86_64 [7/282]...
Installing: MariaDB-common-10.6.8-1.el8.x86_64 [7/282] Done
warning: /etc/my.cnf created as /etc/my.cnf.rpmnew

rpm scriptlet: warning: /etc/my.cnf created as /etc/my.cnf.rpmnew
Running scriptlet: MariaDB-common-10.6.8-1.el8.x86_64 [7/282] Done

So it seems that the correct my.cnf for MariaDB10.6 is installed as /etc/my.cnf.rpmnew

EXPECTED RESULT

Plesk would install a MariaDB 10.6 compatible my.cnf

ANY ADDITIONAL INFORMATION

The fix is to remove change the line

bind-address = ::ffff:127.0.0.1
to
bind-address = 127.0.0.1
in /etc/my.cnf

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
@Dave W we can't confirm the bug:

Code:
~]# systemctl status mariadb
● mariadb.service - MariaDB 10.6.8 database server
   Loaded: loaded (/usr/lib/systemd/system/./mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) since Fri 2022-07-08 11:28:42 +07; 46min ago
     Docs: man:mariadbd(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 5766 (mariadbd)
   Status: "Taking your SQL requests now..."
    Tasks: 10 (limit: 4911)
   Memory: 42.9M
   CGroup: /system.slice/mariadb.service
           └─5766 /usr/sbin/mariadbd
~]# plesk -v
Product version: Plesk Obsidian 18.0.46.0
     OS version: AlmaLinux 8.6 x86_64
     Build date: 2022/07/07 14:00
       Revision: 6c532f20cbc59c42ebf25f081144731f869726fc
 
 ~]# grep -R bind /etc/my.cnf*
/etc/my.cnf:bind-address = 127.0.0.1
/etc/my.cnf.d/server.cnf:#bind-address=0.0.0.0

Note, that bind-address = 127.0.0.1 was added to /etc/my.cnf automatically by Plesk installer due to preventing the issue with starting when bind-address = ::ffff:127.0.0.1

So, we need more details for reproducing this issue.
 
Hi Igor,

Ive just tested this again;
AlmaLinux 8.6
Default Virtuozzo EZ OS template.

Default /etc/my.cnf from the OS before anything installed:
Code:
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

Create Mariadb repo:
Code:
cat << EOF > /etc/yum.repos.d/MariaDB.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.6/rhel8-amd64
module_hotfixes=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF

Install Plesk:
Code:
sh <(curl https://autoinstall.plesk.com/one-click-installer || wget -O - https://autoinstall.plesk.com/one-click-installer)

Examine my.cnf after install completes:
Code:
cat /etc/my.cnf
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

[mysqld]
sql_mode=ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
bind-address = ::ffff:127.0.0.1
local-infile=0

The install log shows the following (with line numbers)
Code:
   1022 Download mariadb-server-utils-10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64.rpm   1198310B [total 3649256/40958717B 5/31 files]
   1039 Download mariadb-server-10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64.rpm   16948474B [total 36722721/40958717B 22/31 files]
   1041 Download mariadb-common-10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64.rpm   64538B [total 39332871/40958717B 24/31 files]
   1042 Download mariadb-10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64.rpm   6309878B [total 40046230/40958717B 25/31 files]
   1043 Download mariadb-backup-10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64.rpm   6366342B [total 40394073/40958717B 26/31 files]
   1047 Download mariadb-gssapi-server-10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64.rpm   51634B [total 40925815/40958717B 30/31 files]
   1048 Download mariadb-errmsg-10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64.rpm   238978B [total 40959341/40958717B 31/31 files]

   1060 Installing: mariadb-common-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [3/31]...
   1061 Installing: mariadb-common-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [3/31] Done

   1076 Installing: mariadb-errmsg-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [11/31]...
   1077 Installing: mariadb-errmsg-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [11/31] Done
   1078 Installing: mariadb-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [12/31]...
   1079 Installing: mariadb-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [12/31] Done
   1080 Installing: mariadb-backup-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [13/31]...
   1081 Installing: mariadb-backup-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [13/31] Done
   1082 Installing: mariadb-gssapi-server-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [14/31]...
   1083 Installing: mariadb-gssapi-server-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [14/31] Done
   1084 Installing: mariadb-server-utils-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [15/31]...
   1085 Installing: mariadb-server-utils-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [15/31] Done
   1086 Running scriptlet: mariadb-server-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [16/31] Done
   1087 Installing: mariadb-server-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [16/31]...
   1088 Installing: mariadb-server-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [16/31] Done
   1089 Running scriptlet: mariadb-server-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [16/31] Done

So you can see that it installs MariaDB server 10.3 even though the repo for 10.6 is present.

Later in the logs:
Code:
   1141 Verifying: mariadb-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [14/31] Done
   1142 Verifying: mariadb-backup-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [15/31] Done
   1143 Verifying: mariadb-common-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [16/31] Done
   1144 Verifying: mariadb-errmsg-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [17/31] Done
   1145 Verifying: mariadb-gssapi-server-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [18/31] Done
   1146 Verifying: mariadb-server-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [19/31] Done
   1147 Verifying: mariadb-server-utils-3:10.3.32-2.module_el8.6.0+2867+72759d2f.x86_64 [20/31] Done

Then we get to the MariaDB 10.6 download and install;

Code:
   1205 Download MariaDB-backup-10.6.8-1.el8.x86_64.rpm   7366200B [total 31802209/276977927B 11/271 files]
   1230 Download MariaDB-common-10.6.8-1.el8.x86_64.rpm   90056B [total 82448816/276977927B 36/271 files]
   1236 Download MariaDB-client-10.6.8-1.el8.x86_64.rpm   15191076B 0:00:02 [total 89355310/276977927B 42/271 files]
   1245 Download MariaDB-shared-10.6.8-1.el8.x86_64.rpm   118372B [total 91500804/276977927B 51/271 files]
   1295 Download MariaDB-server-10.6.8-1.el8.x86_64.rpm   26579712B 0:00:02 [total 152202449/276977927B 101/271 files]


   1484 Running scriptlet: MariaDB-shared-10.6.8-1.el8.x86_64 [6/282] Done
   1485 Installing: MariaDB-shared-10.6.8-1.el8.x86_64 [6/282]...
   1486 Installing: MariaDB-shared-10.6.8-1.el8.x86_64 [6/282] Done
   1487 Running scriptlet: MariaDB-shared-10.6.8-1.el8.x86_64 [6/282] Done
   1488 Running scriptlet: MariaDB-common-10.6.8-1.el8.x86_64 [7/282] Done
   1489 Installing: MariaDB-common-10.6.8-1.el8.x86_64 [7/282]...
   1490 Installing: MariaDB-common-10.6.8-1.el8.x86_64 [7/282] Done
   1491 warning: /etc/my.cnf created as /etc/my.cnf.rpmnew
   1492
   1493 rpm scriptlet: warning: /etc/my.cnf created as /etc/my.cnf.rpmnew
   1494 Running scriptlet: MariaDB-common-10.6.8-1.el8.x86_64 [7/282] Done

To me it looks like the Plesk installer ignores the MariaDB repo and installs mariadb 10.3, the installer then proceeds to download and install mariadb 10.6, but it cannot create the correct /etc/my.cnf as the /etc/my.cnf from 10.3 exists and so it creates /etc/my.cnf.rpmnew

Am happy to provide access to this vps if required.

Dave_W
 
Thank you!
The root case is the packages below:
Code:
~]# rpm -qa|grep -i maria
mariadb-connector-c-config-3.1.11-2.el8_3.noarch
mariadb-connector-c-3.1.11-2.el8_3.x86_64
which are already installed inside VZ container.

There are no such packages at the VM installed from the official AlmaLinux8 ISO image.
Code:
~]# grep -iR maria /vz/template/almalinux/8/x86_64/config/*
/vz/template/almalinux/8/x86_64/config/app/mysql/default/packages:mariadb-server
/vz/template/almalinux/8/x86_64/config/app/mysql/default/packages:mariadb-devel
/vz/template/almalinux/8/x86_64/config/app/mysql/default/packages:mariadb-connector-c-devel
/vz/template/almalinux/8/x86_64/config/app/mysql/default/packages:mariadb-errmsg
This is the reason, why installer have to install MariaDB 10.3 first.

The bugreport PPPM-13640 to handle this situation, especially for VZ containers, has been created.
 
Did it though?
**Note:** Plesk Obsidian is installed inside a Virtuozzo container with MariaDB 10.3. To use a different MySQL implementation, pre-install it before installing Plesk.
 
Back
Top