Upgrade from 4.1.1 to 4.4.1

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.
Locked
traemccombs
Posts: 3
Joined: Mon Aug 13, 2018 11:31 am

Upgrade from 4.1.1 to 4.4.1

Post by traemccombs »

Greetings, I have just upgraded from Nagios Core 4.1.1. to Nagios Core 4.4.1 The upgrade seems to have gone ok other than the fact that now when I start Nagios, I'm getting the following issues:

https://gist.github.com/Sicnus/9fa52646 ... 7d5238caf5

Code: Select all

[root@all-nagios-app-ops-00 ~]# service nagios start
Starting nagios: Running configuration check... /etc/init.d/nagios: line 82: 10910 Segmentation fault      $NagiosBin -vp $NagiosCfgFile > "$TMPFILE"

Nagios Core 4.4.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2018-06-25
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Warning: external_command_buffer_slots is deprecated and will be removed. All commands are always processed upon arrival
   Read main config file okay...
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/router-170_nagios2.cfg', starting at line 1)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/proxy-52_nagios2.cfg', starting at line 1)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/shared-server.cfg', starting at line 3)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/noemail-service.cfg', starting at line 2)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/netbk-service.cfg', starting at line 2)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/robins-proxy_nagios2.cfg', starting at line 1)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/generic-host_nagios2.cfg', starting at line 3)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/show_users-service_nagios2.cfg', starting at line 2)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/idm-service.cfg', starting at line 2)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/windows-service.cfg', starting at line 2)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/windows-service.cfg', starting at line 29)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/idm-server.cfg', starting at line 3)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/objects/generic-service_nagios2.cfg', starting at line 2)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/router-161_nagios2.cfg', starting at line 1)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/proxy-53_nagios2.cfg', starting at line 1)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/objects/windows-server.cfg', starting at line 3)
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in 
I've checked line 82 of /etc/init.d/nagios but it just refers to the checkconfig section... Not really sure what to do.

Any help would be greatly appreciated.

Cheers,
Trae

Update: One of our sysadmins suggested I comment out the section in the configs that point to: failure_prediction_enabled

I've done this and now the only thing that happens when I start and start nagios is:

[root@all-nagios-app-ops-00 ~]# service nagios start
Starting nagios: Running configuration check... /etc/init.d/nagios: line 82: 14741 Segmentation fault $NagiosBin -vp $NagiosCfgFile > "$TMPFILE"

The section of /etc/init.d/nagios starting at line 82:

Code: Select all

check_config ()
{
        if test "$checkconfig" != "true"; then
                return 0
        fi

        echo -n "Running configuration check... "

        /bin/rm -f "$NagiosCfgtestFile";
        if test -e "$NagiosCfgtestFile"; then
                echo "ERROR: Could not delete '$NagiosCfgtestFile'"
                exit 8
        fi
        if ! su $NagiosUser -c "touch $NagiosCfgtestFile"; then
                echo "ERROR: Could not create or update '$NagiosCfgtestFile'"
                exit 8
        fi

        TMPFILE=$(mktemp /tmp/.configtest.XXXXXXXX)
        $NagiosBin -vp $NagiosCfgFile > "$TMPFILE"
        WARN=`grep ^"Total Warnings:" "$TMPFILE" |awk -F: '{print \$2}' |sed s/' '//g`
        ERR=`grep ^"Total Errors:" "$TMPFILE" |awk -F: '{print \$2}' |sed s/' '//g`

        if test "$WARN" = "0" && test "${ERR}" = "0"; then
                echo "OK - Configuration check verified" > $NagiosCfgtestFile
                /bin/rm "$TMPFILE"
                return 0
        elif test "${ERR}" = "0"; then
                # Write the errors to a file we can have a script watching for.
                echo "WARNING: Warnings in config files - see log for details: $NagiosCfgtestFile" > $NagiosCfgtestFile
                egrep -i "(^warning|^error)" "$TMPFILE" >> $NagiosCfgtestFile
                /bin/rm "$TMPFILE"
                return 0
        else
                # Write the errors to a file we can have a script watching for.
                echo "ERROR: Errors in config files - see log for details: $NagiosCfgtestFile" > $NagiosCfgtestFile
                egrep -i "(^warning|^error)" "$TMPFILE" >> $NagiosCfgtestFile
                cat "$TMPFILE"
                exit 8
        fi
}
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade from 4.1.1 to 4.4.1

