[Bug 1859773] Re: Apache DBD Auth not working with mysql Focal 20.04
Andreas Hasenack
andreas at canonical.com
Wed Mar 4 20:17:28 UTC 2020
PPA with builds for eoan and focal:
https://launchpad.net/~ahasenack/+archive/ubuntu/mysql8-my-init/
Note: focal build does not have proposed enabled.
** Changed in: apr-util (Ubuntu Focal)
Assignee: (unassigned) => Andreas Hasenack (ahasenack)
** Changed in: apr-util (Ubuntu Focal)
Status: Triaged => In Progress
** Changed in: apr-util (Ubuntu Eoan)
Assignee: (unassigned) => Andreas Hasenack (ahasenack)
** Changed in: apr-util (Ubuntu Eoan)
Status: Triaged => In Progress
** Description changed:
+ [Impact]
+
+ * An explanation of the effects of the bug on users and
+
+ * justification for backporting the fix to the stable release.
+
+ * In addition, it is helpful, but not required, to include an
+ explanation of how the upload fixes this bug.
+
+ [Test Case]
+
+ * detailed instructions how to reproduce the bug
+
+ * these should allow someone who is not familiar with the affected
+ package to reproduce the bug and verify that the updated package fixes
+ the problem.
+
+ [Regression Potential]
+
+ * discussion of how regressions are most likely to manifest as a result
+ of this change.
+
+ * It is assumed that any SRU candidate patch is well-tested before
+ upload and has a low overall risk of regression, but it's important
+ to make the effort to think about what ''could'' happen in the
+ event of a regression.
+
+ * This both shows the SRU team that the risks have been considered,
+ and provides guidance to testers in regression-testing the SRU.
+
+ [Other Info]
+
+ * Anything else you think is useful to include
+ * Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board
+ * and address these questions in advance
+
+ [Original Description]
+
Using Apache DBD auth for MySQL server 8 causes an error in Focal 20.04
Same setup is working fine in 16.04 and 18.04
The following line in Apache2/conf-enabled/ causes the error:
DBDriver mysql
apache start failed:
apachectl[1188]: Can't load driver file apr_dbd_mysql.so
The file exists in
/usr/lib/x86_64-linux-gnu/apr-util-1/apr_dbd_mysql.so
linking the file to
/lib/apache2/modules/
doesn't change the error message
** Summary changed:
- Apache DBD Auth not working with mysql Focal 20.04
+ Apache DBD Auth not working with mysql
** Description changed:
[Impact]
+ The MySQL dbd driver fails to load into apache. This causes apache2 to fail to start if it's configured in this way.
- * An explanation of the effects of the bug on users and
+ Since MySQL 8.0.2[1], the my_init() function is no longer exported, and
+ it's not expected that clients will call it.
- * justification for backporting the fix to the stable release.
+ Confirming that, the current build logs for apr-util show:
+ /home/ubuntu/deb/apr-util/apr-util-1.6.1/dbd/apr_dbd_mysql.c:1267:5: warning: implicit declaration of function ‘my_init’; did you mean ‘mysql_init’? [-Wimplicit-function-declaration]
+ 1267 | my_init();
+ | ^~~~~~~
+ | mysql_init
- * In addition, it is helpful, but not required, to include an
- explanation of how the upload fixes this bug.
+ Furthermore, they also show[2] that loading the mysql driver failed, but
+ that doesn't cause the build to fail (unknown reason: not addressed in
+ this update):
+
+ (...)
+ Loaded pgsql driver OK.
+ Failed to open pgsql[]
+ Failed to load driver file apr_dbd_mysql.so <<<<<<<
+ Loaded sqlite3 driver OK.
+ (...)
+
+ The fix is to not call my_init(). This was confirmed with MySQL
+ upstream.
+
[Test Case]
- * detailed instructions how to reproduce the bug
+ * detailed instructions how to reproduce the bug
- * these should allow someone who is not familiar with the affected
- package to reproduce the bug and verify that the updated package fixes
- the problem.
+ * these should allow someone who is not familiar with the affected
+ package to reproduce the bug and verify that the updated package fixes
+ the problem.
[Regression Potential]
- * discussion of how regressions are most likely to manifest as a result
+ * discussion of how regressions are most likely to manifest as a result
of this change.
- * It is assumed that any SRU candidate patch is well-tested before
- upload and has a low overall risk of regression, but it's important
- to make the effort to think about what ''could'' happen in the
- event of a regression.
+ * It is assumed that any SRU candidate patch is well-tested before
+ upload and has a low overall risk of regression, but it's important
+ to make the effort to think about what ''could'' happen in the
+ event of a regression.
- * This both shows the SRU team that the risks have been considered,
- and provides guidance to testers in regression-testing the SRU.
+ * This both shows the SRU team that the risks have been considered,
+ and provides guidance to testers in regression-testing the SRU.
[Other Info]
-
- * Anything else you think is useful to include
- * Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board
- * and address these questions in advance
+
+ * Anything else you think is useful to include
+ * Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board
+ * and address these questions in advance
[Original Description]
Using Apache DBD auth for MySQL server 8 causes an error in Focal 20.04
Same setup is working fine in 16.04 and 18.04
The following line in Apache2/conf-enabled/ causes the error:
DBDriver mysql
apache start failed:
apachectl[1188]: Can't load driver file apr_dbd_mysql.so
The file exists in
/usr/lib/x86_64-linux-gnu/apr-util-1/apr_dbd_mysql.so
linking the file to
/lib/apache2/modules/
doesn't change the error message
** Description changed:
[Impact]
The MySQL dbd driver fails to load into apache. This causes apache2 to fail to start if it's configured in this way.
Since MySQL 8.0.2[1], the my_init() function is no longer exported, and
it's not expected that clients will call it.
Confirming that, the current build logs for apr-util show:
/home/ubuntu/deb/apr-util/apr-util-1.6.1/dbd/apr_dbd_mysql.c:1267:5: warning: implicit declaration of function ‘my_init’; did you mean ‘mysql_init’? [-Wimplicit-function-declaration]
- 1267 | my_init();
- | ^~~~~~~
- | mysql_init
+ 1267 | my_init();
+ | ^~~~~~~
+ | mysql_init
Furthermore, they also show[2] that loading the mysql driver failed, but
that doesn't cause the build to fail (unknown reason: not addressed in
this update):
(...)
Loaded pgsql driver OK.
Failed to open pgsql[]
Failed to load driver file apr_dbd_mysql.so <<<<<<<
Loaded sqlite3 driver OK.
(...)
The fix is to not call my_init(). This was confirmed with MySQL
upstream.
-
[Test Case]
* detailed instructions how to reproduce the bug
* these should allow someone who is not familiar with the affected
package to reproduce the bug and verify that the updated package fixes
the problem.
[Regression Potential]
* discussion of how regressions are most likely to manifest as a result
of this change.
* It is assumed that any SRU candidate patch is well-tested before
upload and has a low overall risk of regression, but it's important
to make the effort to think about what ''could'' happen in the
event of a regression.
* This both shows the SRU team that the risks have been considered,
and provides guidance to testers in regression-testing the SRU.
[Other Info]
* Anything else you think is useful to include
* Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board
* and address these questions in advance
[Original Description]
Using Apache DBD auth for MySQL server 8 causes an error in Focal 20.04
Same setup is working fine in 16.04 and 18.04
The following line in Apache2/conf-enabled/ causes the error:
DBDriver mysql
apache start failed:
apachectl[1188]: Can't load driver file apr_dbd_mysql.so
The file exists in
/usr/lib/x86_64-linux-gnu/apr-util-1/apr_dbd_mysql.so
linking the file to
/lib/apache2/modules/
doesn't change the error message
+
+
+
+ 1. https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-2.html
+ 2. https://launchpadlibrarian.net/436958095/buildlog_ubuntu-eoan-amd64.apr-util_1.6.1-4build1_BUILDING.txt.gz
** Description changed:
[Impact]
The MySQL dbd driver fails to load into apache. This causes apache2 to fail to start if it's configured in this way.
Since MySQL 8.0.2[1], the my_init() function is no longer exported, and
it's not expected that clients will call it.
Confirming that, the current build logs for apr-util show:
/home/ubuntu/deb/apr-util/apr-util-1.6.1/dbd/apr_dbd_mysql.c:1267:5: warning: implicit declaration of function ‘my_init’; did you mean ‘mysql_init’? [-Wimplicit-function-declaration]
1267 | my_init();
| ^~~~~~~
| mysql_init
Furthermore, they also show[2] that loading the mysql driver failed, but
that doesn't cause the build to fail (unknown reason: not addressed in
this update):
(...)
Loaded pgsql driver OK.
Failed to open pgsql[]
Failed to load driver file apr_dbd_mysql.so <<<<<<<
Loaded sqlite3 driver OK.
(...)
The fix is to not call my_init(). This was confirmed with MySQL
upstream.
[Test Case]
+ * install and enable the dbd authentication module
+ sudo apt update
+ sudo apt install apache2 libaprutil1-dbd-mysql -y
+ sudo a2enmod authn_dbd
+ sudo systemctl restart apache2
- * detailed instructions how to reproduce the bug
+ * confirm apache is still working:
+ curl localhost
- * these should allow someone who is not familiar with the affected
- package to reproduce the bug and verify that the updated package fixes
- the problem.
+ * now enable the mysql driver
+ echo DBDriver mysql | sudo tee /etc/apache2/conf-available/dbd_mysql.conf
+ sudo a2enconf dbd_mysql
+
+ * confirm error when restarting apache
+ systemctl restart apache2
+
[Regression Potential]
* discussion of how regressions are most likely to manifest as a result
of this change.
* It is assumed that any SRU candidate patch is well-tested before
upload and has a low overall risk of regression, but it's important
to make the effort to think about what ''could'' happen in the
event of a regression.
* This both shows the SRU team that the risks have been considered,
and provides guidance to testers in regression-testing the SRU.
[Other Info]
* Anything else you think is useful to include
* Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board
* and address these questions in advance
[Original Description]
Using Apache DBD auth for MySQL server 8 causes an error in Focal 20.04
Same setup is working fine in 16.04 and 18.04
The following line in Apache2/conf-enabled/ causes the error:
DBDriver mysql
apache start failed:
apachectl[1188]: Can't load driver file apr_dbd_mysql.so
The file exists in
/usr/lib/x86_64-linux-gnu/apr-util-1/apr_dbd_mysql.so
linking the file to
/lib/apache2/modules/
doesn't change the error message
-
-
1. https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-2.html
2. https://launchpadlibrarian.net/436958095/buildlog_ubuntu-eoan-amd64.apr-util_1.6.1-4build1_BUILDING.txt.gz
** Description changed:
[Impact]
The MySQL dbd driver fails to load into apache. This causes apache2 to fail to start if it's configured in this way.
Since MySQL 8.0.2[1], the my_init() function is no longer exported, and
it's not expected that clients will call it.
Confirming that, the current build logs for apr-util show:
/home/ubuntu/deb/apr-util/apr-util-1.6.1/dbd/apr_dbd_mysql.c:1267:5: warning: implicit declaration of function ‘my_init’; did you mean ‘mysql_init’? [-Wimplicit-function-declaration]
1267 | my_init();
| ^~~~~~~
| mysql_init
Furthermore, they also show[2] that loading the mysql driver failed, but
that doesn't cause the build to fail (unknown reason: not addressed in
this update):
(...)
Loaded pgsql driver OK.
Failed to open pgsql[]
Failed to load driver file apr_dbd_mysql.so <<<<<<<
Loaded sqlite3 driver OK.
(...)
The fix is to not call my_init(). This was confirmed with MySQL
upstream.
[Test Case]
* install and enable the dbd authentication module
sudo apt update
sudo apt install apache2 libaprutil1-dbd-mysql -y
sudo a2enmod authn_dbd
sudo systemctl restart apache2
* confirm apache is still working:
curl localhost
* now enable the mysql driver
echo DBDriver mysql | sudo tee /etc/apache2/conf-available/dbd_mysql.conf
sudo a2enconf dbd_mysql
* confirm error when restarting apache
systemctl restart apache2
+ With the fixed packages, the restart above works just fine.
+
[Regression Potential]
* discussion of how regressions are most likely to manifest as a result
of this change.
* It is assumed that any SRU candidate patch is well-tested before
upload and has a low overall risk of regression, but it's important
to make the effort to think about what ''could'' happen in the
event of a regression.
* This both shows the SRU team that the risks have been considered,
and provides guidance to testers in regression-testing the SRU.
[Other Info]
* Anything else you think is useful to include
* Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board
* and address these questions in advance
[Original Description]
Using Apache DBD auth for MySQL server 8 causes an error in Focal 20.04
Same setup is working fine in 16.04 and 18.04
The following line in Apache2/conf-enabled/ causes the error:
DBDriver mysql
apache start failed:
apachectl[1188]: Can't load driver file apr_dbd_mysql.so
The file exists in
/usr/lib/x86_64-linux-gnu/apr-util-1/apr_dbd_mysql.so
linking the file to
/lib/apache2/modules/
doesn't change the error message
1. https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-2.html
2. https://launchpadlibrarian.net/436958095/buildlog_ubuntu-eoan-amd64.apr-util_1.6.1-4build1_BUILDING.txt.gz
** Description changed:
[Impact]
The MySQL dbd driver fails to load into apache. This causes apache2 to fail to start if it's configured in this way.
Since MySQL 8.0.2[1], the my_init() function is no longer exported, and
it's not expected that clients will call it.
Confirming that, the current build logs for apr-util show:
/home/ubuntu/deb/apr-util/apr-util-1.6.1/dbd/apr_dbd_mysql.c:1267:5: warning: implicit declaration of function ‘my_init’; did you mean ‘mysql_init’? [-Wimplicit-function-declaration]
1267 | my_init();
| ^~~~~~~
| mysql_init
Furthermore, they also show[2] that loading the mysql driver failed, but
that doesn't cause the build to fail (unknown reason: not addressed in
this update):
(...)
Loaded pgsql driver OK.
Failed to open pgsql[]
Failed to load driver file apr_dbd_mysql.so <<<<<<<
Loaded sqlite3 driver OK.
(...)
The fix is to not call my_init(). This was confirmed with MySQL
upstream.
[Test Case]
* install and enable the dbd authentication module
sudo apt update
sudo apt install apache2 libaprutil1-dbd-mysql -y
sudo a2enmod authn_dbd
sudo systemctl restart apache2
* confirm apache is still working:
curl localhost
* now enable the mysql driver
echo DBDriver mysql | sudo tee /etc/apache2/conf-available/dbd_mysql.conf
sudo a2enconf dbd_mysql
* confirm error when restarting apache
- systemctl restart apache2
+ sudo systemctl restart apache2
With the fixed packages, the restart above works just fine.
-
[Regression Potential]
* discussion of how regressions are most likely to manifest as a result
of this change.
* It is assumed that any SRU candidate patch is well-tested before
upload and has a low overall risk of regression, but it's important
to make the effort to think about what ''could'' happen in the
event of a regression.
* This both shows the SRU team that the risks have been considered,
and provides guidance to testers in regression-testing the SRU.
[Other Info]
* Anything else you think is useful to include
* Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board
* and address these questions in advance
[Original Description]
Using Apache DBD auth for MySQL server 8 causes an error in Focal 20.04
Same setup is working fine in 16.04 and 18.04
The following line in Apache2/conf-enabled/ causes the error:
DBDriver mysql
apache start failed:
apachectl[1188]: Can't load driver file apr_dbd_mysql.so
The file exists in
/usr/lib/x86_64-linux-gnu/apr-util-1/apr_dbd_mysql.so
linking the file to
/lib/apache2/modules/
doesn't change the error message
1. https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-2.html
2. https://launchpadlibrarian.net/436958095/buildlog_ubuntu-eoan-amd64.apr-util_1.6.1-4build1_BUILDING.txt.gz
** Description changed:
[Impact]
The MySQL dbd driver fails to load into apache. This causes apache2 to fail to start if it's configured in this way.
Since MySQL 8.0.2[1], the my_init() function is no longer exported, and
it's not expected that clients will call it.
Confirming that, the current build logs for apr-util show:
/home/ubuntu/deb/apr-util/apr-util-1.6.1/dbd/apr_dbd_mysql.c:1267:5: warning: implicit declaration of function ‘my_init’; did you mean ‘mysql_init’? [-Wimplicit-function-declaration]
1267 | my_init();
| ^~~~~~~
| mysql_init
Furthermore, they also show[2] that loading the mysql driver failed, but
that doesn't cause the build to fail (unknown reason: not addressed in
this update):
(...)
Loaded pgsql driver OK.
Failed to open pgsql[]
Failed to load driver file apr_dbd_mysql.so <<<<<<<
Loaded sqlite3 driver OK.
(...)
The fix is to not call my_init(). This was confirmed with MySQL
upstream.
[Test Case]
* install and enable the dbd authentication module
sudo apt update
sudo apt install apache2 libaprutil1-dbd-mysql -y
sudo a2enmod authn_dbd
sudo systemctl restart apache2
* confirm apache is still working:
curl localhost
* now enable the mysql driver
echo DBDriver mysql | sudo tee /etc/apache2/conf-available/dbd_mysql.conf
sudo a2enconf dbd_mysql
* confirm error when restarting apache
sudo systemctl restart apache2
With the fixed packages, the restart above works just fine.
[Regression Potential]
-
- * discussion of how regressions are most likely to manifest as a result
- of this change.
-
- * It is assumed that any SRU candidate patch is well-tested before
- upload and has a low overall risk of regression, but it's important
- to make the effort to think about what ''could'' happen in the
- event of a regression.
-
- * This both shows the SRU team that the risks have been considered,
- and provides guidance to testers in regression-testing the SRU.
+ A deprecated initialization function isn't being called anymore. This SRU isn't testing actual authentication using MySQL, just that the module now loads. There could be specific details in apr-utils that were being handled by my_init() before, and now aren't.
[Other Info]
+ Patch wasn't upstreamed because it should better check when to call my_init() and when not, i.e., check the mysql version properly and decide.
- * Anything else you think is useful to include
- * Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board
- * and address these questions in advance
[Original Description]
-
Using Apache DBD auth for MySQL server 8 causes an error in Focal 20.04
Same setup is working fine in 16.04 and 18.04
The following line in Apache2/conf-enabled/ causes the error:
DBDriver mysql
apache start failed:
apachectl[1188]: Can't load driver file apr_dbd_mysql.so
The file exists in
/usr/lib/x86_64-linux-gnu/apr-util-1/apr_dbd_mysql.so
linking the file to
/lib/apache2/modules/
doesn't change the error message
1. https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-2.html
2. https://launchpadlibrarian.net/436958095/buildlog_ubuntu-eoan-amd64.apr-util_1.6.1-4build1_BUILDING.txt.gz
--
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1859773
Title:
Apache DBD Auth not working with mysql
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apr-util/+bug/1859773/+subscriptions
More information about the Ubuntu-server-bugs
mailing list