Symptoms
- MariaDB failed to restart after the upgrade
- MariaDB was upgraded from version 10.5 or lower to version 10.6 or higher using upgrade tool in Tools & Settings > Database Servers
- Plesk runs on Debian-based OS (Debian or Ubuntu)
- Plesk interface and websites are inaccessible
-
The following error can be found in MariaDB service status, MariaDB log or system log:
CONFIG_TEXT: mariadbd[32685]: 2022-04-19 6:41:28 0 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 22: Invalid argument
mariadbd[32685]: 2022-04-19 6:41:28 0 [ERROR] Do you already have another server running on port: 3306 ?
mariadbd[32685]: 2022-04-19 6:41:28 0 [ERROR] Aborting
Cause
The bind-address
value in the MariaDB my.cnf
configuration file was set to bind-address = ::ffff:127.0.0.1
prior to the upgrade and was not changed by the upgrade tool. MariaDB after 10.6 does not allow to bind both ::1
and 127.0.0.1
via the setting bind-address = ::ffff:127.0.0.1
in the file /etc/my.cnf
.
This is caused by MariaDB bug MDEV-34191 originating from packaging changes on Debian-based systems which causes the package upgrade to restart MariaDB prematurely before configuration is updated.
Resolution
-
Connect to the Plesk server via SSH
-
Open the file in a text editor. In this example, we are using the vi editor:
# vi /etc/my.cnf
-
Change the
bind-address
setting:
fromCONFIG_TEXT: bind-address = ::ffff:127.0.0.1
to
CONFIG_TEXT: bind-address = 127.0.0.1
-
Save the changes and close the file
-
Start the MariaDB service:
# systemctl restart mariadb
-
Upgrade the databases:
# mysql_upgrade -u admin -p`cat /etc/psa/.psa.shadow` --force
Note: As a workaround, the bind-address
value can be changed before updating to avoid the issue.
Comments
0 comments
Please sign in to leave a comment.