Page 2 of 2

Re: Nagios restart command failed

Posted: Mon Aug 15, 2016 3:18 pm
by mdsupersonic
No I locally log in to the server with root .

Re: Nagios restart command failed

Posted: Mon Aug 15, 2016 3:25 pm
by mdsupersonic
it is something weird,from the beginning of Nagios installation I had error in UI Log in which is related to Mariadb .I got a repair command i did it and it worked.
Nagios wasn't like this which starts with error and I also have old Nagios in production and I've done it several times without any errors but this new version makes so many troubles.

root@tornagios3 init.d]# systemctl status nagios
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios)
Active: failed (Result: exit-code) since Mon 2016-08-15 16:21:38 EDT; 1min 28s ago
Docs: man:systemd-sysv-generator(8)
Process: 20298 ExecStop=/etc/rc.d/init.d/nagios stop (code=exited, status=0/SUCCESS)
Process: 20317 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=127)
CGroup: /system.slice/nagios.service
├─20337 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
├─20339 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
├─20340 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
├─20341 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
├─20342 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
├─20351 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
└─21954 /usr/local/nagios/libexec/check_icmp -H 10.40.6.48 -w 3000.0 80 -c 5000.0 100 -p 5

Aug 15 16:22:59 tornagios3.telmetrics.corp nagios[20337]: SERVICE ALERT: Core1Sandbox2;Memory Usage;WARNING;HARD;5;could not fetch information from server
Aug 15 16:23:00 tornagios3.telmetrics.corp nagios[20337]: SERVICE ALERT: Core2Numa;Drive C: Disk Usage;WARNING;HARD;5;could not fetch information from server
Aug 15 16:23:00 tornagios3.telmetrics.corp nagios[20337]: SERVICE FLAPPING ALERT: Core2Numa;Drive C: Disk Usage;STARTED; Service appears to have started flapping (21.8% change >= 20.0% threshold)
Aug 15 16:23:01 tornagios3.telmetrics.corp nagios[20337]: SERVICE ALERT: CorpDASHBOARD;Drive E: Disk Usage;UNKNOWN;HARD;5;Free disk space : Invalid drive
Aug 15 16:23:01 tornagios3.telmetrics.corp nagios[20337]: SERVICE ALERT: Core2SQL11;Service - SNMP;UNKNOWN;HARD;5;could not fetch information from server
Aug 15 16:23:01 tornagios3.telmetrics.corp nagios[20337]: SERVICE ALERT: CorpDASHBOARD;Service - SNMP;UNKNOWN;HARD;5;could not fetch information from server
Aug 15 16:23:03 tornagios3.telmetrics.corp nagios[20337]: SERVICE ALERT: TorRoute2;Swap Usage;CRITICAL;SOFT;2;CHECK_NRPE: Error - Could not complete SSL handshake.
Aug 15 16:23:04 tornagios3.telmetrics.corp nagios[20337]: SERVICE ALERT: TorRoute3;SSH Server;CRITICAL;SOFT;2;CHECK_NRPE: Error - Could not complete SSL handshake.
Aug 15 16:23:04 tornagios3.telmetrics.corp nagios[20337]: SERVICE ALERT: TorRoute2;/Disk Usage;CRITICAL;SOFT;2;CHECK_NRPE: Error - Could not complete SSL handshake.
Aug 15 16:23:04 tornagios3.telmetrics.corp nagios[20337]: SERVICE ALERT: Core1Loader4;Service - BackupExecAgentAccelerator;WARNING;HARD;5;could not fetch information from server
[root@tornagios3 init.d]#

what is this mean? ----> code=exited, status=127)
it can not start /etc/rd.c/init.d/nagios start
I assume there is something related to this script.

Re: Nagios restart command failed

Posted: Mon Aug 15, 2016 4:43 pm
by lmiltchev
Run the following commands, and show the output:

Code: Select all

grep nag /etc/group
ls -la /etc/rc.d/init.d
ls -la /etc/rc.d/init.d/nagios
service nagios stop
bash -x /etc/rc.d/init.d/nagios start

Re: Nagios restart command failed

Posted: Tue Aug 16, 2016 8:37 am
by mdsupersonic
[root@tornagios3 ~]# grep nag /etc/group
nagios:x:1000:nagios,apache,snmptt
nagcmd:x:1001:nagios,apache,snmptt

[root@tornagios3 ~]# ls -la /etc/rc.d/init.d
total 68
drwxr-xr-x. 2 root root 4096 Aug 3 15:24 .
drwxr-xr-x. 10 root root 4096 Nov 20 2015 ..
-rwxr-xr-x. 1 root root 1409 Apr 7 2009 ajaxterm
-rw-r--r--. 1 root root 13948 Sep 16 2015 functions
-rwxr-xr-x. 1 root root 7483 Aug 5 09:22 nagios
-rwxr-xr-x. 1 root root 1206 Aug 3 15:24 nagiosxi
-rwxr-xr-x. 1 root root 4476 Aug 3 15:23 ndo2db
-rwxr-xr-x. 1 root root 2989 Sep 16 2015 netconsole
-rwxr-xr-x. 1 root root 6630 Sep 16 2015 network
-rwxr-xr-x. 1 root root 1926 Aug 3 15:23 npcd
-rw-r--r--. 1 root root 1160 Nov 19 2015 README