Post by scottwilkerson »

Does your nagios user have permissions to write to /tmp ?

Code: Select all

ls -al /tmp
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
traemccombs
Posts: 3
Joined: Mon Aug 13, 2018 11:31 am

Re: Upgrade from 4.1.1 to 4.4.1

Post by traemccombs »

Yes, something funky is going on there...

Code: Select all

[root@all-nagios-app-ops-00 /tmp]# ls -lah
total 104K
drwxrwxrwt.  7 nagios nagios 4.0K Aug 13 14:05 .
dr-xr-xr-x. 26 root   root   4.0K Jul 27 07:44 ..
-rw-------.  1 nagios nagios    0 Aug 13 13:04 .configtest.40MBUr1O
-rw-------.  1 nagios nagios 4.0K Aug 13 11:13 .configtest.4HT1Vrfu
-rw-------.  1 nagios nagios 4.0K Aug 13 13:03 .configtest.A8aK39Uh
-rw-------.  1 nagios nagios    0 Aug 13 13:18 .configtest.A9x8aWNQ
-rw-------.  1 nagios nagios    0 Aug 13 13:11 .configtest.b2OY2pT9
-rw-------.  1 nagios nagios    0 Aug 13 13:14 .configtest.bfm4CDZJ
-rw-------.  1 nagios nagios 4.0K Aug 13 12:24 .configtest.F5GCxn4q
-rw-------.  1 nagios nagios 4.0K Aug 13 10:48 .configtest.GlL0OthQ
-rw-------.  1 nagios nagios    0 Aug 13 13:17 .configtest.Hj6xYYfn
-rw-------.  1 nagios nagios    0 Aug 13 13:04 .configtest.hjJbRZMj
-rw-------.  1 nagios nagios    0 Aug 13 13:27 .configtest.HP60APc8
-rw-------.  1 nagios nagios 4.0K Aug 13 12:23 .configtest.IGOpyCgc
-rw-------.  1 nagios nagios 4.0K Aug 13 12:24 .configtest.JoTVunhR
-rw-------.  1 nagios nagios    0 Aug 13 13:20 .configtest.JqerdOPZ
-rw-------.  1 nagios nagios 4.0K Aug 13 10:32 .configtest.JyKqrHAK
-rw-------.  1 nagios nagios    0 Aug 13 13:11 .configtest.kTLDpwMq
-rw-------.  1 nagios nagios    0 Aug 13 13:27 .configtest.mX8m18ED
-rw-------.  1 nagios nagios 4.0K Aug 13 10:48 .configtest.nTuTAWxl
-rw-------.  1 nagios nagios 4.0K Aug 13 13:02 .configtest.OcwwTeOF
-rw-------.  1 nagios nagios    0 Aug 13 13:05 .configtest.oMpfkAPv
-rw-------.  1 nagios nagios    0 Aug 13 13:16 .configtest.qR7Z0CGs
-rw-------.  1 nagios nagios    0 Aug 13 13:19 .configtest.rXS7SMet
-rw-------.  1 nagios nagios 4.0K Aug 13 13:04 .configtest.toZB3gta
-rw-------.  1 nagios nagios 4.0K Aug 13 10:58 .configtest.WW2qSlxy
-rw-------.  1 nagios nagios 4.0K Aug 13 13:01 .configtest.y1YRlo01
-rw-------.  1 nagios nagios 4.0K Aug 13 10:36 .configtest.zGNIoJmm
-rw-------.  1 nagios nagios 4.0K Aug 13 13:03 .configtest.zRTrYMIm
drwxr-xr-x.  2 nagios nagios 4.0K Aug  6 23:30 hsperfdata_root
drwxrwxrwt.  2 nagios nagios 4.0K Jul 27 07:44 .ICE-unix
drwx------.  2 nagios nagios  16K Jan 20  2016 lost+found
-rw-r--r--.  1 nagios nagios   61 Aug  6 23:30 lua_BNcyfg
-rw-r--r--.  1 nagios nagios   31 Aug 13 10:16 rpmcheck.results.save
drwxr-xr-x.  2 nagios nagios 4.0K May 30 16:38 vmware-config-2157.0
drwx------.  2 nagios nagios 4.0K Aug 13 09:15 vmware-root_17742-2991677956
[root@all-nagios-app-ops-00 /tmp]# service nagios start
Starting nagios: Running configuration check... /etc/init.d/nagios: line 82: 17251 Segmentation fault      $NagiosBin -vp $NagiosCfgFile > "$TMPFILE"
[root@all-nagios-app-ops-00 /tmp]# ls -lah
total 104K
drwxrwxrwt.  7 nagios nagios 4.0K Aug 13 14:07 .
dr-xr-xr-x. 26 root   root   4.0K Jul 27 07:44 ..
-rw-------.  1 nagios nagios    0 Aug 13 13:04 .configtest.40MBUr1O
-rw-------.  1 nagios nagios 4.0K Aug 13 11:13 .configtest.4HT1Vrfu
-rw-------.  1 nagios nagios 4.0K Aug 13 13:03 .configtest.A8aK39Uh
-rw-------.  1 nagios nagios    0 Aug 13 13:18 .configtest.A9x8aWNQ
-rw-------.  1 nagios nagios    0 Aug 13 13:11 .configtest.b2OY2pT9
-rw-------.  1 nagios nagios    0 Aug 13 13:14 .configtest.bfm4CDZJ
-rw-------.  1 nagios nagios 4.0K Aug 13 12:24 .configtest.F5GCxn4q
-rw-------.  1 nagios nagios 4.0K Aug 13 10:48 .configtest.GlL0OthQ
-rw-------.  1 nagios nagios    0 Aug 13 13:17 .configtest.Hj6xYYfn
-rw-------.  1 nagios nagios    0 Aug 13 13:04 .configtest.hjJbRZMj
-rw-------.  1 nagios nagios    0 Aug 13 13:27 .configtest.HP60APc8
-rw-------.  1 nagios nagios 4.0K Aug 13 12:23 .configtest.IGOpyCgc
-rw-------.  1 nagios nagios 4.0K Aug 13 12:24 .configtest.JoTVunhR
-rw-------.  1 nagios nagios    0 Aug 13 13:20 .configtest.JqerdOPZ
-rw-------.  1 nagios nagios 4.0K Aug 13 10:32 .configtest.JyKqrHAK
-rw-------.  1 nagios nagios    0 Aug 13 13:11 .configtest.kTLDpwMq
-rw-------.  1 nagios nagios    0 Aug 13 13:27 .configtest.mX8m18ED
-rw-------.  1 nagios nagios 4.0K Aug 13 10:48 .configtest.nTuTAWxl
-rw-------.  1 nagios nagios 4.0K Aug 13 13:02 .configtest.OcwwTeOF
-rw-------.  1 nagios nagios    0 Aug 13 13:05 .configtest.oMpfkAPv
-rw-------.  1 root   root      0 Aug 13 14:07 .configtest.PbEr6z2Y
-rw-------.  1 nagios nagios    0 Aug 13 13:16 .configtest.qR7Z0CGs
-rw-------.  1 nagios nagios    0 Aug 13 13:19 .configtest.rXS7SMet
Afterwards you can see it creates the .configtest-$FOO file as root.root :/
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade from 4.1.1 to 4.4.1

Post by scottwilkerson »

Can you run a normal config verification to the end without error? you could have some sort of a loop going on

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
traemccombs
Posts: 3
Joined: Mon Aug 13, 2018 11:31 am

Re: Upgrade from 4.1.1 to 4.4.1

Post by traemccombs »

Thanks for your help. Due to my lack of time to work on this issue I've rolled back to our pre-upgrade snapshot.

Can you please lock this thread. Also, I just realized that we actually were upgrading from: 4.3.4 not 4.1.1 :/

Thanks for your help, hopefully I can take any lessons learned into the next attempt.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade from 4.1.1 to 4.4.1

Post by scottwilkerson »

traemccombs wrote:Thanks for your help. Due to my lack of time to work on this issue I've rolled back to our pre-upgrade snapshot.

Can you please lock this thread. Also, I just realized that we actually were upgrading from: 4.3.4 not 4.1.1 :/

Thanks for your help, hopefully I can take any lessons learned into the next attempt.
locking
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked