Page 1 of 1

"Not running" in WebUI after upgrade from3.5.1 to 4.2.2

Posted: Sun Nov 13, 2016 1:29 pm
by alexnorton
Hello!

Few days ago I upgrade Nagios Core from 3.5.1 to 4.2.2. Old version was installed from repo, new version was installed from sources. I move all configuration files to directories related to new version, corrects all parameters. Nagios service "per se" working correctly.

Service status:

Code: Select all

service nagios status
nagios (pid 29617) is running...


Process list:

Code: Select all

 ps aux|grep nagios
nagios     569  0.0  0.0 116464   984 ?        S    18:21   0:00 /usr/lib64/nagios/plugins/check_ping -H X.X.X.X -w 3000.0,80% -c 5000.0,100% -p 5
nagios     570  0.0  0.0  10800   900 ?        S    18:21   0:00 /bin/ping -n -U -w 30 -c 5 Y.Y.Y.Y
root       575  0.0  0.0 110456  2136 pts/0    S+   18:21   0:00 grep --color=auto nagios
nagios   29617  0.0  0.0  17268  2780 ?        Ss   14:44   0:12 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios   29619  0.0  0.0  10916  2692 ?        S    14:44   0:02 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   29620  0.0  0.0  10916  2696 ?        S    14:44   0:02 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   29621  0.0  0.0  10916  2488 ?        S    14:44   0:02 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   29622  0.0  0.0  10916  2580 ?        S    14:44   0:02 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   29623  0.0  0.0  16780  1548 ?        S    14:44   0:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
Selinux is disabled:

Code: Select all

 getenforce
Disabled
For WebUI I use Apache 2.4. But, unfortunately, in WebUI I catch errors.

At main page: http://prntscr.com/d6svvg
At any page: http://prntscr.com/d6swc3

I checked all configs and permissions, but cannot locate an error. Please, help! :roll:

PS OS at server - Amazon Linux.

Re: "Not running" in WebUI after upgrade from3.5.1 to 4.2.2

Posted: Mon Nov 14, 2016 10:45 am
by dwhitfield
When you say you checked the configs, did you run /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg? Either way, could you post the output of that?

Also, can you give the output of tail -100 /usr/local/nagios/var/nagios.log. If you have your logs in a different location, swap out that locations.



I'm just going to put a note in here to help with file paths for community members that may not be familiar: Amazon Linux is loosely based on CentOS.

Re: "Not running" in WebUI after upgrade from3.5.1 to 4.2.2

Posted: Mon Nov 14, 2016 11:00 am
by rkennedy
Old version was installed from repo, new version was installed from sources.
To add to what @dwhitfield mentioned, this is the part that scares me. What was done exactly for this upgrade, did you cleanly remove the repository version? There is a possibility that they are using different structures / different configuration files based on this. The fastest resolution is more than likely going to be reinstall on a clean machine -> move over config files. The installation instructions can be found here - https://support.nagios.com/kb/article.php?id=96

Re: "Not running" in WebUI after upgrade from3.5.1 to 4.2.2

Posted: Mon Nov 14, 2016 1:43 pm
by alexnorton
Hello!

Thanks for your reply!
When you say you checked the configs, did you run /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg? Either way, could you post the output of that?
I have already published results of configuration test, but moderator have deleted it, by some reasons, I think. ;)

Code: Select all

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

Nagios Core 4.2.2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-24-2016
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Warning: use_embedded_perl_implicitly is deprecated and will be removed.
Warning: enable_embedded_perl is deprecated and will be removed.
Warning: p1_file is deprecated and will be removed.
Warning: sleep_time is deprecated and will be removed.
Warning: external_command_buffer_slots is deprecated and will be removed. All commands are always processed upon arrival
Warning: command_check_interval is deprecated and will be removed. Commands are always handled on arrival
   Read main config file okay...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
        Checked 44 services.
        Checked 10 hosts.
        Checked 4 host groups.
        Checked 3 service groups.
        Checked 6 contacts.
        Checked 4 contact groups.
        Checked 35 commands.
        Checked 5 time periods.
        Checked 0 host escalations.
        Checked 0 service escalations.
