DB Connect Error [nagiosxi]: Database connection failed

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
nnconcerts
Posts: 9
Joined: Fri Feb 26, 2010 9:03 am
Location: Washington DC
Contact:

DB Connect Error [nagiosxi]: Database connection failed

Post by nnconcerts »

I did a manul install on a RHEL 5.4 and seems like the the 1-prereqs script did not do a complete job. I followed these instructions to the dot. At the end I get on my web browser (firefox)

DB Connect Error [nagiosxi]: Database connection failed

Seems like it did not install postgresQL. And or update the tables, so what do you suggest needs to be done or what has gone wrong here?
Any support on this matter is helpful, I'm trying to evaluate this product so the team can use this.

running ./prereqs gives this output:

Installing prerequisites...
Loaded plugins: security
Setting up Install Process
No package perl-CPAN available.
Nothing to do
Loaded plugins: security
Setting up Install Process
No package sysstat available.
No package mysql available.
No package mysql-server available.
No package mysql-devel available.
No package net-snmp available.
No package net-snmp-utils available.
No package php-mysql available.
No package php-gd available.
No package php-pear available.
No package mrtg available.
No package postgresql available.
No package postgresql-server available.
No package php-pgsql available.
No package postgresql-devel available.
No package php-mcrypt available.
No package php-snmp available.
No package unixODBC available.
No package unixODBC-devel available.
No package php-odbc available.
No package php-mssql available.
Resolving Dependencies
--> Running transaction check
---> Package cacti.noarch 0:0.8.7e-3.el5.rf set to be updated
--> Processing Dependency: php-snmp for package: cacti
--> Processing Dependency: net-snmp for package: cacti
--> Processing Dependency: php-mysql for package: cacti
--> Processing Dependency: net-snmp-utils for package: cacti
--> Processing Dependency: mysql for package: cacti
---> Package dstat.noarch 0:0.7.1-1.el5.rf set to be updated
---> Package fping.i386 0:2.4-1.b2.2.el5.rf set to be updated
---> Package freetds.i386 0:0.64-1.el5.rf set to be updated
--> Processing Dependency: libodbcinst.so.1 for package: freetds
---> Package freetds-devel.i386 0:0.64-1.el5.rf set to be updated
---> Package graphviz.i386 0:2.22.0-4.el5.rf set to be updated
---> Package libmcrypt.i386 0:2.5.7-1.2.el5.rf set to be updated
---> Package libmcrypt-devel.i386 0:2.5.7-1.2.el5.rf set to be updated
---> Package nmap.i386 2:5.00-1.el5.rf set to be updated
---> Package perl-Net-SNMP.noarch 0:5.2.0-1.2.el5.rf set to be updated
--> Processing Dependency: perl(Socket6) >= 0.19 for package: perl-Net-SNMP
--> Processing Dependency: perl(Digest::HMAC) for package: perl-Net-SNMP
--> Processing Dependency: perl(Digest::SHA1) for package: perl-Net-SNMP
--> Processing Dependency: perl(Crypt::DES) for package: perl-Net-SNMP
---> Package rrdtool.i386 0:1.4.2-1.el5.rf set to be updated
--> Processing Dependency: ruby for package: rrdtool
--> Processing Dependency: perl(RRDs) for package: rrdtool
--> Processing Dependency: perl(RRDp) for package: rrdtool
--> Processing Dependency: libdbi.so.0 for package: rrdtool
--> Running transaction check
---> Package cacti.noarch 0:0.8.7e-3.el5.rf set to be updated
--> Processing Dependency: php-snmp for package: cacti
--> Processing Dependency: net-snmp for package: cacti
--> Processing Dependency: php-mysql for package: cacti
--> Processing Dependency: net-snmp-utils for package: cacti
--> Processing Dependency: mysql for package: cacti
---> Package freetds.i386 0:0.64-1.el5.rf set to be updated
--> Processing Dependency: libodbcinst.so.1 for package: freetds
---> Package perl-Crypt-DES.i386 0:2.05-3.2.el5.rf set to be updated
---> Package perl-Digest-SHA1.i386 0:2.12-2.el5.rf set to be updated
---> Package perl-Net-SNMP.noarch 0:5.2.0-1.2.el5.rf set to be updated
--> Processing Dependency: perl(Digest::HMAC) for package: perl-Net-SNMP
---> Package perl-Socket6.i386 0:0.23-1.el5.rf set to be updated
---> Package perl-rrdtool.i386 0:1.4.2-1.el5.rf set to be updated
---> Package rrdtool.i386 0:1.4.2-1.el5.rf set to be updated
--> Processing Dependency: ruby for package: rrdtool
--> Processing Dependency: libdbi.so.0 for package: rrdtool
--> Finished Dependency Resolution
cacti-0.8.7e-3.el5.rf.noarch from dag has depsolving problems
--> Missing Dependency: mysql is needed by package cacti-0.8.7e-3.el5.rf.noarch (dag)
cacti-0.8.7e-3.el5.rf.noarch from dag has depsolving problems
--> Missing Dependency: php-mysql is needed by package cacti-0.8.7e-3.el5.rf.noarch (dag)
perl-Net-SNMP-5.2.0-1.2.el5.rf.noarch from dag has depsolving problems
--> Missing Dependency: perl(Digest::HMAC) is needed by package perl-Net-SNMP-5.2.0-1.2.el5.rf.noarch (dag)
freetds-0.64-1.el5.rf.i386 from dag has depsolving problems
--> Missing Dependency: libodbcinst.so.1 is needed by package freetds-0.64-1.el5.rf.i386 (dag)
rrdtool-1.4.2-1.el5.rf.i386 from dag has depsolving problems
--> Missing Dependency: libdbi.so.0 is needed by package rrdtool-1.4.2-1.el5.rf.i386 (dag)
freetds-0.64-1.el5.rf.i386 from dag has depsolving problems
--> Missing Dependency: libodbcinst.so.1 is needed by package freetds-0.64-1.el5.rf.i386 (dag)
rrdtool-1.4.2-1.el5.rf.i386 from dag has depsolving problems
--> Missing Dependency: ruby is needed by package rrdtool-1.4.2-1.el5.rf.i386 (dag)
cacti-0.8.7e-3.el5.rf.noarch from dag has depsolving problems
--> Missing Dependency: php-snmp is needed by package cacti-0.8.7e-3.el5.rf.noarch (dag)
cacti-0.8.7e-3.el5.rf.noarch from dag has depsolving problems
--> Missing Dependency: net-snmp-utils is needed by package cacti-0.8.7e-3.el5.rf.noarch (dag)
cacti-0.8.7e-3.el5.rf.noarch from dag has depsolving problems
--> Missing Dependency: net-snmp is needed by package cacti-0.8.7e-3.el5.rf.noarch (dag)
Error: Missing Dependency: mysql is needed by package phpmyadmin-2.11.10-2.el5.rf.noarch (dag)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.
./1-prereqs: line 38: pear: command not found
Loaded plugins: security
Setting up Install Process
Nothing to do
Loaded plugins: security
Setting up Install Process
Nothing to do
Loaded plugins: security
Setting up Install Process
No package 4 available.
Nothing to do
Loaded plugins: security
Setting up Install Process
No package 4 available.
Nothing to do
Loaded plugins: security
Setting up Install Process
Package perl-Error-0.17016-1.el5.rf.noarch already installed and latest version
Nothing to do
Loaded plugins: security
Setting up Install Process
Package perl-Crypt-SSLeay-0.57-2.el5.rf.i386 already installed and latest version
Nothing to do
Loaded plugins: security
Setting up Install Process
Package perl-XML-Simple-2.18-1.el5.rf.noarch already installed and latest version
Nothing to do
Loaded plugins: security
Setting up Install Process
Package perl-XML-Parser-2.36-1.el5.rf.i386 already installed and latest version
Nothing to do
Loaded plugins: security
Error: Need to pass a list of pkgs to install
usage: yum [options] COMMAND

