Nagios XI service failed to start after the installation

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jagangorle
Posts: 1
Joined: Thu Sep 05, 2019 5:27 am

Nagios XI service failed to start after the installation

Post by jagangorle »

InstallationLog.txt
I am doing fresh off-line installation on RHEL 7.6.
Nagios XI service failed to start after the installation though installation shows as "Complete".
Is any observed the same issue?

################# Installation output #############
Refer attached file for complete installation log.

Complete!
Uploading Enabled Repositories Report
Loaded plugins: langpacks, product-id, subscription-manager
##################################################

Tried to find out status after installation and following error message observed:

# service nagios status
Redirecting to /bin/systemctl status nagios.service
● nagios.service - Nagios Core 4.4.3
Loaded: loaded (/usr/lib/systemd/system/nagios.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2019-09-05 17:40:52 +08; 52min ago
Docs: https://www.nagios.org/documentation
Process: 22930 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=1/FAILURE)

Sep 05 17:40:52 nagprdappls001.sg.singtelgroup.net nagios[22930]: Check your configuration file(s) to ensure that they contain valid
Sep 05 17:40:52 nagprdappls001.sg.singtelgroup.net nagios[22930]: directives and data definitions. If you are upgrading from a previous
Sep 05 17:40:52 nagprdappls001.sg.singtelgroup.net nagios[22930]: version of Nagios, you should be aware that some variables/definitions
Sep 05 17:40:52 nagprdappls001.sg.singtelgroup.net nagios[22930]: may have been removed or modified in this version. Make sure to read
Sep 05 17:40:52 nagprdappls001.sg.singtelgroup.net nagios[22930]: the HTML documentation regarding the config files, as well as the
Sep 05 17:40:52 nagprdappls001.sg.singtelgroup.net nagios[22930]: 'Whats New' section to find out what has changed.
Sep 05 17:40:52 nagprdappls001.sg.singtelgroup.net systemd[1]: nagios.service: control process exited, code=exited status=1
Sep 05 17:40:52 nagprdappls001.sg.singtelgroup.net systemd[1]: Failed to start Nagios Core 4.4.3.
Sep 05 17:40:52 nagprdappls001.sg.singtelgroup.net systemd[1]: Unit nagios.service entered failed state.
Sep 05 17:40:52 nagprdappls001.sg.singtelgroup.net systemd[1]: nagios.service failed.
[root@nagprdappls001 jagan]#
[root@nagprdappls001 jagan]#
[root@nagprdappls001 jagan]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel-rootvol 40G 2.8G 38G 7% /
devtmpfs 32G 0 32G 0% /dev
tmpfs 32G 0 32G 0% /dev/shm
tmpfs 32G 12M 32G 1% /run
tmpfs 32G 0 32G 0% /sys/fs/cgroup
/dev/mapper/rhel-lv_ctm 11G 33M 11G 1% /ctmagent
/dev/mapper/rhel-lv_tmp 2.0G 33M 2.0G 2% /tmp
/dev/mapper/rhel-lv_home 10G 250M 9.8G 3% /home
/dev/mapper/rhel-lv_nagiosxi 50G 33M 50G 1% /usr/local/nagiosxi
/dev/mapper/rhel-lv_var 12G 1.6G 9.7G 14% /var
/dev/mapper/rhel-lv_log 4.0G 38M 4.0G 1% /var/log
/dev/mapper/rhel-lv_nagios 10G 64M 10G 1% /usr/local/nagios
/dev/mapper/rhel-lv_audit 2.0G 73M 2.0G 4% /var/log/audit
/dev/sda1 509M 177M 332M 35% /boot
tmpfs 6.3G 0 6.3G 0% /run/user/1011
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Nagios XI service failed to start after the installation

Post by benjaminsmith »

Hello @jagangorle,

Have you added any configuration files yet as there may be an error. What is the output of the following command:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Also, is SELinux enabled?

Code: Select all

sestatus
umask
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
mrafiq
Posts: 5
Joined: Fri Mar 01, 2019 11:34 am

Re: Nagios XI service failed to start after the installation

Post by mrafiq »

Same issue. Brand new install.

/usr/sbin/nagios -v /etc/nagios/nagios.cfg
-bash: /usr/sbin/nagios: No such file or directory

sestatus
SELinux status: disabled

umask
0022
mrafiq
Posts: 5
Joined: Fri Mar 01, 2019 11:34 am

Re: Nagios XI service failed to start after the installation

Post by mrafiq »

This is the correct path: How can this file be missing?

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.4.3
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2019-01-15
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Cannot open config file '/usr/local/nagios/etc/contacttemplates.cfg' for reading: No such file or directory
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data definitions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Nagios XI service failed to start after the installation

Post by benjaminsmith »

Hello @mrafiq,

It looks like there is nothing in /usr/local/nagiosxi/, so it's not completing for some reason. Just to verify, did you download the Offline tarball and follow the instructions on this page when running the install script?

Nagios Repositories Offline Install

Full Documentation
Installing Nagios XI In An Offline Environment
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
mrafiq
Posts: 5
Joined: Fri Mar 01, 2019 11:34 am

Re: Nagios XI service failed to start after the installation

Post by mrafiq »

It is not even creating the nagiosxi directory:

ll /usr/local/nag
nagios/ nagiosmobile/ nagvis/

while previously on a different server it did:

ll /usr/local/nag
nagios/ nagiosmobile/ nagiosxi/ nagvis/

Yes, followed the full documentation link.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Nagios XI service failed to start after the installation

Post by benjaminsmith »

Hello @mrafiq,

There is an installation log in /tmp/xi-install.log. Can you upload this or post the contents to the thread for us to review? Thanks.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
mrafiq
Posts: 5
Joined: Fri Mar 01, 2019 11:34 am

Re: Nagios XI service failed to start after the installation

Post by mrafiq »

Turns out hardening the server before XI installation was causing the issue.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Nagios XI service failed to start after the installation

Post by benjaminsmith »

Hello @mrafiq,
Turns out hardening the server before XI installation was causing the issue.
Thanks for the update and it sounds like you got it worked out.

May we close this thread or did you need anything else?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
mrafiq
Posts: 5
Joined: Fri Mar 01, 2019 11:34 am

Re: Nagios XI service failed to start after the installation

Post by mrafiq »

Back with a similar issue, again, related to CIS hardening. After Nagios XI is installed and running fine, we enable CIS, and re-deploy the server, which has worked fine in the past. This time, getting this error:

"msg": "Could not find the requested service chargen-dgram: host"
}

RUNNING HANDLER [rhl_sec_CIS : systemd restart tmp.mount]
Locked