Stuck at the start

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Stuck at the start

Post by avandemore »

Code: Select all

# setenforce 0
Previous Nagios employee
acovi006
Posts: 10
Joined: Thu Mar 23, 2017 12:09 pm

Re: Stuck at the start

Post by acovi006 »

I apologize for the delay. Here is the output:

[root@localhost ~]# chage -l nagios
Last password change : Mar 23, 2017
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
[root@localhost ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28
[root@localhost ~]# grep nag /etc/group
nagios:x:1000:
nagioscmd:x:1001:nagios
nagcmd:x:1002:nagios
[root@localhost ~]# grep "User \|Group " /etc/httpd/conf.d/nagios
grep: /etc/httpd/conf.d/nagios: No such file or directory
[root@localhost ~]# grep "User \|Group " /etc/httpd/conf.d/nagios
grep: /etc/httpd/conf.d/nagios: No such file or directory
[root@localhost ~]# service nagios status
No lock file found in /usr/local/nagios/var/nagios.lock
[root@localhost ~]# ps aux |grep nagios.cfg
root 26296 0.0 0.0 112648 964 pts/0 R+ 09:29 0:00 grep --color=auto nagios.cfg
[root@localhost ~]# ps aux |grep nagios.cfg
root 26298 0.0 0.0 112648 964 pts/0 R+ 09:29 0:00 grep --color=auto nagios.cfg
[root@localhost ~]# service nagios restart
Restarting nagios (via systemctl): Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
[FAILED]
[root@localhost ~]# tail -n100 /var/log/messages /usr/local/nagios/var/nagios.log
==> /var/log/messages <==
Mar 27 07:55:19 localhost systemd: Started Network Manager Script Dispatcher Service.
Mar 27 07:55:19 localhost nm-dispatcher: req:1 'dhcp4-change' [eth0]: new request (3 scripts)
Mar 27 07:55:19 localhost nm-dispatcher: req:1 'dhcp4-change' [eth0]: start running ordered scripts...
Mar 27 08:01:01 localhost systemd: Started Session 106 of user root.
Mar 27 08:01:01 localhost systemd: Starting Session 106 of user root.
Mar 27 08:18:09 localhost dhclient[10492]: DHCPREQUEST on eth0 to 10.216.211.58 port 67 (xid=0x4a85b1d1)
Mar 27 08:18:09 localhost dhclient[10492]: DHCPACK from 10.216.211.58 (xid=0x4a85b1d1)
Mar 27 08:18:09 localhost NetworkManager[650]: <info> [1490617089.3333] dhcp4 (eth0): address 10.216.211.252
Mar 27 08:18:09 localhost NetworkManager[650]: <info> [1490617089.3334] dhcp4 (eth0): plen 24 (255.255.255.0)
Mar 27 08:18:09 localhost NetworkManager[650]: <info> [1490617089.3335] dhcp4 (eth0): gateway 10.216.211.1
Mar 27 08:18:09 localhost NetworkManager[650]: <info> [1490617089.3335] dhcp4 (eth0): server identifier 10.216.211.58
Mar 27 08:18:09 localhost NetworkManager[650]: <info> [1490617089.3335] dhcp4 (eth0): lease time 3600
Mar 27 08:18:09 localhost NetworkManager[650]: <info> [1490617089.3335] dhcp4 (eth0): nameserver '150.150.212.21'
Mar 27 08:18:09 localhost NetworkManager[650]: <info> [1490617089.3335] dhcp4 (eth0): nameserver '10.216.197.5'
Mar 27 08:18:09 localhost NetworkManager[650]: <info> [1490617089.3336] dhcp4 (eth0): domain name 'hcpss.org'
Mar 27 08:18:09 localhost NetworkManager[650]: <info> [1490617089.3336] dhcp4 (eth0): state changed bound -> bound
Mar 27 08:18:09 localhost dbus[591]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Mar 27 08:18:09 localhost systemd: Starting Network Manager Script Dispatcher Service...
Mar 27 08:18:09 localhost dbus-daemon: dbus[591]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Mar 27 08:18:09 localhost dhclient[10492]: bound to 10.216.211.252 -- renewal in 1693 seconds.
Mar 27 08:18:09 localhost dbus[591]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Mar 27 08:18:09 localhost dbus-daemon: dbus[591]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Mar 27 08:18:09 localhost systemd: Started Network Manager Script Dispatcher Service.
Mar 27 08:18:09 localhost nm-dispatcher: req:1 'dhcp4-change' [eth0]: new request (3 scripts)
Mar 27 08:18:09 localhost nm-dispatcher: req:1 'dhcp4-change' [eth0]: start running ordered scripts...
Mar 27 08:46:22 localhost dhclient[10492]: DHCPREQUEST on eth0 to 10.216.211.58 port 67 (xid=0x4a85b1d1)
Mar 27 08:46:22 localhost dhclient[10492]: DHCPACK from 10.216.211.58 (xid=0x4a85b1d1)
Mar 27 08:46:22 localhost NetworkManager[650]: <info> [1490618782.5748] dhcp4 (eth0): address 10.216.211.252
Mar 27 08:46:22 localhost NetworkManager[650]: <info> [1490618782.5749] dhcp4 (eth0): plen 24 (255.255.255.0)
Mar 27 08:46:22 localhost NetworkManager[650]: <info> [1490618782.5749] dhcp4 (eth0): gateway 10.216.211.1
Mar 27 08:46:22 localhost NetworkManager[650]: <info> [1490618782.5749] dhcp4 (eth0): server identifier 10.216.211.58
Mar 27 08:46:22 localhost NetworkManager[650]: <info> [1490618782.5749] dhcp4 (eth0): lease time 3600
Mar 27 08:46:22 localhost NetworkManager[650]: <info> [1490618782.5750] dhcp4 (eth0): nameserver '150.150.212.21'
Mar 27 08:46:22 localhost NetworkManager[650]: <info> [1490618782.5750] dhcp4 (eth0): nameserver '10.216.197.5'
Mar 27 08:46:22 localhost NetworkManager[650]: <info> [1490618782.5750] dhcp4 (eth0): domain name 'hcpss.org'
Mar 27 08:46:22 localhost NetworkManager[650]: <info> [1490618782.5750] dhcp4 (eth0): state changed bound -> bound
Mar 27 08:46:22 localhost dbus[591]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Mar 27 08:46:22 localhost systemd: Starting Network Manager Script Dispatcher Service...
Mar 27 08:46:22 localhost dbus-daemon: dbus[591]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Mar 27 08:46:22 localhost dhclient[10492]: bound to 10.216.211.252 -- renewal in 1573 seconds.
Mar 27 08:46:22 localhost dbus[591]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Mar 27 08:46:22 localhost dbus-daemon: dbus[591]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Mar 27 08:46:22 localhost systemd: Started Network Manager Script Dispatcher Service.
Mar 27 08:46:22 localhost nm-dispatcher: req:1 'dhcp4-change' [eth0]: new request (3 scripts)
Mar 27 08:46:22 localhost nm-dispatcher: req:1 'dhcp4-change' [eth0]: start running ordered scripts...
Mar 27 09:01:01 localhost systemd: Started Session 107 of user root.
Mar 27 09:01:01 localhost systemd: Starting Session 107 of user root.
Mar 27 09:12:35 localhost dhclient[10492]: DHCPREQUEST on eth0 to 10.216.211.58 port 67 (xid=0x4a85b1d1)
Mar 27 09:12:35 localhost dhclient[10492]: DHCPACK from 10.216.211.58 (xid=0x4a85b1d1)
Mar 27 09:12:35 localhost NetworkManager[650]: <info> [1490620355.3238] dhcp4 (eth0): address 10.216.211.252
Mar 27 09:12:35 localhost NetworkManager[650]: <info> [1490620355.3239] dhcp4 (eth0): plen 24 (255.255.255.0)
Mar 27 09:12:35 localhost NetworkManager[650]: <info> [1490620355.3239] dhcp4 (eth0): gateway 10.216.211.1
Mar 27 09:12:35 localhost NetworkManager[650]: <info> [1490620355.3240] dhcp4 (eth0): server identifier 10.216.211.58
Mar 27 09:12:35 localhost NetworkManager[650]: <info> [1490620355.3240] dhcp4 (eth0): lease time 3600
Mar 27 09:12:35 localhost NetworkManager[650]: <info> [1490620355.3240] dhcp4 (eth0): nameserver '150.150.212.21'
Mar 27 09:12:35 localhost NetworkManager[650]: <info> [1490620355.3240] dhcp4 (eth0): nameserver '10.216.197.5'
Mar 27 09:12:35 localhost NetworkManager[650]: <info> [1490620355.3241] dhcp4 (eth0): domain name 'hcpss.org'
Mar 27 09:12:35 localhost NetworkManager[650]: <info> [1490620355.3241] dhcp4 (eth0): state changed bound -> bound
Mar 27 09:12:35 localhost dbus[591]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Mar 27 09:12:35 localhost systemd: Starting Network Manager Script Dispatcher Service...
Mar 27 09:12:35 localhost dbus-daemon: dbus[591]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Mar 27 09:12:35 localhost dhclient[10492]: bound to 10.216.211.252 -- renewal in 1676 seconds.
Mar 27 09:12:35 localhost dbus[591]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Mar 27 09:12:35 localhost dbus-daemon: dbus[591]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Mar 27 09:12:35 localhost systemd: Started Network Manager Script Dispatcher Service.
Mar 27 09:12:35 localhost nm-dispatcher: req:1 'dhcp4-change' [eth0]: new request (3 scripts)
Mar 27 09:12:35 localhost nm-dispatcher: req:1 'dhcp4-change' [eth0]: start running ordered scripts...
Mar 27 09:26:30 localhost systemd: Started Session 108 of user root.
Mar 27 09:26:30 localhost systemd-logind: New session 108 of user root.
Mar 27 09:26:30 localhost systemd: Starting Session 108 of user root.
Mar 27 09:30:08 localhost systemd: Starting LSB: Starts and stops the Nagios monitoring server...
Mar 27 09:30:08 localhost nagios: Starting nagios:
Mar 27 09:30:08 localhost nagios: Nagios Core 4.3.1
Mar 27 09:30:08 localhost nagios: Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Mar 27 09:30:08 localhost nagios: Copyright (c) 1999-2009 Ethan Galstad
Mar 27 09:30:08 localhost nagios: Last Modified: 02-23-2017
Mar 27 09:30:08 localhost nagios: License: GPL
Mar 27 09:30:08 localhost nagios: Website: https://www.nagios.org
Mar 27 09:30:08 localhost nagios: Reading configuration data...
Mar 27 09:30:08 localhost nagios: Read main config file okay...
Mar 27 09:30:08 localhost nagios: WARNING: The normal_check_interval attribute is deprecated and will be removed in future versions. Please use check_interval instead.
Mar 27 09:30:08 localhost nagios: WARNING: The normal_check_interval attribute is deprecated and will be removed in future versions. Please use check_interval instead.
Mar 27 09:30:08 localhost nagios: WARNING: The normal_check_interval attribute is deprecated and will be removed in future versions. Please use check_interval instead.
Mar 27 09:30:08 localhost nagios: WARNING: The normal_check_interval attribute is deprecated and will be removed in future versions. Please use check_interval instead.
Mar 27 09:30:08 localhost nagios: WARNING: The normal_check_interval attribute is deprecated and will be removed in future versions. Please use check_interval instead.
Mar 27 09:30:08 localhost nagios: Error: Could not open config directory '/usr/local/nagios/etc/servers' for reading.
Mar 27 09:30:08 localhost nagios: Error: Invalid max_check_attempts value for host 'hplj2605dn'
Mar 27 09:30:08 localhost nagios: Error: Could not register host (config file '/usr/local/nagios/etc/objects/printer.cfg', starting on line 24)
Mar 27 09:30:08 localhost nagios: Error processing object config files!
Mar 27 09:30:08 localhost nagios: ***> One or more problems was encountered while processing the config files...
Mar 27 09:30:08 localhost nagios: Check your configuration file(s) to ensure that they contain valid
Mar 27 09:30:08 localhost nagios: directives and data defintions. If you are upgrading from a previous
Mar 27 09:30:08 localhost nagios: version of Nagios, you should be aware that some variables/definitions
Mar 27 09:30:08 localhost nagios: may have been removed or modified in this version. Make sure to read
Mar 27 09:30:08 localhost nagios: the HTML documentation regarding the config files, as well as the
Mar 27 09:30:08 localhost nagios: 'Whats New' section to find out what has changed.
Mar 27 09:30:08 localhost systemd: nagios.service: control process exited, code=exited status=8
Mar 27 09:30:08 localhost systemd: Failed to start LSB: Starts and stops the Nagios monitoring server.
Mar 27 09:30:08 localhost systemd: Unit nagios.service entered failed state.
Mar 27 09:30:08 localhost systemd: nagios.service failed.

==> /usr/local/nagios/var/nagios.log <==
[1490328000] LOG ROTATION: DAILY
[1490328000] LOG VERSION: 2.0
[1490328000] CURRENT HOST STATE: localhost;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.14 ms
[1490328000] CURRENT SERVICE STATE: localhost;Current Load;OK;HARD;1;OK - load average: 0.01, 0.03, 0.05
[1490328000] CURRENT SERVICE STATE: localhost;Current Users;OK;HARD;1;USERS OK - 1 users currently logged in
[1490328000] CURRENT SERVICE STATE: localhost;HTTP;WARNING;HARD;4;HTTP WARNING: HTTP/1.1 403 Forbidden - 5179 bytes in 0.003 second response time
[1490328000] CURRENT SERVICE STATE: localhost;PING;OK;HARD;1;PING OK - Packet loss = 0%, RTA = 0.14 ms
[1490328000] CURRENT SERVICE STATE: localhost;Root Partition;OK;HARD;1;DISK OK - free space: / 25053 MB (93% inode=99%):
[1490328000] CURRENT SERVICE STATE: localhost;SSH;OK;HARD;1;SSH OK - OpenSSH_6.6.1 (protocol 2.0)
[1490328000] CURRENT SERVICE STATE: localhost;Swap Usage;OK;HARD;1;SWAP OK - 100% free (2943 MB out of 2943 MB)
[1490328000] CURRENT SERVICE STATE: localhost;Total Processes;OK;HARD;1;PROCS OK: 37 processes with STATE = RSZDT
[1490328525] Auto-save of retention data completed successfully.
[1490332125] Auto-save of retention data completed successfully.
[1490335725] Auto-save of retention data completed successfully.
[1490339325] Auto-save of retention data completed successfully.
[1490342925] Auto-save of retention data completed successfully.
[1490346525] Auto-save of retention data completed successfully.
[1490350125] Auto-save of retention data completed successfully.
[1490353725] Auto-save of retention data completed successfully.
[1490357326] Auto-save of retention data completed successfully.
[1490360925] Auto-save of retention data completed successfully.
[1490361597] Caught SIGTERM, shutting down...
[1490361597] Successfully shutdown... (PID=10679)
[1490361597] Event broker module 'NERD' deinitialized successfully.
[1490362558] Nagios 4.3.1 starting... (PID=20019)
[1490362558] Local time is Fri Mar 24 09:35:58 EDT 2017
[1490362558] LOG VERSION: 2.0
[1490362558] qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
[1490362558] qh: core query handler registered
[1490362558] nerd: Channel hostchecks registered successfully
[1490362558] nerd: Channel servicechecks registered successfully
[1490362558] nerd: Channel opathchecks registered successfully
[1490362558] nerd: Fully initialized and ready to rock!
[1490362558] wproc: Successfully registered manager as @wproc with query handler
[1490362558] wproc: Registry request: name=Core Worker 20024;pid=20024
[1490362558] wproc: Registry request: name=Core Worker 20021;pid=20021
[1490362558] wproc: Registry request: name=Core Worker 20022;pid=20022
[1490362558] wproc: Registry request: name=Core Worker 20023;pid=20023
[1490362558] WARNING: The normal_check_interval attribute is deprecated and will be removed in future versions. Please use check_interval instead.
[1490362558] WARNING: The normal_check_interval attribute is deprecated and will be removed in future versions. Please use check_interval instead.
[1490362558] Successfully launched command file worker with pid 20025
[1490366158] Auto-save of retention data completed successfully.
[1490369758] Auto-save of retention data completed successfully.
[1490371560] Caught SIGTERM, shutting down...
[1490371560] Successfully shutdown... (PID=20019)
[1490371560] Event broker module 'NERD' deinitialized successfully.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Stuck at the start

Post by scottwilkerson »

you have several errors in your nagios.cfg that will need to be fixed before you can proceed.

in there you have a directory configured to read config files from /usr/local/nagios/etc/servers which doesn't exist.

Additionally, you have an invalid max_check_attempts value for host 'hplj2605dn' that will need to be added/fixed.

If you are just getting started, many of these difficulties, can be eliminated by using our commercial solution that has a GUI to manage the configuration files.

Just offering the option https://www.nagios.com/products/nagios-xi/
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
acovi006
Posts: 10
Joined: Thu Mar 23, 2017 12:09 pm

Re: Stuck at the start

Post by acovi006 »

Thank you! :)

I was able to fix the error and restart the Nagios server to bring up the web url, but I am not sure where this host "hplj2605dn" is loaded. We do not even have a host by that name. The only host I added was an exchange server which doesn't appear.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Stuck at the start

Post by dwhitfield »

acovi006 wrote:The only host I added was an exchange server which doesn't appear.
For clarity, are you saying you added a host and it does not show up, or are you just saying it doesn't appear in the errors?
acovi006
Posts: 10
Joined: Thu Mar 23, 2017 12:09 pm

Re: Stuck at the start

Post by acovi006 »

Yes, I added a host that doesn't show up.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Stuck at the start

Post by dwhitfield »

Can you walk us through the process you used to add it? Most importantly, can you give us the config you are using for the exchange server? It's possible you accidentally set it up as a template.

This is the one that kicked off the issue to start with, correct? Did you try re-adding it after you worked through the errors?
Locked