You are here

Cannot populate via populate_db.pl Use of uninitialized value $mysql_ver

2 posts / 0 new
Last post
satoo
satoo's picture
Cannot populate via populate_db.pl Use of uninitialized value $mysql_ver
Versions: Sles 11SP3 opsview 3.20131016.0.14175-1.sles11-x86_64 mysql  Ver 14.14 Distrib 5.5.33, for Linux (x86_64) using readline 5.2 This is perl, v5.10.0 built for x86_64-linux-thread-multi   Command: /usr/local/nagios/bin/db_opsview db_install   Output: Use of uninitialized value $mysql_ver in pattern match (m//) at /usr/local/nagios/perl/lib/DBIx/Class/Storage/DBI/mysql.pm line 62. DBIx::Class::ResultSet::update_or_create(): DBI Connection failed: install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted. Compilation failed in require at (eval 1560) line 3.    at /usr/local/nagios/perl/lib/DBIx/Class/Storage/DBI.pm line 1275. at /usr/local/nagios/bin/../lib/Opsview/Utils/Plugins.pm line 127

 

Cannot populate via populate_db.pl   Whats wrong?   btw:zypper install opsview reported: Problem: nothing provides apache2-mod_php5 needed by opsview-web-3.20131016.0.14175-1.sles11.x86_64  but official apache2-mod_php53 was installed
awijntje
awijntje's picture
Re: Cannot populate via populate_db.pl Use of uninitialized ...

he there,

so a quick search showed two possible causes for this error (found them on cpan where DBIx is maintained).

In the fist case it was caused because the Perl DBD::MySQL package was not installed (causing DBIx to fail to load the driver).

In the second case it was caused by insufficient priviledges to connect to the MySQL database.

So make sure the credentials in ospview.conf are correct and rerun the populate_db script.

hope this helps,

Alan