List of Commands:

check-update Check for available package updates
clean Remove cached data
deplist List a package's dependencies
downgrade downgrade a package
erase Remove a package or packages from your system
groupinfo Display details about a package group
groupinstall Install the packages in a group on your system
grouplist List available package groups
groupremove Remove the packages in a group from your system
help Display a helpful usage message
info Display details about a package or group of packages
info-security Returns security data for the packages listed, that affects your system
install Install a package or packages on your system
list List a package or groups of packages
list-security Returns security data for the packages listed, that affects your system
localinstall Install a local RPM
makecache Generate the metadata cache
provides Find what package provides the given value
reinstall reinstall a package
repolist Display the configured software repositories
resolvedep Determine which package provides the given dependency
search Search package details for the given string
shell Run an interactive yum shell
update Update a package or packages on your system
update-minimal Works like update, but goes to the 'newest' package match which fixes a problem that affects your system
upgrade Update packages taking obsoletes into account


options:
-h, --help show this help message and exit
-t, --tolerant be tolerant of errors
-C run entirely from cache, don't update cache
-c [config file] config file location
-R [minutes] maximum command wait time
-d [debug level] debugging output level
--showduplicates show duplicates, in repos, in list/search commands
-e [error level] error output level
-q, --quiet quiet operation
-v, --verbose verbose operation
-y answer yes for all questions
--version show Yum version and exit
--installroot=[path] set install root
--enablerepo=[repo] enable one or more repositories (wildcards allowed)
--disablerepo=[repo] disable one or more repositories (wildcards allowed)
-x [package], --exclude=[package]
exclude package(s) by name or glob
--disableexcludes=[repo]
disable exclude from main, for a repo or for
everything
--obsoletes enable obsoletes processing during updates
--noplugins disable Yum plugins
--nogpgcheck disable gpg signature checking
--disableplugin=[plugin]
disable plugins by name
--enableplugin=[plugin]
enable plugins by name
--skip-broken skip packages with depsolving problems
--color=COLOR control whether color is used
--security Include security relevant packages
--cve=CVE Include packages needed to fix the given CVE
--bz=BZ Include packages needed to fix the given BZ
--advisory=ADVISORY Include packages needed to fix the given advisory