Checking for circular paths...
        Checked 10 hosts
        Checked 0 service dependencies
        Checked 0 host dependencies
        Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
Also, can you give the output of tail -100 /usr/local/nagios/var/nagios.log
Here you are!

Code: Select all

tail -100 /usr/local/nagios/var/nagios.log
[1479081600] LOG ROTATION: DAILY
[1479081600] LOG VERSION: 2.0
[1479081600] CURRENT HOST STATE: CB Node 1;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.93 ms
[1479081600] CURRENT HOST STATE: CB Node 2;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 2.15 ms
[1479081600] CURRENT HOST STATE: Couchbase Sport;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 21.92 ms
[1479081600] CURRENT HOST STATE: GitLab;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 24.53 ms
[1479081600] CURRENT HOST STATE: Math LB + Memcached;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.36 ms
[1479081600] CURRENT HOST STATE: Monitoring;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.03 ms
[1479081600] CURRENT HOST STATE: Notification Server;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.44 ms
[1479081600] CURRENT HOST STATE: TestWebloadBalancer;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.46 ms
[1479081600] CURRENT HOST STATE: WebLoadBalancer;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.26 ms
[1479081600] CURRENT HOST STATE: WebLoadBalancer Sport;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 23.17 ms
[1479081600] CURRENT SERVICE STATE: CB Node 1;Bucket slots RAM Quota usage;OK;HARD;1;RAM Usage OK: 59.38 %
[1479081600] CURRENT SERVICE STATE: CB Node 1;Bucket slots-logs RAM Quota usage;OK;HARD;1;RAM Usage OK: 42.47 %
[1479081600] CURRENT SERVICE STATE: CB Node 1;Current Users;OK;HARD;1;USERS OK - 0 users currently logged in
[1479081600] CURRENT SERVICE STATE: CB Node 1;DATA Partition;OK;HARD;1;DISK OK - free space: /mnt/data 138025 MB (94% inode=99%):
[1479081600] CURRENT SERVICE STATE: CB Node 1;INDEX Partition;OK;HARD;1;DISK OK - free space: /mnt/index 139048 MB (95% inode=99%):
[1479081600] CURRENT SERVICE STATE: CB Node 1;Root Partition;OK;HARD;1;DISK OK - free space: / 37354 MB (93% inode=98%):
[1479081600] CURRENT SERVICE STATE: CB Node 2;Bucket slots RAM Quota usage;OK;HARD;1;RAM Usage OK: 59.38 %
[1479081600] CURRENT SERVICE STATE: CB Node 2;Bucket slots-logs RAM Quota usage;OK;HARD;1;RAM Usage OK: 42.47 %
[1479081600] CURRENT SERVICE STATE: CB Node 2;Current Users;OK;HARD;1;USERS OK - 0 users currently logged in
[1479081600] CURRENT SERVICE STATE: CB Node 2;DATA Partition;OK;HARD;1;DISK OK - free space: /mnt/data 137265 MB (94% inode=99%):
[1479081600] CURRENT SERVICE STATE: CB Node 2;INDEX Partition;OK;HARD;1;DISK OK - free space: /mnt/index 144777 MB (99% inode=99%):
[1479081600] CURRENT SERVICE STATE: CB Node 2;Root Partition;OK;HARD;1;DISK OK - free space: / 37469 MB (93% inode=98%):
[1479081600] CURRENT SERVICE STATE: Couchbase Sport;Bucket sports RAM Quota usage;OK;HARD;1;RAM Usage OK: 73.14 %
[1479081600] CURRENT SERVICE STATE: Couchbase Sport;Bucket sports-logs RAM Quota usage;OK;HARD;1;RAM Usage OK: 17.91 %
[1479081600] CURRENT SERVICE STATE: Couchbase Sport;Current Load;OK;HARD;1;OK - load average: 0.24, 0.21, 0.20
[1479081600] CURRENT SERVICE STATE: Couchbase Sport;Current Users;OK;HARD;1;USERS OK - 0 users currently logged in
[1479081600] CURRENT SERVICE STATE: Couchbase Sport;DATA Partition;OK;HARD;1;DISK OK - free space: /mnt/DATA 26102 MB (91% inode=99%):
[1479081600] CURRENT SERVICE STATE: Couchbase Sport;Root Partition;OK;HARD;1;DISK OK - free space: / 4636 MB (59% inode=90%):
[1479081600] CURRENT SERVICE STATE: GitLab;Current Load;OK;HARD;1;OK - load average: 0.00, 0.00, 0.00
[1479081600] CURRENT SERVICE STATE: GitLab;Current Users;OK;HARD;1;USERS OK - 0 users currently logged in
[1479081600] CURRENT SERVICE STATE: GitLab;Disk Usage;OK;HARD;1;DISK OK - free space: / 65083 MB (64% inode=96%):
[1479081600] CURRENT SERVICE STATE: GitLab;GitLab UI;OK;HARD;1;HTTP OK: HTTP/1.1 302 Found - 581 bytes in 0.141 second response time
[1479081600] CURRENT SERVICE STATE: Math LB + Memcached;Current Load;OK;HARD;1;OK - load average: 0.00, 0.01, 0.05
[1479081600] CURRENT SERVICE STATE: Math LB + Memcached;Current Users;OK;HARD;1;USERS OK - 0 users currently logged in
[1479081600] CURRENT SERVICE STATE: Math LB + Memcached;Math;OK;HARD;1;HTTP OK: HTTP/1.1 200 OK - 254 bytes in 0.003 second response time
[1479081600] CURRENT SERVICE STATE: Math LB + Memcached;Root Partition;OK;HARD;1;DISK OK - free space: / 17034 MB (85% inode=96%):
[1479081600] CURRENT SERVICE STATE: Monitoring;Current Load;OK;HARD;1;OK - load average: 0.21, 0.84, 1.17
[1479081600] CURRENT SERVICE STATE: Monitoring;Root Partition;OK;HARD;1;DISK OK - free space: / 9947 MB (71% inode=85%):
[1479081600] CURRENT SERVICE STATE: Notification Server;API;OK;HARD;1;HTTP OK: HTTP/1.1 301 MOVED PERMANENTLY - 249 bytes in 0.001 second response time
[1479081600] CURRENT SERVICE STATE: Notification Server;Current Load;OK;HARD;1;OK - load average: 0.00, 0.00, 0.00
[1479081600] CURRENT SERVICE STATE: Notification Server;Current Users;OK;HARD;1;USERS OK - 0 users currently logged in
[1479081600] CURRENT SERVICE STATE: Notification Server;Root Partition;OK;HARD;1;DISK OK - free space: / 36065 MB (89% inode=95%):
[1479081600] CURRENT SERVICE STATE: WebLoadBalancer;Current Load;OK;HARD;1;OK - load average: 0.18, 0.08, 0.06
[1479081600] CURRENT SERVICE STATE: WebLoadBalancer;Current Users;OK;HARD;1;USERS OK - 0 users currently logged in
[1479081600] CURRENT SERVICE STATE: WebLoadBalancer;Logs Partition;OK;HARD;1;DISK OK - free space: /mnt/logs 45393 MB (95% inode=99%):
[1479081600] CURRENT SERVICE STATE: WebLoadBalancer;Root Partition;OK;HARD;1;DISK OK - free space: / 2618 MB (33% inode=89%):
[1479081600] CURRENT SERVICE STATE: WebLoadBalancer;SSL certificate check;OK;HARD;1;OK - Certificate 'slots.mintdev.ru' will expire on 10/19/2018 11:55.
[1479081600] CURRENT SERVICE STATE: WebLoadBalancer;Slots Admin;OK;HARD;1;HTTP OK: HTTP/1.1 302 Found - 224 bytes in 0.001 second response time
[1479081600] CURRENT SERVICE STATE: WebLoadBalancer;Slots Mobile;OK;HARD;1;HTTP OK: HTTP/1.1 200 OK - 2317 bytes in 0.001 second response time
[1479081600] CURRENT SERVICE STATE: WebLoadBalancer;Slots Socialnet;OK;HARD;1;HTTP OK: HTTP/1.1 200 OK - 2398 bytes in 0.004 second response time
[1479081600] CURRENT SERVICE STATE: WebLoadBalancer Sport;Current Load;OK;HARD;1;OK - load average: 0.02, 0.03, 0.05
[1479081600] CURRENT SERVICE STATE: WebLoadBalancer Sport;Current Users;OK;HARD;1;USERS OK - 0 users currently logged in
[1479081600] CURRENT SERVICE STATE: WebLoadBalancer Sport;Root Partition;OK;HARD;1;DISK OK - free space: / 5344 MB (68% inode=90%):
[1479081600] CURRENT SERVICE STATE: WebLoadBalancer Sport;Sport REST;OK;HARD;1;HTTP OK: HTTP/1.1 200 OK - 319 bytes in 0.002 second response time
[1479084284] Auto-save of retention data completed successfully.
[1479087884] Auto-save of retention data completed successfully.
[1479091484] Auto-save of retention data completed successfully.
[1479095084] Auto-save of retention data completed successfully.
[1479098684] Auto-save of retention data completed successfully.
[1479102284] Auto-save of retention data completed successfully.
[1479105884] Auto-save of retention data completed successfully.
[1479109484] Auto-save of retention data completed successfully.
[1479113084] Auto-save of retention data completed successfully.
[1479116684] Auto-save of retention data completed successfully.
[1479120284] Auto-save of retention data completed successfully.
[1479123884] Auto-save of retention data completed successfully.
[1479127484] Auto-save of retention data completed successfully.
[1479131084] Auto-save of retention data completed successfully.
[1479134684] Auto-save of retention data completed successfully.
[1479138284] Auto-save of retention data completed successfully.
[1479141884] Auto-save of retention data completed successfully.
[1479145484] Auto-save of retention data completed successfully.
As you can see, all works fine... except WebUI :cry:
What was done exactly for this upgrade, did you cleanly remove the repository version?
I do not remove repo version. Now, I make backup of whole machine and remove old version. I afraid it remove some necessary configs.
Amazon Linux is loosely based on CentOS
Did it mean what Amazon Linux uncompatible with Nagios 4? Nagios 3 is in repo and works normal.

Re: "Not running" in WebUI after upgrade from3.5.1 to 4.2.2

Posted: Mon Nov 14, 2016 2:08 pm
by dwhitfield
alexnorton wrote:H

I have already published results of configuration test, but moderator have deleted it, by some reasons, I think. ;)
Just a guess, but if your first two posts were very similar, the moderator may have thought it was a double-post. People often post a second time because they do not see their first post.
Did it mean what Amazon Linux uncompatible with Nagios 4? Nagios 3 is in repo and works normal.
We don't have Amazon-specific install instructions. I just didn't want community members trying to piece together where your files might be. Debian and CentOS/Red Hat/Oracle have some very specific differences for apache. Other distros have differences too. More-or-less, I'm just signaling that we are in Red Hat-land. Nothing to worry about!

I don't want this earlier statement to get lost:
The fastest resolution is more than likely going to be reinstall on a clean machine -> move over config files. The installation instructions can be found here - https://support.nagios.com/kb/article.php?id=96
Please let us know if that is not going to work for you.

Re: "Not running" in WebUI after upgrade from3.5.1 to 4.2.2

Posted: Mon Nov 14, 2016 2:10 pm
by avandemore
Distribution RPM upgrade by source is not a supported upgraded path. Do not mix and match upgrade between source and RPM. Please either create a new cleanly installed server with Nagios Core from source and migrate the configs or stick with distribution RPM's only.

The first method will allow you to stay more current and compliant with Nagios, but it's more manual work. The second method usually lags somewhat behind the current release of Nagios Core and may have other distribution specific requirements.