mysql error log always contains errors with mysqlx when installing/upgrading

Bug #1964969 reported by Lena Voytek
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-8.0 (Ubuntu)
Fix Released
Undecided
Lena Voytek
Bionic
Invalid
Undecided
Unassigned
Focal
Fix Released
Undecided
Lena Voytek
Impish
Fix Released
Undecided
Lena Voytek
Jammy
Fix Released
Undecided
Lena Voytek

Bug Description

[Impact]

When mysql is installed or updated in Focal, Hirsute, Impish, or Jammy, mysqlx reports multiple errors, being unable to create a socket file.
These errors are often mistaken for causes of apport reports, which has made bug triage more difficult with mysql.
These errors could obscure others that show up in the future because it causes the initial mysqld run post-install to behave in an unintended manner.

Adding this fix will allow the mysqlx plugin to create the socket file during the upgrade process.

This is fixed by creating and setting the correct permissions for /var/run/mysqld ahead of time. This is where the socket file is created.

This fix was released in Jammy in version 8.0.28-0ubuntu1, originally connected to LP #1899248 before this was determined to be a different issue.

[Test Plan]

# lxc launch images:ubuntu/(jammy, impish, focal) test-failure
# lxc exec test-failure bash

# apt update && apt dist-upgrade -y

# apt install -y mysql-server

- After the initial install mysqlx errors will show up in the error log
# grep mysqlx /var/log/mysql/error.log

2022-03-15T14:16:55.472453Z 0 [ERROR] [MY-011292] [Server] Plugin mysqlx reported: 'Preparation of I/O interfaces failed, X Protocol won't be accessible'
2022-03-15T14:16:55.472531Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'
2022-03-15T14:16:58.399083Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'

[Where problems could occur]

Since the directory is preemptively created through the postinst file rather than the actual program, mysql may have issues if it does not expect the directory to exist beforehand.

Ownership of the directory is given to the mysql user/group, which matches the behavior of mysql in general, but should be looked at if permissions errors arise.

[Original Description]

Whenever mysql-server is installed or updated, /var/log/mysql/error.log will contain the following mysqlx errors:

[ERROR] [MY-011292] [Server] Plugin mysqlx reported: 'Preparation of I/O interfaces failed, X Protocol won't be accessible'
[ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'

followed by

[ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'

This is due to a folder permissions error with /var/run/mysqld during the post-install process.

Related branches

Revision history for this message
Lena Voytek (lvoytek) wrote :
Changed in mysql-8.0 (Ubuntu Jammy):
status: In Progress → Fix Released
Changed in mysql-8.0 (Ubuntu Impish):
status: New → In Progress
Changed in mysql-8.0 (Ubuntu Focal):
status: New → In Progress
Changed in mysql-8.0 (Ubuntu Bionic):
status: New → In Progress
assignee: nobody → Lena Voytek (lvoytek)
Changed in mysql-8.0 (Ubuntu Focal):
assignee: nobody → Lena Voytek (lvoytek)
Changed in mysql-8.0 (Ubuntu Impish):
assignee: nobody → Lena Voytek (lvoytek)
Changed in mysql-8.0 (Ubuntu Bionic):
status: In Progress → Confirmed
Lena Voytek (lvoytek)
description: updated
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Lena, or anyone else affected,

Accepted mysql-8.0 into impish-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mysql-8.0/8.0.28-0ubuntu0.21.10.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-impish to verification-done-impish. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-impish. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in mysql-8.0 (Ubuntu Impish):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-impish
Changed in mysql-8.0 (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Robie Basak (racb) wrote :

Hello Lena, or anyone else affected,

Accepted mysql-8.0 into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mysql-8.0/8.0.28-0ubuntu0.20.04.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Lena Voytek (lvoytek) wrote (last edit ):

Verified for focal on version 8.0.28-0ubuntu0.20.04.4 with the following test:

lxc launch images:ubuntu/focal test-mysql
lxc exec test-mysql bash

apt update && apt dist-upgrade -y

cat <<EOF >/etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list
# Enable Ubuntu proposed archive
deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe
EOF

apt update

apt install -y mysql-server

grep mysqlx /var/log/mysql/error.log

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Lena Voytek (lvoytek) wrote :

Verified for impish on version 8.0.28-0ubuntu0.21.10.4 with the following test:

lxc launch images:ubuntu/impish test-mysql
lxc exec test-mysql bash

apt update && apt dist-upgrade -y

cat <<EOF >/etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list
# Enable Ubuntu proposed archive
deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe
EOF

apt update

apt install -y mysql-server

grep mysqlx /var/log/mysql/error.log

tags: added: verification-done verification-done-impish
removed: verification-needed verification-needed-impish
Lena Voytek (lvoytek)
Changed in mysql-8.0 (Ubuntu Bionic):
status: Confirmed → Invalid
assignee: Lena Voytek (lvoytek) → nobody
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for mysql-8.0 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-8.0 - 8.0.28-0ubuntu0.21.10.4

---------------
mysql-8.0 (8.0.28-0ubuntu0.21.10.4) impish; urgency=medium

  * d/mysql-server-8.0.postinst:
    - Increase stop_server timeout so shutdowns that last up to 3 minutes do not
      trigger apport (LP: #1899248)
    - Create and add correct permissions to the mysql socket directory before
      running mysqld post-update. (LP: #1964969)

 -- Lena Voytek <email address hidden> Mon, 14 Mar 2022 07:35:49 -0700

Changed in mysql-8.0 (Ubuntu Impish):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-8.0 - 8.0.29-0ubuntu0.20.04.2

---------------
mysql-8.0 (8.0.29-0ubuntu0.20.04.2) focal-security; urgency=medium

  * SECURITY UPDATE: Update to 8.0.29 to fix security issues
    - debian/control, debian/tests/control: add libexpect-perl as required
      by new test.
    - debian/mysql-testsuite-8.0.install, debian/mysql-router.install:
      added new files.
    - CVE-2022-21412, CVE-2022-21413, CVE-2022-21414, CVE-2022-21415,
      CVE-2022-21417, CVE-2022-21418, CVE-2022-21423, CVE-2022-21425,
      CVE-2022-21427, CVE-2022-21435, CVE-2022-21436, CVE-2022-21437,
      CVE-2022-21438, CVE-2022-21440, CVE-2022-21444, CVE-2022-21451,
      CVE-2022-21452, CVE-2022-21454, CVE-2022-21457, CVE-2022-21459,
      CVE-2022-21460, CVE-2022-21462, CVE-2022-21478
  * d/rules: increase build-time test timeouts to fix test failures that
    were resulting in FTBFS.
  * d/rules: Disable parallel builds on arm64

 -- Marc Deslauriers <email address hidden> Mon, 02 May 2022 07:07:07 -0400

Changed in mysql-8.0 (Ubuntu Focal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.