Upgrade from 5.2.7 to 5.5.0 failed

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
blueagle
Posts: 26
Joined: Mon Feb 17, 2014 4:16 am

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by blueagle »

I've run the script and below is the output:

[nagios@nagios ~]$ cd /usr/local/nagiosxi/scripts/
[nagios@nagios scripts]$ ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=Nag!0$' -O nagiosql.login--2018-07-26 07:56:21-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

[ <=> ] 36,881 --.-K/s in 0.05s

2018-07-26 07:56:22 (774 KB/s) - “nagiosql.login” saved [36881]

LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
RESETTING PERMS
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=Nag!0$' -O nagiosql.login--2018-07-26 07:56:23-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

[ <=> ] 36,881 --.-K/s in 0.05s

2018-07-26 07:56:24 (773 KB/s) - “nagiosql.login” saved [36881]

LOGIN SUCCESSFUL!
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2018-07-26 07:56:24-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.export.monitoring”

[ <=> ] 15,162 6.77K/s in 2.2s

2018-07-26 07:56:26 (6.77 KB/s) - “nagiosql.export.monitoring” saved [15162]

WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Could not find a service matching host name 'qastaging.picasso.bskyb.com' and description 'URL Status - /test/dj' (config file '/usr/local/nagios/etc/servicegroups.cfg', starting on line 34)
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Warning: Service 'Jenkins URL Port 8080' on host 'LogCooker - up001098' has no default contacts or contactgroups defined!
Warning: Service 'Jenkins URL Port 8080' on host 'LogCooker - up001099' has no default contacts or contactgroups defined!
Warning: Service 'Jenkins URL Port 8080' on host 'LogCooker - up001100' has no default contacts or contactgroups defined!
Warning: Service 'Jenkins URL Port 8080' on host 'LogCooker - up001101' has no default contacts or contactgroups defined!
Warning: Service 'Jenkins URL Port 8080' on host 'LogCooker - up001102' has no default contacts or contactgroups defined!
Warning: Service 'Jenkins URL Port 8080' on host 'LogCooker - up001103' has no default contacts or contactgroups defined!
Warning: Service 'Jenkins URL Port 8080' on host 'LogCooker - up001104' has no default contacts or contactgroups defined!
Warning: Service 'Jenkins URL Port 8080' on host 'LogCooker - up001105' has no default contacts or contactgroups defined!
Warning: Service 'Jenkins URL Port 8080' on host 'LogCooker - up001106' has no default contacts or contactgroups defined!
Warning: Service 'Jenkins URL Port 8080' on host 'LogCooker - up001107' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest101' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest110' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest111' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest112' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest114' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest116' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest117' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest118' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest119' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest120' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest202' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest203' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest204' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest205' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest206' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest207' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest208' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest209' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest210' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest212' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest213' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest214' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest215' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest216' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest301' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest302' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest303' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest305' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest306' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest307' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest317' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest318' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest501' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest503' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest505' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest508' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest509' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest510' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest511' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest512' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest513' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest514' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest516' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest517' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest518' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest519' has no default contacts or contactgroups defined!
Warning: Service 'StormTest FTP for Daemon Logs' on host 'Stormtest520' has no default contacts or contactgroups defined!
Checked 3716 services.
Warning: Host 'LogCooker - up001098' has no default contacts or contactgroups defined!
Warning: Host 'LogCooker - up001099' has no default contacts or contactgroups defined!
Warning: Host 'LogCooker - up001100' has no default contacts or contactgroups defined!
Warning: Host 'LogCooker - up001101' has no default contacts or contactgroups defined!
Warning: Host 'LogCooker - up001102' has no default contacts or contactgroups defined!
Warning: Host 'LogCooker - up001103' has no default contacts or contactgroups defined!
Warning: Host 'LogCooker - up001104' has no default contacts or contactgroups defined!
Warning: Host 'LogCooker - up001105' has no default contacts or contactgroups defined!
Warning: Host 'LogCooker - up001106' has no default contacts or contactgroups defined!
Warning: Host 'LogCooker - up001107' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest101' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest110' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest111' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest112' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest114' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest116' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest117' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest118' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest119' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest120' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest202' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest203' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest204' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest205' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest206' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest207' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest208' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest209' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest210' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest212' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest213' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest214' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest215' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest216' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest301' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest302' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest303' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest305' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest306' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest307' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest317' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest318' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest501' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest503' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest505' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest508' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest509' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest510' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest511' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest512' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest513' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest514' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest516' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest517' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest518' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest519' has no default contacts or contactgroups defined!
Warning: Host 'Stormtest520' has no default contacts or contactgroups defined!
Warning: Host 'darwindbprd.bskyb.com' has no default contacts or contactgroups defined!
Warning: Host 'mesh_diagnostics' has no default contacts or contactgroups defined!
Checked 435 hosts.
Checked 51 host groups.
Checked 5 service groups.
Checked 22 contacts.
Checked 7 contact groups.
Checked 188 commands.
Checked 26 time periods.
Checked 0 host escalations.
Checked 1 service escalations.
Checking for circular paths...
Checked 435 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 26 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 116
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
[nagios@nagios scripts]$
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by scottwilkerson »

