Page 1 of 2
install on CentOS 7 - The step that failed was: 'db'
Posted: Thu Jul 12, 2018 3:56 pm
by rfoster
Hi.
I am trying to install Nagios Network Analyzer on CentOS 7.
I used the "manual download" method as described in the installation guide:
Code: Select all
cd /tmp
wget https://assets.nagios.com/downloads/nagios-network-analyzer/nagiosna-latest.tar.gz
tar xzf nagiosna-latest.tar.gz
cd nagiosna
./fullinstall
Originally the script fails miserably with several public key errors. For the sake of just trying to get it to work I added nogpgcheck to the fullinstall script above.
Now I get much farther into the install and it fails with this:
[snip]
Code: Select all
build_nfdump step completed OK
Running 'library_path'...
library_path step completed OK
Running 'nagiosna'...
nagiosna step completed OK
Running 'backend'...
backend step completed OK
Running 'db'...
Redirecting to /bin/systemctl restart mariadb.service
Failed to restart mariadb.service: Unit not found.
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios Enterprises technical support.
The step that failed was: 'db'
[root@cj9rcl002 nagiosna]#
Anyone have recommendations for getting past this?
TIA
-russ
Re: install on CentOS 7 - The step that failed was: 'db'
Posted: Fri Jul 13, 2018 11:12 am
by jomann
Is this the latest version of CentOS 7? It does seem to be that they changed the name of the service file from mariadb to mysql, can you try something? Edit the file
libinstall.sh in the main extracted directory. Around
line 610 you should see a section that looks like:
Code: Select all
l5 | el6 | el7 )
if [ "$dist" == "el7" ]; then
mysqld="mariadb"
fi
;;
Change the
mariadb in quotes to
mysql in quotes.
Once that's done, save it, and try to run the install again.
Re: install on CentOS 7 - The step that failed was: 'db'
Posted: Fri Jul 13, 2018 1:26 pm
by rfoster
Thanks for the tip. Unfortunately it looks like the same error.
Code: Select all
[snip!]
build_nfdump step completed OK
Running 'library_path'...
library_path step completed OK
Running 'nagiosna'...
nagiosna step completed OK
Running 'backend'...
backend step completed OK
Running 'db'...
Redirecting to /bin/systemctl restart mysql.service
Failed to restart mysql.service: Unit not found.
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios Enterprises technical support.
The step that failed was: 'db'
[root@cj9rcl002 nagiosna]#
FYI
Code: Select all
[root@cj9rcl002 nagiosna]# cat /etc/*-release
CentOS Linux release 7.5.1804 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.5.1804 (Core)
CentOS Linux release 7.5.1804 (Core)
[root@cj9rcl002 nagiosna]#
This is a test/development box so I can try whatever we need.
thanks!
Re: install on CentOS 7 - The step that failed was: 'db'
Posted: Fri Jul 13, 2018 2:34 pm
by jomann
We may have one other location for you to change in the install process.
Edit the fullinstall file and delete line 72:
MySQL is likely not even installed on the server, you can verify with:
Re: install on CentOS 7 - The step that failed was: 'db'
Posted: Mon Jul 16, 2018 9:18 am
by rfoster
Since there's a partial install already, libinstall.sh fails. I commented out:
Code: Select all
664 # Check if NNA is already installed
665 #if [ -d "/usr/local/nagiosna" ]; then
666 # echo "It looks like Nagios Network Analyzer is already installed."
667 # exit 0
668 #fi
And made the changes you recommended above, made sure mysql and mysql server is installed.
Code: Select all
[root@cj9rcl002 ~]# yum info mysql
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirror.sesp.northwestern.edu
* epel: mirror.grid.uchicago.edu
* extras: ftpmirror.your.org
* updates: mirror.us.oneandone.net
Error: No matching Packages to list
[root@cj9rcl002 ~]# yum install -y mysql
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 18 kB 00:00:00
* base: mirror.sesp.northwestern.edu
* epel: mirror.grid.uchicago.edu
* extras: ftpmirror.your.org
* updates: centos.mbni.med.umich.edu
base | 3.6 kB 00:00:00
cars-extras | 1.3 kB 00:00:00
epel | 3.2 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/3): epel/x86_64/updateinfo | 929 kB 00:00:00
(2/3): epel/x86_64/primary | 3.5 MB 00:00:00
(3/3): updates/7/x86_64/primary_db | 3.6 MB 00:00:00
epel 12609/12609
Package mysql-community-client-5.5.44-2.el7.x86_64 already installed and latest version
Nothing to do
[root@cj9rcl002 ~]#
Code: Select all
[root@cj9rcl002 ~]# yum install -y mysql-server
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirror.sesp.northwestern.edu
* epel: mirror.grid.uchicago.edu
* extras: ftpmirror.your.org
* updates: centos.mbni.med.umich.edu
Package mysql-community-server-5.5.44-2.el7.x86_64 already installed and latest version
Nothing to do
[root@cj9rcl002 ~]#
...and we get...
Code: Select all
[root@cj9rcl002 nagiosna]# ./fullinstall
Installing on CentOS 7.5.1804
Nagios Network Analyzer Installation
====================================
DATE: Mon Jul 16 09:11:05 CDT 2018
DISTRO INFO:
CentOS
7.5.1804
x86_64
Running 'prereqs'...
prereqs step already completed - skipping
Running 'sourceguardian'...
sourceguardian step already completed - skipping
Running 'timezone'...
timezone step already completed - skipping
Running 'build_rrdtool'...
build_rrdtool step already completed - skipping
Running 'build_nfdump'...
build_nfdump step already completed - skipping
Running 'library_path'...
library_path step already completed - skipping
Running 'nagiosna'...
nagiosna step already completed - skipping
Running 'backend'...
backend step already completed - skipping
Running 'db'...
Redirecting to /bin/systemctl restart mysql.service
Failed to restart mysql.service: Unit not found.
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios Enterprises technical support.
The step that failed was: 'db'
[root@cj9rcl002 nagiosna]#
Re: install on CentOS 7 - The step that failed was: 'db'
Posted: Mon Jul 16, 2018 9:19 am
by rfoster
Ok...now that I posted all that, I'm going to restore this machine to its original state (pre-install), make the changes you recommend to the script, and start the process from scratch...
Stay tuned...
Re: install on CentOS 7 - The step that failed was: 'db'
Posted: Mon Jul 16, 2018 11:38 am
by rfoster
Here are the changes I made to the scripts:
fullinstall
commented out mariadb
Code: Select all
70 mysql="mysql-server"
71 if [ "$dist" == "el7" ]; then
72 #mysql="mariadb-server"
73 efonts="cjkuni-fonts-common cjkuni-ukai-fonts cjkuni-uming-fonts"
74 fi
added nopgpgcheck
Code: Select all
80 yum -y --nogpgcheck install $pkgs
83 if [ "$dist" == "el6" ]; then
84 yum -y --nogpgcheck install '@Chinese Support' '@Japanese Support' '@Russian Support'
85 fi
libinstall.sh
added nopgpcheck
Code: Select all
174 if [ "$dist" = "el6" ] && is_installed centos-release; then
175 yum -y --nogpgcheck install centos-release-cr
176 fi
and here as well
Code: Select all
185 yum --nogpgcheck check-update || true
change mariadb to mysql
Code: Select all
607 case "$dist" in
608 el5 | el6 | el7 )
609 if [ "$dist" == "el7" ]; then
610 mysqld="mysql"
611 fi
612 ;;
With the same results
Code: Select all
build_nfdump step completed OK
Running 'library_path'...
library_path step completed OK
Running 'nagiosna'...
nagiosna step completed OK
Running 'backend'...
backend step completed OK
Running 'db'...
Redirecting to /bin/systemctl restart mysql.service
Failed to restart mysql.service: Unit not found.
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios Enterprises technical support.
The step that failed was: 'db'
[root@cj9rcl002 nagiosna]#
Re: install on CentOS 7 - The step that failed was: 'db'
Posted: Tue Jul 17, 2018 4:53 pm
by lmiltchev
Was this a "clean" machine? Did you have mysql already installed on it? As far as I know, on CentOS 7, yum installs mariadb. You have the "community" release...
Running 'prereqs'...
epel-release RPM installed OK
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirror.tzulo.com
* epel: mirror.steadfast.net
* extras: mirrors.umflint.edu
* updates: repos.mia.quadranet.com
Package mysql-community-server-5.5.44-2.el7.x86_64 already installed and latest version
I just installed NNA on CentOS 7 without any issues:
Code: Select all
...
Preparing... ########################################
Updating / installing...
wkhtmltox-1:0.12.2.1-1 ########################################
wkhtmltopdf step completed OK
Running 'webroot'...
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
webroot step completed OK
Running 'daemons'...
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/nagiosna.service to /usr/lib/systemd/system/nagiosna.service.
daemons step completed OK
The database was migrated successfully.
Nagios Network Analyzer Installation Success!
You can finish the final setup steps for Nagios Network Analyzer by visiting:
http://192.168.18.2/nagiosna/
Code: Select all
cat /etc/*release
CentOS Linux release 7.5.1804 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
CentOS Linux release 7.5.1804 (Core)
CentOS Linux release 7.5.1804 (Core)
Code: Select all
yum list installed | grep 'mysql\|mariadb'
mariadb.x86_64 1:5.5.56-2.el7 @base
mariadb-libs.x86_64 1:5.5.56-2.el7 @base
mariadb-server.x86_64 1:5.5.56-2.el7 @base
php-mysql.x86_64 5.4.16-45.el7 @base
Please, try your install on a CLEAN system (CentOS 7, Minimal) with nothing "pre-installed" on it.
Re: install on CentOS 7 - The step that failed was: 'db'
Posted: Wed Jul 18, 2018 11:46 am
by rfoster
Which should be installed and used; mariadb or mysql?
This install is from a company template. So it's not a complete minimalist install. It does have mysql-community preinstalled for some reason. For this rebuild I ensured all mysql and mariadb packages were removed.
List either package:
yum list installed | grep 'mysql\|mariadb'
Mysql was found. Remove package:
yum remove mysql-community-common.x86_64
Verify with another:
yum list installed | grep 'mysql\|mariadb'
Search, just in case:
find / -iname mariadb
find / -iname mysql
Now download and install:
Nagios Network Analyzer Installation
====================================
DATE: Wed Jul 18 11:16:12 CDT 2018
DISTRO INFO:
CentOS
7.5.1804
x86_64
Running 'prereqs'...
epel-release RPM installed OK
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirror.grid.uchicago.edu
* epel: mirror.uic.edu
* extras: mirror.tzulo.com
* updates: ftpmirror.your.org
Package mariadb-server is obsoleted by mysql-community-server, trying to install mysql-community-server-5.5.44-2.el7.x86_64 instead
Package 1:make-3.82-23.el7.x86_64 already installed and latest version
Package glibc-2.17-222.el7.x86_64 already installed and latest version
Package ntp-4.2.6p5-28.el7.centos.x86_64 already installed and latest version
Package sudo-1.8.19p2-14.el7_5.x86_64 already installed and latest version
Package 1:net-snmp-utils-5.7.2-33.el7_5.2.x86_64 already installed and latest version
Package libjpeg-turbo-1.2.90-5.el7.x86_64 already installed and latest version
Resolving Dependencies
[...snip...]
Running 'nagiosna'...
nagiosna step completed OK
Running 'backend'...
backend step completed OK
Running 'db'...
Redirecting to /bin/systemctl restart mariadb.service
Failed to restart mariadb.service: Unit not found.
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios Enterprises technical support.
The step that failed was: 'db'
It would appear that removing packages isn't enough. I'll work on a true minimalist CentOS install.
What looks weird to me is that, in the script, it chooses to install mysql-community since mariadb is obsoleted. But then tries to start mariadb.server and fails.
Re: install on CentOS 7 - The step that failed was: 'db'
Posted: Wed Jul 18, 2018 1:34 pm
by lmiltchev
It would appear that removing packages isn't enough. I'll work on a true minimalist CentOS install.
Yes, you can try try minimal install or you can try removing the packages again on your existing server.
Try removing mysql completely.
Check to see if you have the mysql community repo somewhere in /etc/yum.repos.d/. You can try:
Code: Select all
ls -la /etc/yum.repos.d/
yum repolist all | grep -i mysql
If you have the repo, remove it:
Code: Select all
rm -f /etc/yum.repos.d/<mysql repo>
and run:
Remove the "/var/lib/mysql" directory and subdirectories
and try reinstalling the the Nagios Network Analyzer.
If this doesn't work, perform the full install on a "clean" system, according to our official documentation.
Important:
Nagios Enterprises highly recommends and will only support installing Nagios Network Analyzer
on a newly installed, "clean" system (a bare minimal install with nothing else installed or configured).
https://assets.nagios.com/downloads/nag ... ctions.pdf