Fresh, Offline Install Won't Start

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
milewideinchdeep
Posts: 6
Joined: Fri Apr 30, 2021 8:44 am

Fresh, Offline Install Won't Start

Post by milewideinchdeep »

1) Linux Distribution and version?
Red Hat Enterprise Linux Server release 7.9 (Maipo)
2) 32 or 64bit?
x86_64
3 VMware Image or Manual Install of XI?
Manual
4) Are there special configurations on your system, ie; is Gnome installed? Are you using a proxy? Are you using SSL?
No.

I tried the following two versions of the Offline Nagios XI releases and had the same issue with both:
https://repo.nagios.com/nagiosxi-offline/nagiosxi-5.8.3-1.el7.x86_64.tar.gz
https://repo.nagios.com/nagiosxi-offline/nagiosxi-5.8.2-1.el7.x86_64.tar.gz

The ./fullinstall completes successfully with no errors.

I go to start the Nagios process and get this error:

Code: Select all

# systemctl start nagios
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
The journalctl command shows the following:

Code: Select all

-- Unit nagios.service has begun starting up.
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: Nagios Core 4.4.6
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: Copyright (c) 1999-2009 Ethan Galstad
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: Last Modified: 2020-04-28
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: License: GPL
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: Website: https://www.nagios.org
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: Reading configuration data...
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: Read main config file okay...
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: Error: Cannot open config file '/usr/local/nagios/etc/contacttemplates.cfg' for reading: No such file or directory
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: Error processing object config files!
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: ***> One or more problems was encountered while processing the config files...
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: Check your configuration file(s) to ensure that they contain valid
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: directives and data definitions.  If you are upgrading from a previous
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: version of Nagios, you should be aware that some variables/definitions
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: may have been removed or modified in this version.  Make sure to read
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: the HTML documentation regarding the config files, as well as the
Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: 'Whats New' section to find out what has changed.
Apr 30 13:51:43 DEPRECATED_HOSTNAME systemd[1]: nagios.service: control process exited, code=exited status=1
Apr 30 13:51:43 DEPRECATED_HOSTNAME systemd[1]: Failed to start Nagios Core 4.4.6.
-- Subject: Unit nagios.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nagios.service has failed.
--
-- The result is failed.
Apr 30 13:51:43 DEPRECATED_HOSTNAME systemd[1]: Unit nagios.service entered failed state.
Apr 30 13:51:43 DEPRECATED_HOSTNAME systemd[1]: nagios.service failed.
Apr 30 13:51:43 DEPRECATED_HOSTNAME polkitd[1237]: Unregistered Authentication Agent for unix-process:3338:268599 (system bus name :1.18, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
I commented out the following from the /usr/local/nagios/etc/nagios.cfg file to see if I can get it to work without those files:

Code: Select all

#cfg_file=/usr/local/nagios/etc/contacttemplates.cfg
#cfg_file=/usr/local/nagios/etc/contactgroups.cfg
#cfg_file=/usr/local/nagios/etc/contacts.cfg
#cfg_file=/usr/local/nagios/etc/timeperiods.cfg
#cfg_file=/usr/local/nagios/etc/commands.cfg
#cfg_file=/usr/local/nagios/etc/hostgroups.cfg
#cfg_file=/usr/local/nagios/etc/servicegroups.cfg
#cfg_file=/usr/local/nagios/etc/hosttemplates.cfg
#cfg_file=/usr/local/nagios/etc/servicetemplates.cfg
#cfg_file=/usr/local/nagios/etc/servicedependencies.cfg
#cfg_file=/usr/local/nagios/etc/serviceescalations.cfg
#cfg_file=/usr/local/nagios/etc/hostdependencies.cfg
#cfg_file=/usr/local/nagios/etc/hostescalations.cfg
#cfg_file=/usr/local/nagios/etc/hostextinfo.cfg
#cfg_file=/usr/local/nagios/etc/serviceextinfo.cfg
I did get a different error after I commented out the above lines in the config file, but now I am even more lost with this new error:

Code: Select all

-- Unit nagios.service has begun starting up.
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Nagios Core 4.4.6
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Copyright (c) 1999-2009 Ethan Galstad
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Last Modified: 2020-04-28
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: License: GPL
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Website: https://www.nagios.org
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Reading configuration data...
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Read main config file okay...
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Read object config files okay...
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Running pre-flight check on configuration data...
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checking objects...
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Error: There are no services defined!
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checked 0 services.
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Error: There are no hosts defined!
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checked 0 hosts.
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checked 0 host groups.
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checked 0 service groups.
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Error: There are no contacts defined!
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checked 0 contacts.
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checked 0 contact groups.
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checked 0 commands.
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checked 0 time periods.
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checked 0 host escalations.
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checked 0 service escalations.
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checking for circular paths...
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checked 0 hosts
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checked 0 service dependencies
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checked 0 host dependencies
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checked 0 timeperiods
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checking global event handlers...
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Error: Global host event handler command 'xi_host_event_handler' is not defined anywhere!
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Error: Global service event handler command 'xi_service_event_handler' is not defined anywhere!
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checking obsessive compulsive processor commands...
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Checking misc settings...
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Total Warnings: 0
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Total Errors:   5
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: ***> One or more problems was encountered while running the pre-flight check...
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: Check your configuration file(s) to ensure that they contain valid
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: directives and data definitions.  If you are upgrading from a previous
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: version of Nagios, you should be aware that some variables/definitions
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: may have been removed or modified in this version.  Make sure to read
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: the HTML documentation regarding the config files, as well as the
Apr 30 13:57:00 DEPRECATED_HOSTNAME nagios[3374]: 'Whats New' section to find out what has changed.
Apr 30 13:57:00 DEPRECATED_HOSTNAME systemd[1]: nagios.service: control process exited, code=exited status=1
Apr 30 13:57:00 DEPRECATED_HOSTNAME systemd[1]: Failed to start Nagios Core 4.4.6.
-- Subject: Unit nagios.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nagios.service has failed.
--
-- The result is failed.
Apr 30 13:57:00 DEPRECATED_HOSTNAME systemd[1]: Unit nagios.service entered failed state.
Apr 30 13:57:00 DEPRECATED_HOSTNAME systemd[1]: nagios.service failed.
Apr 30 13:57:00 DEPRECATED_HOSTNAME polkitd[1237]: Unregistered Authentication Agent for unix-process:3368:300381 (system bus name :1.19, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
I am praying this is an easy fix as I would really love to be able to vet Nagios as a replacement for SolarWinds, but I have 30 days cooking on my trial support access.

Thanks ahead of time.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Fresh, Offline Install Won't Start

Post by ssax »

If these files are missing XI didn't install properly:

Code: Select all

Apr 30 13:51:43 DEPRECATED_HOSTNAME nagios[3344]: Error: Cannot open config file '/usr/local/nagios/etc/contacttemplates.cfg' for reading: No such file or directory
What is the output of these commands?

Code: Select all

rpm -qa | grep nagiosxi
ls -l /usr/local/nagios/etc
Please attach your /tmp/xi-install.log file as well so we can see what occurred.

Please send me a copy of your profile as well (if your able), you can download it from Admin > System Profile by clicking the Download Profile button and upload it to the ticket by clicking the "choose item" link at the bottom of the menu.​ Make sure to wait until the file is finished uploading before clicking the Post Reply button.

If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:

Code: Select all

rm -rf /usr/local/nagiosxi/var/components/profile*​​
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT
Then send me the resulting /usr/local/nagiosxi/var/components/profile.zip​ file.​

If the profile script fails, please include the ENTIRE output.
milewideinchdeep
Posts: 6
Joined: Fri Apr 30, 2021 8:44 am

Re: Fresh, Offline Install Won't Start

Post by milewideinchdeep »

What is the output of these commands?

Code: Select all

[root@HOSTNAME /tmp ] # rpm -qa | grep nagiosxi
nagiosxi-5.8.2-1.el7.x86_64
nagiosxi-mrtg-5.8.2-1.el7.x86_64
nagiosxi-nrds-5.8.2-1.el7.x86_64
nagiosxi-nsca-5.8.2-1.el7.x86_64
nagiosxi-wmic-5.8.2-1.el7.x86_64
nagiosxi-nagiosplugins-5.8.2-1.el7.x86_64
nagiosxi-wkhtmltox-5.8.2-1.el7.x86_64
nagiosxi-shellinabox-5.8.2-1.el7.x86_64
nagiosxi-nxti-5.8.2-1.el7.x86_64
nagiosxi-nagioscore-5.8.2-1.el7.x86_64
nagiosxi-nrpe-5.8.2-1.el7.x86_64
nagiosxi-pnp-5.8.2-1.el7.x86_64
nagiosxi-nagvis-5.8.2-1.el7.x86_64
nagiosxi-ndoutils-5.8.2-1.el7.x86_64

[root@HOSTNAME /tmp ] # ls -l /usr/local/nagios/etc
total 68
-rw-r--r--. 1 nagios nagios   744 Feb 24 16:58 cgi.cfg
drwxrwxr-x. 2 nagios nagios  4096 Feb 24 17:08 hosts
drwxrwxr-x. 2 nagios nagios  4096 Feb 24 17:07 import
-rw-r--r--. 1 nagios nagios  5883 Apr 30 13:56 nagios.cfg
-rw-rw-r--. 1 nagios nagios   660 Feb 24 16:59 ndo.cfg
-rw-rw-r--. 1 nagios nagios 12838 Feb 24 17:01 nrpe.cfg
-rw-rw-r--. 1 nagios nagios  5345 Feb 24 17:01 nsca.cfg
drwxr-xr-x. 4 nagios nagios  4096 Apr 30 13:14 pnp
-rw-r--r--. 1 nagios nagios   210 Feb 24 16:58 resource.cfg
-rw-rw-r--. 1 nagios nagios  1627 Feb 24 17:01 send_nsca.cfg
drwxrwxr-x. 2 nagios nagios  4096 Feb 24 17:08 services
drwxrwxr-x. 2 nagios nagios  4096 Feb 24 17:08 static
Please attach your /tmp/xi-install.log file as well so we can see what occurred.

Code: Select all

[root@HOSTNAME /tmp ] # more /tmp/xi-install.log
/var/tmp/rpm-tmp.MIUbCI: line 19: ./rpminstall: Permission denied
Trying to do the "rm -rf /usr/local/nagiosxi/var/components/profile*​​" command, there is no /usr/local/nagiosxi folder structure. This means I cannot run the getprofile.sh script either:

Code: Select all

[root@HOSTNAME /tmp ] # ls /usr/local | grep nagios
nagios
Does the ./fullinstall require /tmp to have executable permissions because our environment has that disabled because of security requirements. We can enable it temporarily, but I will need to know for sure that it is required in order to ask for an exemption to enable it during the install.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Fresh, Offline Install Won't Start

Post by ssax »

Do you have noexec set on your /tmp? I'm wondering if that's why it's saying permission denied on the rpminstall script.

Code: Select all

mount | grep tmp
ls -ld /tmp
ls -ld /var/tmp
milewideinchdeep
Posts: 6
Joined: Fri Apr 30, 2021 8:44 am

Re: Fresh, Offline Install Won't Start

Post by milewideinchdeep »

The /tmp/xi-install.log entry of the following got me thinking yesterday:

Code: Select all

# more /tmp/xi-install.log
/var/tmp/rpm-tmp.MIUbCI: line 19: ./rpminstall: Permission denied
So, I systematically commented out the noexec line out of the /tmp line out of /etc/fstab and tried the install again and the same error appeared in the /tmp/xi-install.log.

BEFORE:

Code: Select all

/dev/mapper/vg00-lv_tmp /tmp                    ext4    nodev,noexec,nosuid 1 2
AFTER:

Code: Select all

/dev/mapper/vg00-lv_tmp /tmp                    ext4    nodev,nosuid 1 2
I then tried to remove the noexec entry from the /tmp entry IN ADDITION to the /var/tmp line in the /etc/fstab and tried the install again. Unfortunately, no luck. I got the identical entry in the /tmp/xi-install.log.

BEFORE:

Code: Select all

/dev/mapper/vg00-lv_tmp /tmp                    ext4    nodev,noexec,nosuid 1 2
/dev/mapper/vg00-lv_var_tmp /var/tmp                ext4    nodev,noexec,nosuid 1 2
AFTER:

Code: Select all

/dev/mapper/vg00-lv_tmp /tmp                    ext4    nodev,nosuid 1 2
/dev/mapper/vg00-lv_var_tmp /var/tmp                ext4    nodev,nosuid 1 2
After the second install attempt:

Code: Select all

# more /tmp/xi-install.log
/var/tmp/rpm-tmp.2DUPip: line 19: ./rpminstall: Permission denied
milewideinchdeep
Posts: 6
Joined: Fri Apr 30, 2021 8:44 am

Re: Fresh, Offline Install Won't Start

Post by milewideinchdeep »

So, I'm a dummy and forgot that after editing the /etc/fstab, you need to reboot the system for the change to take effect.

So, I tried to take the noexec portion of the /var/tmp line out and try the install and that didn't work (Same error). I tried to remove the noexec portion of the /var/tmp and /tmp lines in /etc/fstab and the installation seems to have succeeded. The service seems to start up now. I will test more when I get back from lunch. But that may be something you want to put into your install guide as a side note that it looks like noexec can not be present for /var/tmp or /tmp in /etc/fstab in order for the installation to complete and for the services to start successfully afterwards.
milewideinchdeep
Posts: 6
Joined: Fri Apr 30, 2021 8:44 am

Re: Fresh, Offline Install Won't Start

Post by milewideinchdeep »

Another follow-up.

After a successful installation, you can go ahead and add back the noexec option back into the /tmp and /var/tmp lines of the /etc/fstab file, restart the server and the Nagios service still starts/stops successfully. So, the noexec option only needs to be removed from /etc/fstab to get through the Nagios installation process.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Fresh, Offline Install Won't Start

Post by ssax »

Thanks for the updates, I've notified QA on this. So you're good to go then?
milewideinchdeep
Posts: 6
Joined: Fri Apr 30, 2021 8:44 am

Re: Fresh, Offline Install Won't Start

Post by milewideinchdeep »

Yup. Thanks so much for the help.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Fresh, Offline Install Won't Start

Post by scottwilkerson »

milewideinchdeep wrote:Yup. Thanks so much for the help.
Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked