The attempts to run Percona toolkit programs are failing with following error, for example:
$ pt-heartbeat …
install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.
Compilation failed in require at (eval 37) line 3, line 1.
at /usr/bin/pt-heartbeat line 2964.
$
That happens on:
OS: AlmaLinux 9
Perl: This is perl 5, version 32, subversion 1 (v5.32.1) built for x86_64-linux-thread-multi
DBM: perl-DBD-MySQL.x86_64 1:4.050-4.el9 @pdps-8.0.36-release-x86_64
Percona toolkit: pt-heartbeat 3.6.0
Can anybody please advise on this matter?
With regards
Leszek Kotzian
Hello @Leszek_Kotzian,
AlmaLinux is not one of our supported operating systems. However, it looks like you need to install perl DBD::mysql from our repo, and update dbd::mysql to the latest versions. This is not an issue with pt-heartbeat, but an issue with your perl install.
I’m also having the same issue with Alma 9. If I use the version of the module from the Percona-Toolkit repository, it fails. If I use the stock alma 9 appstream version, it works.
]# yum install https://repo.almalinux.org/almalinux/9/AppStream/x86_64/os/Packages/perl-DBD-MySQL-4.050-13.el9.x86_64.rpm
Repository 'Percona-Toolkit' is missing name in configuration, using id.
Last metadata expiration check: 1:25:29 ago on Fri 06 Dec 2024 08:25:07 AM EST.
perl-DBD-MySQL-4.050-13.el9.x86_64.rpm 2.2 MB/s | 145 kB 00:00
Dependencies resolved.
===================================================================================================================================
Package Architecture Version Repository Size
===================================================================================================================================
Downgrading:
perl-DBD-MySQL x86_64 4.050-13.el9 @commandline 145 k
Transaction Summary
===================================================================================================================================
Downgrade 1 Package
# pt-show-grants
-- Grants dumped by pt-show-grants
-- Dumped from server Localhost via UNIX socket, MySQL 11.4.4-MariaDB-log at 2024-12-06 09:51:11
The issue is likely related to the MariaDB client library that is installed by default instead of MySQL’s. Please install percona-server-client package from Percona repository.
The reason for the issue was an outdated DBD::MySQL package in Percona repositories, thus broken Docker images. It has been fixed as part of Jira Please try again and let us know if you hit any issue with updated images.
perconalab/percona-toolkit doesn’t seem to have this problem.
Which should I be using??
perconalab/percona-toolkit, or percona/percona-toolkit ?
perconalab/percona-toolkit was updated 23 days ago percona/percona-toolkit was updated 22 days ago
Are they not the same thing?
Thank you.
EDIT - looks like perconalab/percona-toolkit is running 3.5.2, while the other runs 3.7.0. That could explain why the lab one doesn’t crash. The driver error is a regression in recent versions.
Could you please try with percona/percona-toolkit:3.7.0 and perconalab/percona-toolkit:3.7.0? They work for me:
sveta@s76:~/src/sveta$ docker run -it percona/percona-toolkit:3.7.0 bash
bash-5.1$ pt-align --version
pt-align 3.7.0
bash-5.1$ pt-heartbeat -D test --update h=127.0.0.1,P=12345,u=msandbox,p=msandbox
DBI connect('test;host=127.0.0.1;port=12345;mysql_read_default_group=client','msandbox',...) failed: Can't connect to MySQL server on '127.0.0.1:12345' (111) at /usr/bin/pt-heartbeat line 3043.
bash-5.1$ exit
exit
sveta@s76:~/src/sveta$ docker run -it perconalab/percona-toolkit:3.7.0 bash
bash-5.1$ pt-align --version
pt-align 3.7.0
bash-5.1$ pt-heartbeat -D test --update h=127.0.0.1,P=12345,u=msandbox,p=msandbox
DBI connect('test;host=127.0.0.1;port=12345;mysql_read_default_group=client','msandbox',...) failed: Can't connect to MySQL server on '127.0.0.1:12345' (111) at /usr/bin/pt-heartbeat line 3043.
bash-5.1$