If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

do-check-backups failing on backup3.db.phx1 due to bad paths and INC

RESOLVED FIXED

Status

Data & BI Services Team
DB: MySQL
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: sheeri, Assigned: cyborgshadow)

Tracking

Details

(Reporter)

Description

5 years ago
Cron <root@backup3> /usr/bin/perl /data/backups/bin/do-check-backups > /var/run/backup-status.new && mv -f /var/run/backup-status.new /var/run/backup-status

install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 4) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
 at /data/backups/bin/do-check-backups line 44
(Reporter)

Comment 1

5 years ago
DBD::mysql is in /usr/lib64/perl5/DBD

So the fix is to make a softlink to /usr/local/lib64, which there's nothing in currently:

[root@backup3.db.phx1 ~]# ls /usr/local/lib64
[root@backup3.db.phx1 ~]# 

[root@backup3.db.phx1 ~]# ln -s /usr/lib64/perl5/ /usr/local/lib64/
[root@backup3.db.phx1 ~]# ls /usr/local/lib64
perl5
[root@backup3.db.phx1 ~]#
(Reporter)

Comment 2

5 years ago
Hrm, looks like we're still getting:

install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 4) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
 at /data/backups/bin/do-check-backups line 44

*sadface* Not sure what else to do.
(Reporter)

Comment 3

5 years ago
Adding rtucker because he knows him some Perl.
I do not know perl
(Reporter)

Comment 5

5 years ago
sorry! REmoving you, adding gcox.....was he the perl guy?

Comment 6

5 years ago
/usr/lib64/perl5 is in @INC, which means DBD/mysql.pm should be found there without the symlink.

That it's not is probably a PATHing issue buried in DBI as it goes looking for the right DBD.  Once you know what PATH is correct, you may want to consider adding something like
  $ENV{'PATH'} = '/usr/bin:/bin:/usr/sbin:/sbin:/yer/mom';
so that you always have exactly what you need.
(Assignee)

Comment 7

5 years ago
Attempted to solve this by setting ENV{'PATH'}. Confirmed it was printing and reading the right PATH but still not working.

Also ensured with a `perl -MDBD::mysql -e 1` and `perl -MDBI -e 1` that both modules were installed.

I'm going to test some cronnables when I get back this evening from my linux meetup.
(Assignee)

Updated

5 years ago
Assignee: server-ops-database → bjohnson
(Reporter)

Comment 8

5 years ago
FWIW this is still happening.
(Assignee)

Comment 9

5 years ago
This was not phx1....I spent like 20+ hours trying to debug this and never found any problems.

This was backup3.db.scl3. I fixed it today. It was missing the perl-DBD-MySQL and perl-DBI packages.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Product: mozilla.org → Data & BI Services Team
You need to log in before you can comment on or make changes to this bug.