Closed Bug 831316 Opened 12 years ago Closed 12 years ago

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

Categories

(Data & BI Services Team :: DB: MySQL, task)

x86
macOS
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: scabral, Assigned: bjohnson)

Details

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
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 ~]#
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.
Adding rtucker because he knows him some Perl.
I do not know perl
sorry! REmoving you, adding gcox.....was he the perl guy?
/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.
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: server-ops-database → bjohnson
FWIW this is still happening.
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
Closed: 12 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.