Plugin Options:
Loaded plugins: security
Error: Need to pass a list of pkgs to install
usage: yum [options] COMMAND

List of Commands:

check-update Check for available package updates
clean Remove cached data
deplist List a package's dependencies
downgrade downgrade a package
erase Remove a package or packages from your system
groupinfo Display details about a package group
groupinstall Install the packages in a group on your system
grouplist List available package groups
groupremove Remove the packages in a group from your system
help Display a helpful usage message
info Display details about a package or group of packages
info-security Returns security data for the packages listed, that affects your system
install Install a package or packages on your system
list List a package or groups of packages
list-security Returns security data for the packages listed, that affects your system
localinstall Install a local RPM
makecache Generate the metadata cache
provides Find what package provides the given value
reinstall reinstall a package
repolist Display the configured software repositories
resolvedep Determine which package provides the given dependency
search Search package details for the given string
shell Run an interactive yum shell
update Update a package or packages on your system
update-minimal Works like update, but goes to the 'newest' package match which fixes a problem that affects your system
upgrade Update packages taking obsoletes into account


options:
-h, --help show this help message and exit
-t, --tolerant be tolerant of errors
-C run entirely from cache, don't update cache
-c [config file] config file location
-R [minutes] maximum command wait time
-d [debug level] debugging output level
--showduplicates show duplicates, in repos, in list/search commands
-e [error level] error output level
-q, --quiet quiet operation
-v, --verbose verbose operation
-y answer yes for all questions
--version show Yum version and exit
--installroot=[path] set install root
--enablerepo=[repo] enable one or more repositories (wildcards allowed)
--disablerepo=[repo] disable one or more repositories (wildcards allowed)
-x [package], --exclude=[package]
exclude package(s) by name or glob
--disableexcludes=[repo]
disable exclude from main, for a repo or for
everything
--obsoletes enable obsoletes processing during updates
--noplugins disable Yum plugins
--nogpgcheck disable gpg signature checking
--disableplugin=[plugin]
disable plugins by name
--enableplugin=[plugin]
enable plugins by name
--skip-broken skip packages with depsolving problems
--color=COLOR control whether color is used
--security Include security relevant packages
--cve=CVE Include packages needed to fix the given CVE
--bz=BZ Include packages needed to fix the given BZ
--advisory=ADVISORY Include packages needed to fix the given advisory