[root@tornagios3 ~]# ls -la /etc/rc.d/init.d/nagios
-rwxr-xr-x. 1 root root 7483 Aug 5 09:22 /etc/rc.d/init.d/nagios

[root@tornagios3 ~]# service nagios stop
Stopping nagios (via systemctl): [ OK ]



[root@tornagios3 ~]# bash -x /etc/rc.d/init.d/nagios start
+ prefix=/usr/local/nagios
+ exec_prefix=/usr/local/nagios
+ NagiosBin=/usr/local/nagios/bin/nagios
+ NagiosCfgFile=/usr/local/nagios/etc/nagios.cfg
+ NagiosCfgtestFile=/usr/local/nagios/var/nagios.configtest
+ NagiosStatusFile=/usr/local/nagios/var/status.dat
+ NagiosRetentionFile=/usr/local/nagios/var/retention.dat
+ NagiosCommandFile=/usr/local/nagios/var/rw/nagios.cmd
+ NagiosVarDir=/usr/local/nagios/var
+ NagiosRunFile=/usr/local/nagios/var/nagios.lock
+ NagiosLockDir=/usr/local/nagiosxi/var/subsys
+ NagiosLockFile=nagios
+ NagiosCGIDir=/usr/local/nagios/sbin
+ NagiosUser=nagios
+ NagiosGroup=nagios
+ checkconfig=true
+ '[' -f /etc/rc.d/init.d/functions ']'
+ . /etc/rc.d/init.d/functions
++ TEXTDOMAIN=initscripts
++ umask 022
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ export PATH
++ '[' 23770 -ne 1 -a -z '' ']'
++ /bin/mountpoint -q /cgroup/systemd
++ /bin/mountpoint -q /sys/fs/cgroup/systemd
++ case "$0" in
++ _use_systemctl=1
++ '[' -z '' ']'
++ COLUMNS=80
++ '[' -z '' ']'
++ '[' -c /dev/stderr -a -r /dev/stderr ']'
+++ /sbin/consoletype
++ CONSOLETYPE=pty
++ '[' -z '' ']'
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/i18n -o -f /etc/locale.conf ']'
++ . /etc/profile.d/lang.sh
++ unset LANGSH_SOURCED
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/init ']'
++ . /etc/sysconfig/init
+++ BOOTUP=color
+++ RES_COL=60
+++ MOVE_TO_COL='echo -en \033[60G'
+++ SETCOLOR_SUCCESS='echo -en \033[0;32m'
+++ SETCOLOR_FAILURE='echo -en \033[0;31m'
+++ SETCOLOR_WARNING='echo -en \033[0;33m'
+++ SETCOLOR_NORMAL='echo -en \033[0;39m'
++ '[' pty = serial ']'
++ __sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'
++ '[' 1 = 1 ']'
++ '[' xstart = xstart -o xstart = xstop -o xstart = xrestart -o xstart = xreload -o xstart = xtry-restart -o xstart = xforce-reload -o xstart = xcondrestart ']'
++ systemctl_redirect /etc/rc.d/init.d/nagios start
++ local s
++ local prog=nagios
++ local command=start
++ local options=
++ case "$command" in
++ s='Starting nagios (via systemctl): '
++ '[' -n '' ']'
++ systemctl show -p LoadState nagios.service
++ grep -q not-found
++ action 'Starting nagios (via systemctl): ' /bin/systemctl start nagios.service
++ local STRING rc
++ STRING='Starting nagios (via systemctl): '
++ echo -n 'Starting nagios (via systemctl): '
Starting nagios (via systemctl): ++ shift
++ /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.
++ failure 'Starting nagios (via systemctl): '
++ local rc=1
++ '[' color '!=' verbose -a -z '' ']'
++ echo_failure
++ '[' color = color ']'
++ echo -en '\033[60G'
++ echo -n '['
[++ '[' color = color ']'
++ echo -en '\033[0;31m'
++ echo -n FAILED
FAILED++ '[' color = color ']'
++ echo -en '\033[0;39m'
++ echo -n ']'
]++ echo -ne '\r'
++ return 1
++ '[' -x /bin/plymouth ']'
++ /bin/plymouth --details
++ return 1
++ rc=1
++ echo

++ return 1
++ exit 1

Re: Nagios restart command failed

Posted: Tue Aug 16, 2016 9:45 am
by lmiltchev
The debug output was not as helpful as I hoped for. :(
It seems like we will have to schedule a remote session to further troubleshoot your problem. Please open a new support ticket in our e-mail ticketing system by sending your latest profile (Admin-System Profile->Download Profile) to [email protected]. Type "Nagios restart command failed" in the subject field, and provide a URL link to this post in the email's body. Thank you!

Re: Nagios restart command failed

Posted: Tue Aug 16, 2016 10:20 am
by mdsupersonic
Done

Re: Nagios restart command failed

Posted: Tue Aug 16, 2016 10:47 am
by rkennedy
Closing this out as I see a ticket has been received.