Page 1 of 1

RPM for 5.5.5 is broken. Won't install properly on CentOS 7

Posted: Fri Oct 26, 2018 9:17 pm
by dflick
Fully patched CentOS 7 x64
Installed the NagiosXI repository and installed from yum.
Install leaves snmptt and snmptrapd disabled.
Nagios won't start. Complains that the service is marked executable.

[root@nagiosxi-test ~]# systemctl status nagiosxi
Unit nagiosxi.service could not be found.
[root@nagiosxi-test ~]# systemctl status nagios
● nagios.service - Nagios Core 4.4.2
Loaded: loaded (/usr/lib/systemd/system/nagios.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: https://www.nagios.org/documentation
[root@nagiosxi-test ~]# 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.
[root@nagiosxi-test ~]# systemctl status nagios.service
● nagios.service - Nagios Core 4.4.2
Loaded: loaded (/usr/lib/systemd/system/nagios.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2018-10-26 21:02:33 CDT; 12s ago
Docs: https://www.nagios.org/documentation
Process: 12091 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=1/FAILURE)

Oct 26 21:02:33 nagiosxi-test nagios[12091]: Check your configuration file(s) to ensure that they contain valid
Oct 26 21:02:33 nagiosxi-test nagios[12091]: directives and data definitions. If you are upgrading from a previous
Oct 26 21:02:33 nagiosxi-test nagios[12091]: version of Nagios, you should be aware that some variables/definitions
Oct 26 21:02:33 nagiosxi-test nagios[12091]: may have been removed or modified in this version. Make sure to read
Oct 26 21:02:33 nagiosxi-test nagios[12091]: the HTML documentation regarding the config files, as well as the
Oct 26 21:02:33 nagiosxi-test nagios[12091]: 'Whats New' section to find out what has changed.
Oct 26 21:02:33 nagiosxi-test systemd[1]: nagios.service: control process exited, code=exited status=1
Oct 26 21:02:33 nagiosxi-test systemd[1]: Failed to start Nagios Core 4.4.2.
Oct 26 21:02:33 nagiosxi-test systemd[1]: Unit nagios.service entered failed state.
Oct 26 21:02:33 nagiosxi-test systemd[1]: nagios.service failed.
[root@nagiosxi-test ~]# journalctl -xe
Oct 26 21:02:33 nagiosxi-test systemd[1]: Configuration file /usr/lib/systemd/system/nagios.service is marked executable. Please remove executable permiss
Oct 26 21:02:33 nagiosxi-test systemd[1]: Starting Nagios Core 4.4.2...
-- Subject: Unit nagios.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit nagios.service has begun starting up.
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Nagios Core 4.4.2
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Copyright (c) 1999-2009 Ethan Galstad
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Last Modified: 2018-08-16
Oct 26 21:02:33 nagiosxi-test nagios[12091]: License: GPL
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Website: https://www.nagios.org
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Reading configuration data...
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Read main config file okay...
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Error: Cannot open config file '/usr/local/nagios/etc/contacttemplates.cfg' for reading: No such file or dire
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Error processing object config files!
Oct 26 21:02:33 nagiosxi-test nagios[12091]: ***> One or more problems was encountered while processing the config files...
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Check your configuration file(s) to ensure that they contain valid
Oct 26 21:02:33 nagiosxi-test nagios[12091]: directives and data definitions. If you are upgrading from a previous
Oct 26 21:02:33 nagiosxi-test nagios[12091]: version of Nagios, you should be aware that some variables/definitions
Oct 26 21:02:33 nagiosxi-test nagios[12091]: may have been removed or modified in this version. Make sure to read
Oct 26 21:02:33 nagiosxi-test nagios[12091]: the HTML documentation regarding the config files, as well as the
Oct 26 21:02:33 nagiosxi-test nagios[12091]: 'Whats New' section to find out what has changed.
Oct 26 21:02:33 nagiosxi-test polkitd[617]: Unregistered Authentication Agent for unix-process:12085:163326 (system bus name :1.49, object path /org/freed
Oct 26 21:02:33 nagiosxi-test systemd[1]: nagios.service: control process exited, code=exited status=1
Oct 26 21:02:33 nagiosxi-test systemd[1]: Failed to start Nagios Core 4.4.2.
-- Subject: Unit nagios.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit nagios.service has failed.
--
-- The result is failed.
Oct 26 21:02:33 nagiosxi-test systemd[1]: Unit nagios.service entered failed state.
Oct 26 21:02:33 nagiosxi-test systemd[1]: nagios.service failed.
Oct 26 21:02:45 nagiosxi-test systemd[1]: Configuration file /usr/lib/systemd/system/nagios.service is marked executable. Please remove executable permiss

[1]+ Stopped journalctl -xe
[root@nagiosxi-test ~]# fg
journalctl -xe
Oct 26 21:02:33 nagiosxi-test systemd[1]: Configuration file /usr/lib/systemd/system/nagios.service is marked executable. Please remove executable permiss
Oct 26 21:02:33 nagiosxi-test systemd[1]: Starting Nagios Core 4.4.2...
-- Subject: Unit nagios.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit nagios.service has begun starting up.
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Nagios Core 4.4.2
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Copyright (c) 1999-2009 Ethan Galstad
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Last Modified: 2018-08-16
Oct 26 21:02:33 nagiosxi-test nagios[12091]: License: GPL
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Website: https://www.nagios.org
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Reading configuration data...
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Read main config file okay...
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Error: Cannot open config file '/usr/local/nagios/etc/contacttemplates.cfg' for reading: No such file or dire
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Error processing object config files!
Oct 26 21:02:33 nagiosxi-test nagios[12091]: ***> One or more problems was encountered while processing the config files...
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Check your configuration file(s) to ensure that they contain valid
Oct 26 21:02:33 nagiosxi-test nagios[12091]: directives and data definitions. If you are upgrading from a previous
Oct 26 21:02:33 nagiosxi-test nagios[12091]: version of Nagios, you should be aware that some variables/definitions
Oct 26 21:02:33 nagiosxi-test nagios[12091]: may have been removed or modified in this version. Make sure to read
Oct 26 21:02:33 nagiosxi-test nagios[12091]: the HTML documentation regarding the config files, as well as the
Oct 26 21:02:33 nagiosxi-test nagios[12091]: 'Whats New' section to find out what has changed.
Oct 26 21:02:33 nagiosxi-test polkitd[617]: Unregistered Authentication Agent for unix-process:12085:163326 (system bus name :1.49, object path /org/freed
Oct 26 21:02:33 nagiosxi-test systemd[1]: nagios.service: control process exited, code=exited status=1
Oct 26 21:02:33 nagiosxi-test systemd[1]: Failed to start Nagios Core 4.4.2.
-- Subject: Unit nagios.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit nagios.service has failed.
--
-- The result is failed.
Oct 26 21:02:33 nagiosxi-test systemd[1]: Unit nagios.service entered failed state.
Oct 26 21:02:33 nagiosxi-test systemd[1]: nagios.service failed.
Oct 26 21:02:45 nagiosxi-test systemd[1]: Configuration file /usr/lib/systemd/system/nagios.service is marked executable. Please remove executable permiss
[root@nagiosxi-test ~]# yum -y install iptraf tcpdump mlocate wget perl open-vm-tools iotop python-pip rrdtool-perl nagiosxi ncpa yum-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.dc2.hackingand.coffee
* extras: mirror.dc2.hackingand.coffee
* updates: mirror.dc2.hackingand.coffee
Package iptraf-ng-1.1.4-6.el7.x86_64 already installed and latest version
Package 14:tcpdump-4.9.2-3.el7.x86_64 already installed and latest version
Package mlocate-0.26-8.el7.x86_64 already installed and latest version
Package wget-1.14-15.el7_4.1.x86_64 already installed and latest version
Package 4:perl-5.16.3-292.el7.x86_64 already installed and latest version
Package open-vm-tools-10.1.10-3.el7_5.1.x86_64 already installed and latest version
Package iotop-0.6-2.el7.noarch already installed and latest version
No package python-pip available.
Package rrdtool-perl-1.4.9-1.el7.x86_64 already installed and latest version
Package nagiosxi-5.5.5-1.el7.x86_64 already installed and latest version
Package ncpa-2.1.6-1.el7.x86_64 already installed and latest version
Package yum-utils-1.1.31-46.el7_5.noarch already installed and latest version
Nothing to do
[root@nagiosxi-test ~]# service nagios start
Redirecting to /bin/systemctl start nagios.service
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
[root@nagiosxi-test ~]#
[root@nagiosxi-test ~]# ls -l /usr/lib/systemd/system/nagios.service
-rwxr-xr-x. 1 root root 477 Oct 11 12:08 /usr/lib/systemd/system/nagios.service
[root@nagiosxi-test ~]# chmod -x /usr/lib/systemd/system/nagios.service
[root@nagiosxi-test ~]# service nagios start
Redirecting to /bin/systemctl start nagios.service
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
[root@nagiosxi-test ~]# systemctl status nagios.service
● nagios.service - Nagios Core 4.4.2
Loaded: loaded (/usr/lib/systemd/system/nagios.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2018-10-26 21:08:45 CDT; 9s ago
Docs: https://www.nagios.org/documentation
Process: 12436 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=1/FAILURE)

Re: RPM for 5.5.5 is broken. Won't install properly on Cent

Posted: Mon Oct 29, 2018 10:20 am
by lmiltchev
I haven't been able to recreate the issue -h-house... I ran the following commands on a clean, updated system (CentOS 7, 64-bit):

Code: Select all

yum install epel-release
yum update
rpm -Uvh https://repo.nagios.com/nagios/7/nagios-repo-7-3.el7.noarch.rpm
yum update
yum install nagiosxi
Nagios XI installed just fine, and nagios service is up and running:

Code: Select all

[root@devbox ~]# systemctl status nagios.service
● nagios.service - Nagios Core 4.4.2
   Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2018-10-29 10:01:09 CDT; 24s ago
     Docs: https://www.nagios.org/documentation
  Process: 13309 ExecStopPost=/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd (code=exited, status=0/SUCCESS)
  Process: 13307 ExecStop=/bin/kill -s TERM ${MAINPID} (code=exited, status=0/SUCCESS)
  Process: 13313 ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
  Process: 13312 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
 Main PID: 13315 (nagios)
   CGroup: /system.slice/nagios.service
           ├─13315 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
           ├─13317 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
           ├─13318 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
           ├─13320 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
           ├─13321 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
           ├─13322 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
           ├─13323 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
           └─13331 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

Oct 29 10:01:09 devbox nagios[13315]: ndomod registered for aggregated status data'
Oct 29 10:01:09 devbox nagios[13315]: ndomod registered for retention data'
Oct 29 10:01:09 devbox nagios[13315]: ndomod registered for contact data'
Oct 29 10:01:09 devbox nagios[13315]: ndomod registered for contact notification data'
Oct 29 10:01:09 devbox nagios[13315]: ndomod registered for acknowledgement data'
Oct 29 10:01:09 devbox nagios[13315]: ndomod registered for state change data'
Oct 29 10:01:09 devbox nagios[13315]: ndomod registered for contact status data'
Oct 29 10:01:09 devbox nagios[13315]: ndomod registered for adaptive contact data'
Oct 29 10:01:09 devbox nagios[13315]: Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
Oct 29 10:01:09 devbox nagios[13315]: Successfully launched command file worker with pid 13331
Did you install Nagios XI the same way? Can you elaborate on the following?
Install leaves snmptt and snmptrapd disabled.
Is this an offline install? Can you describe all of the steps you took when trying to install Nagios XI? Did you have all of the dependencies installed? Can you upload the entire /tmp/xi-install.log?
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Error: Cannot open config file '/usr/local/nagios/etc/contacttemplates.cfg' for reading: No such file or dire
Oct 26 21:02:33 nagiosxi-test nagios[12091]: Error processing object config files!
Have you removed your contact templates? Most probably nagios is not starting due to a config error...

Re: RPM for 5.5.5 is broken. Won't install properly on Cent

Posted: Mon Oct 29, 2018 5:02 pm
by dfmco
The 1st install left snmptt and snmptrapd disabled. I worked on it for a few days but even though the system was receiving traps, (verified with sniffer), Nagios would not find them in unknown objects or in the snmp trap service for the host.

I gave up and figured it was a problem with the install which was completely clean to begin with but I reinstalled the CentOS 7 fresh and patched and installed Nagios EXACTLY like you showed. Now Nagios, snmptrapd AND snmptt were all disabled (even after reboots) and I can't start Nagios. Since this was a brand new install, I should not have to do anything with the contacts config.

I did not want to go through the install yet again without trying to figure out why the first 2 installs failed. This is on VMware ESXi version 6.0.

Re: RPM for 5.5.5 is broken. Won't install properly on Cent

Posted: Tue Oct 30, 2018 11:22 am
by lmiltchev
Can you post the /tmp/xi-install.log?

I can verify that on a fresh RPM install the "snmptrapd.service" and "snmptt.service" are started (running), however the "snmpd.service", "snmptrapd.service", and "snmptt.service" are disabled, so they won't start after reboot.

Code: Select all

[root@TEST_XI_CentOS_7 ~]# systemctl | grep running | grep snmp
snmptrapd.service                                                                         loaded active running   Simple Network Management Protocol (SNMP) Trap Daemon.
snmptt.service                                                                            loaded active running   SNMP Trap Translator (SNMPTT)

[root@TEST_XI_CentOS_7 ~]# systemctl list-unit-files | grep snmp
snmpd.service                                 disabled
snmptrapd.service                             disabled
snmptt.service                                disabled
You can however enable these services by running:

Code: Select all

systemctl enable snmpd.service
systemctl enable snmptrapd.service
systemctl enable snmptt.service
You do not need to reinstall Nagios XI in order to enable/start the SNMP services.

Do you see any config errors when you verify configs from the command line?

Code: Select all

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

Re: RPM for 5.5.5 is broken. Won't install properly on Cent

Posted: Tue Oct 30, 2018 1:19 pm
by dfmco
On my install (fresh) all 3 services did not start. nagios fails to start and the snmp services start but were both disabled. Jorge is posting the log soon.

Re: RPM for 5.5.5 is broken. Won't install properly on Cent

Posted: Tue Oct 30, 2018 1:32 pm
by lmiltchev
I gave up and figured it was a problem with the install which was completely clean to begin with but I reinstalled the CentOS 7 fresh and patched and installed Nagios EXACTLY like you showed.
If you did a RPM install, then tried to reinstall, you would see the following message:
Package nagiosxi-5.5.5-1.el7.x86_64 already installed and latest version
Nothing to do
Nothing would change. What commands did you run the "patch" the CentOS 7 server? Is SELinux enabled?

Code: Select all

sestatus

Re: RPM for 5.5.5 is broken. Won't install properly on Cent

Posted: Tue Oct 30, 2018 1:35 pm
by dfmco
Patched the server meaning:
yum -y update

[root@nagiosxi-test ~]# sestatus
SELinux status: disabled

[root@nagiosxi-test ~]# cat /tmp/xi-install.log
Adding users and groups...
useradd: user 'nagios' already exists
groupadd: group 'nagios' already exists
groupadd: group 'nagcmd' already exists
Users and groups added OK
MySQL installed OK - continuing...
Starting MySQL...
Redirecting to /bin/systemctl restart mariadb.service
Initializing MySQL...
MySQL root password is now set to: nagiosxi
MySQL initialized OK
Database servers initialized OK
/etc/services updated
sudoers configured OK
success
success
success
success
success
Firewall rules updated OK
SELinux Disabled
Database backups configured OK
Archive: sourceguardian/ixed4.lin.x86-64.zip
inflating: /usr/lib64/php/modules/ixed.5.4.lin
Sourceguardian extension found for PHP version 5.4
Adding Sourceguardian extension to php.ini
Redirecting to /bin/systemctl restart httpd.service
Installed SourceGuardian loaders
PHP configured OK
Installing Nagios XI base files...
Creating product directory...
chown: cannot access ‘/usr/local/nagiosxi/tmp’: No such file or directory

Re: RPM for 5.5.5 is broken. Won't install properly on Cent

Posted: Wed Oct 31, 2018 12:59 pm
by benjaminsmith
Hi @dfmco

I discussed your issue with some of the other team members, and we feel it would best to open a support ticket along with a possible remote assist to resolve this issue.

Let me know if you have any questions.

Nagios Support Tickets
https://support.nagios.com/tickets/scp/

Re: RPM for 5.5.5 is broken. Won't install properly on Cent

Posted: Wed Oct 31, 2018 1:03 pm
by dfmco
How can I access that site? I tried my login but it did not allow me in...

Re: RPM for 5.5.5 is broken. Won't install properly on Cent

Posted: Wed Oct 31, 2018 1:13 pm
by lmiltchev
Actually, the correct link is:

https://support.nagios.com/tickets/