Freeradius can't connect to MySQL 8.0 from Debian Buster

classic Classic list List threaded Threaded
4 messages Options
| Threaded
Open this post in threaded view
|

Freeradius can't connect to MySQL 8.0 from Debian Buster

Users mailing list
Hello,

I have FreeRADIUS Version 3.0.17 is installed that comes by default with Debian 10.
When Freeradius is trying to connect to a remote MySQL 8.0 server, I get this error:

rlm_sql_mysql: libmysql version: 10.3.27
mysql {
tls {
}
warnings = "auto"
}
rlm_sql (sql): Attempting to connect to database "rad_db"
rlm_sql (sql): Initialising connection pool
pool {
start = 5
min = 3
max = 32
spare = 10
uses = 0
lifetime = 0
cleanup_interval = 30
idle_timeout = 60
retry_delay = 30
spread = no
}
rlm_sql (sql): Opening additional connection (0), 1 of 32 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Couldn't connect to MySQL server [hidden email]:rad_db
rlm_sql_mysql: MySQL error: Plugin caching_sha2_password could not be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
rlm_sql_mysql: Socket destructor called, closing socket
rlm_sql (sql): Opening connection failed (0)
rlm_sql (sql): Removing connection pool
/etc/freeradius/3.0/mods-enabled/sql[20]: Instantiation failed for module "sql"

Debian buster doesn't come with MySQL 8.0. So I have installed it manually:
MYSQL_8_file="mysql-apt-config_0.8.16-1_all.deb"
apt install gnupg -y
wget -c https://dev.mysql.com/get/${MYSQL_8_file}
dpkg -i ${MYSQL_8_file}
apt update
apt install mysql-client libmysqlclient-dev

The error message indicated that FreeRadius is looking for mariadb plugins.
I checked and there is no caching_sha2_password.so in the path /usr/lib/x86_64-linux-gnu/mariadb19/plugin/.

Any suggestions, please?
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Freeradius can't connect to MySQL 8.0 from Debian Buster

Bjørn Mork
Mark Antony via Freeradius-Users <[hidden email]>
writes:

> rlm_sql_mysql: MySQL error: Plugin caching_sha2_password could not be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory

I believe this is a Debian bug.  It's fixed in sid, but apparently not
in stable: https://bugs.debian.org/962597



Bjørn

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Freeradius can't connect to MySQL 8.0 from Debian Buster

Users mailing list
Thank you, Bjorn. Yes, this is it.

I'm already using the latest Debian 10.8, but the patch still isn't released.

That's really a bummer. So for now I have to compile MariaDB manually and place that file in the path then?

Mark


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, 14 March 2021 09:24, Bjørn Mork <[hidden email]> wrote:

> Mark Antony via Freeradius-Users [hidden email]
> writes:
>
> > rlm_sql_mysql: MySQL error: Plugin caching_sha2_password could not be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
>
> I believe this is a Debian bug. It's fixed in sid, but apparently not
> in stable: https://bugs.debian.org/962597
>
> Bjørn



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Freeradius can't connect to MySQL 8.0 from Debian Buster

Users mailing list
Great news. I managed to overcome this by installing the latest MariaDB:

apt install apt-transport-https
wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
chmod +x mariadb_repo_setup
./mariadb_repo_setup --mariadb-server-version="mariadb-10.5"
apt update
apt install mariadb-server
apt install mariadb-client

They both can be purged afterwards. The file is now available at /usr/lib/x86_64-linux-gnu/libmariadb3/plugin/caching_sha2_password.so


Thanks,




‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, 14 March 2021 09:53, Mark Antony via Freeradius-Users <[hidden email]> wrote:

> Thank you, Bjorn. Yes, this is it.
>
> I'm already using the latest Debian 10.8, but the patch still isn't released.
>
> That's really a bummer. So for now I have to compile MariaDB manually and place that file in the path then?
>
> Mark
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Sunday, 14 March 2021 09:24, Bjørn Mork [hidden email] wrote:
>
> > Mark Antony via Freeradius-Users [hidden email]
> > writes:
> >
> > > rlm_sql_mysql: MySQL error: Plugin caching_sha2_password could not be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
> >
> > I believe this is a Debian bug. It's fixed in sid, but apparently not
> > in stable: https://bugs.debian.org/962597
> > Bjørn
>
> --
>
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html