Plugin Options:
Loaded plugins: security
Setting up Install Process
Package perl-Mail-POP3Client-2.18-1.el5.rf.noarch already installed and latest version
Nothing to do
Loaded plugins: security
Setting up Install Process
No package 4 available.
Nothing to do
Loaded plugins: security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-Net-SMTP-TLS.noarch 0:0.12-1.el5.rf set to be updated
--> Processing Dependency: perl(IO::Socket::SSL) for package: perl-Net-SMTP-TLS
--> Processing Dependency: perl(Digest::HMAC_MD5) for package: perl-Net-SMTP-TLS
--> Processing Dependency: perl(Net::SSLeay) for package: perl-Net-SMTP-TLS
--> Running transaction check
---> Package perl-IO-Socket-SSL.noarch 0:1.31-1.el5.rf set to be updated
---> Package perl-Net-SMTP-TLS.noarch 0:0.12-1.el5.rf set to be updated
--> Processing Dependency: perl(Digest::HMAC_MD5) for package: perl-Net-SMTP-TLS
---> Package perl-Net-SSLeay.i386 0:1.35-2.el5.rf set to be updated
--> Finished Dependency Resolution
perl-Net-SMTP-TLS-0.12-1.el5.rf.noarch from dag has depsolving problems
--> Missing Dependency: perl(Digest::HMAC_MD5) is needed by package perl-Net-SMTP-TLS-0.12-1.el5.rf.noarch (dag)
Error: Missing Dependency: perl(Digest::HMAC_MD5) is needed by package perl-Net-SMTP-TLS-0.12-1.el5.rf.noarch (dag)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.
Loaded plugins: security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-DBD-Sybase.i386 0:1.09-1.el5.rf set to be updated
--> Processing Dependency: libct.so.4 for package: perl-DBD-Sybase
--> Processing Dependency: libtds.so.5 for package: perl-DBD-Sybase
--> Processing Dependency: perl(DBI) for package: perl-DBD-Sybase
--> Running transaction check
---> Package freetds.i386 0:0.64-1.el5.rf set to be updated
--> Processing Dependency: libodbcinst.so.1 for package: freetds
---> Package perl-DBI.i386 0:1.609-1.el5.rf set to be updated
--> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI
--> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI
--> Running transaction check
---> Package freetds.i386 0:0.64-1.el5.rf set to be updated
--> Processing Dependency: libodbcinst.so.1 for package: freetds
---> Package perl-PlRPC.noarch 0:0.2020-1.el5.rf set to be updated
--> Processing Dependency: perl(Net::Daemon) for package: perl-PlRPC
--> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC
--> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC
--> Running transaction check
---> Package freetds.i386 0:0.64-1.el5.rf set to be updated
--> Processing Dependency: libodbcinst.so.1 for package: freetds
---> Package perl-Net-Daemon.noarch 0:0.43-1.el5.rf set to be updated
--> Finished Dependency Resolution
freetds-0.64-1.el5.rf.i386 from dag has depsolving problems
--> Missing Dependency: libodbcinst.so.1 is needed by package freetds-0.64-1.el5.rf.i386 (dag)
Error: Missing Dependency: libodbcinst.so.1 is needed by package freetds-0.64-1.el5.rf.i386 (dag)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
The program package-cleanup is found in the
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by mmestnik »

Did you miss the first step ./0-yum
This should setup the DAG repository.
nnconcerts
Posts: 9
Joined: Fri Feb 26, 2010 9:03 am
Location: Washington DC
Contact:

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by nnconcerts »

Yes, I did started this with ./0-yum, that is correct.. followed the instructions to the dot....
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by mmestnik »

Could you look at /etc/yum.repos.d? There should be a file dag.repo.

Code: Select all

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
nnconcerts
Posts: 9
Joined: Fri Feb 26, 2010 9:03 am
Location: Washington DC
Contact:

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by nnconcerts »

This is what I found in /etc/yum.repos.d/

dag.repo

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el5/en/$basearch/dag
gpgcheck=1
enabled=1
nnconcerts
Posts: 9
Joined: Fri Feb 26, 2010 9:03 am
Location: Washington DC
Contact:

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by nnconcerts »

I checked the URL or the $variable should have done a search from the dag script.

Either the dag file url needs to be updated or something else is wrong...

http://apt.sw.be/redhat/el5/en/$basearch/dag

Not able to get to this URL...
nnconcerts
Posts: 9
Joined: Fri Feb 26, 2010 9:03 am
Location: Washington DC
Contact:

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by nnconcerts »

I found a few more errors with the dag script as well:
There is this link in dag to get headers or files from

http://apt.sw.be/redhat/el5/en/i386/dag ... repomd.xml

When you check this file it goes towards the new URL and this /metadata is missing there on their website. Hence it fails. Is there any other way you can put in a new link to update all the packages before XI gets installed? I have redone this machine almost 3 times already and rebuilt is to see what went wrong with XI.
http://linux.duke.edu/metadata/
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by mmestnik »

$basesearch should be replaced with "i386" or "x86_64".

http://apt.sw.be/redhat/el5/en/i386/dag/
http://apt.sw.be/redhat/el5/en/x86_64/dag/

Perhaps this is folly with the version of RedHat you are using.
nnconcerts
Posts: 9
Joined: Fri Feb 26, 2010 9:03 am
Location: Washington DC
Contact:

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by nnconcerts »

Seems like I am still ending up with a bad URL...

it also call up www.duke.org and that has a bad URL as well.

http://apt.sw.be/redhat/el5/en/i386/dag ... repomd.xml: [Errno 4] IOError: <urlopen error (-2, 'Name or service not known')>
Trying other mirror.
Setting up Install Process
No package perl-CPAN available.
nnconcerts
Posts: 9
Joined: Fri Feb 26, 2010 9:03 am
Location: Washington DC
Contact:

Re: DB Connect Error [nagiosxi]: Database connection failed

Post by nnconcerts »

I have tried the above link and the link below:

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el5/en/i386/dag ... repomd.xml
gpgcheck=1
enabled=1
Locked