And is there still only 1 services config?

Code: Select all

ls -al /usr/local/nagios/etc/services
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
blueagle
Posts: 26
Joined: Mon Feb 17, 2014 4:16 am

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by blueagle »

No I've got 244 of them there now.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by scottwilkerson »

blueagle wrote:No I've got 244 of them there now.
So is all working as expected?

If not what further issues are you seeing?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
blueagle
Posts: 26
Joined: Mon Feb 17, 2014 4:16 am

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by blueagle »

Sorry my bad. I had sent you the output from the working Nagios rather than the broken one. I had created a clone so I could carry on working on this issue without impacting the production VM.

Here's the output from the actual VM that has 5.5.1 on it:

[nagios@nagios ~]$ /usr/local/nagiosxi/scripts/reconfigure_nagios.sh

--- reset_config_perms.sh ------------
> Setting CCM script permissions
> Setting script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting NOM checkpoint user:group permissions
> + Setting Nagios Core corelog.newobjects user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------
PHP Warning: mysqli::mysqli(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 80
PHP Warning: mysqli::set_charset(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 81
PHP Warning: mysqli::query(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 82
PHP Warning: mysqli::query(): Couldn't fetch mysqli in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 99
PHP Warning: db::query(): Property access is not allowed yet in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 101
PHP Notice: Trying to get property of non-object in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 112
PHP Fatal error: Call to a member function free() on a non-object in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line 117

Importing into the CCM failed!

[nagios@nagios ~]$ ll /usr/local/nagios/etc/services/
total 4
-rw-rw-r-- 1 apache nagios 1453 Jul 24 09:41 devops_nrpe_check_load.cfg
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by scottwilkerson »

looks like mysqld isn't running

Code: Select all

service mysqld start
or

Code: Select all

service mariadb start
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
blueagle
Posts: 26
Joined: Mon Feb 17, 2014 4:16 am

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by blueagle »

Its a CentOS 6.5 machine and MySQL is running

[root@nagios ~]# service mysqld status
mysqld (pid 1501) is running...
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by scottwilkerson »

lets restart the service and then try the command again

Code: Select all

service mysqld restart
/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
blueagle
Posts: 26
Joined: Mon Feb 17, 2014 4:16 am

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by blueagle »

Restarted the MYSQLD service
Ran the script and it failed with this error:

Writing CCM configuration failed!\n

Script exit status is 4. Not sure if it helps?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrade from 5.2.7 to 5.5.0 failed

Post by scottwilkerson »

blueagle wrote:Restarted the MYSQLD service
Ran the script and it failed with this error:

Writing CCM configuration failed!\n

Script exit status is 4. Not sure if it helps?
Can you give the fill output?

Also the following perms:

Code: Select all

ls -al /usr/local/nagios/
ls -al /usr/local/nagios/hosts
ls -al /usr/local/nagios/services
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked