Stuck on upgrade/update from 2012R1.5 to 2012R1.6

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
CBoekhuis
Posts: 234
Joined: Tue Aug 16, 2011 4:55 am

Stuck on upgrade/update from 2012R1.5 to 2012R1.6

Post by CBoekhuis »

Hi,

today we decided to update to the latest version but for the first time we got into trouble.
The ./upgrade script stucked at :

Code: Select all

/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --no-check-certificate --post-data 'writeMonitoring=Go' -O nagiosql.export.monitoring
--2013-03-04 15:40:47--  http://localhost/nagiosql/admin/verify.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... Read error (Connection timed out) in headers.
Retrying.

--2013-03-04 15:55:48--  (try: 2)  http://localhost/nagiosql/admin/verify.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 
Read error (Connection timed out) in headers.
Retrying.

--2013-03-04 16:10:50--  (try: 3)  http://localhost/nagiosql/admin/verify.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response...
When logging into nagiosxi we got the option to finish upgrade button.
This seems fine for so far (version reporten is R1.6). But we are concerned about the nog complition of the upgrade script.
We also decided to restart the ./upgrade bu tyhis time the result was:

Code: Select all

2013-03-04 16:25:24 (368 MB/s) - `nagiosql.login' saved [5286/5286]

LOGIN SUCCESSFUL!
URL: http://localhost/nagiosql/admin/verify.php
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --no-check-certificate --post-data 'writeMonitoring=Go' -O nagiosql.export.monitoring
--2013-03-04 16:25:25--  http://localhost/nagiosql/admin/verify.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4788 (4.7K) [text/html]
Saving to: `nagiosql.export.monitoring'

100%[==================================================================================================================================================================================================>] 4,788       --.-K/s   in 0s      

2013-03-04 16:26:06 (282 MB/s) - `nagiosql.export.monitoring' saved [4788/4788]

NAGIOSQL WRITE CONFIGS FAILED!\n
We noticed errors in the httpd error log.

Code: Select all

[Mon Mar 04 15:40:41 2013] [error] [client 192.168.5.227] PHP Fatal error:  Call to undefined function get_authorized_object_ids() in /usr/local/nagiosxi/html/includes/utils-objects.inc.php on line 675, referer: http://nagiosxi.boekhuis.nl/nagiosxi/includes/components/xicore/status.php?show=servicedetail&host=prd1_rc1.boekhuis.nl&service=%2Fcbsw1&dest=auto
[Mon Mar 04 15:40:42 2013] [error] [client 127.0.0.1] PHP Notice:  CCM Config File: /usr/local/nagiosxi/etc/components/ccm_config.inc.php is not writable by apache! in /usr/local/nagiosxi/html/includes/components/ccm/ccm.inc.php on line 104
[Mon Mar 04 16:25:22 2013] [error] [client 127.0.0.1] PHP Notice:  CCM Config File: /usr/local/nagiosxi/etc/components/ccm_config.inc.php is not writable by apache! in /usr/local/nagiosxi/html/includes/components/ccm/ccm.inc.php on line 104
[Mon Mar 04 16:26:06 2013] [error] [client 127.0.0.1] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /usr/share/pear/HTML/Template/IT.php on line 699
Any idea?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Stuck on upgrade/update from 2012R1.5 to 2012R1.6

Post by lmiltchev »

Run the following commands and see if this is going to resolve your issue:

Code: Select all

touch /usr/local/nagiosxi/etc/components/ccm_config.inc.php
chown apache.nagios /usr/local/nagiosxi/etc/components/ccm_config.inc.php
Can you also run the following command and post the output?

Code: Select all

ll /usr/local/nagiosxi/scripts | grep nagiosql
Be sure to check out our Knowledgebase for helpful articles and solutions!
CBoekhuis
Posts: 234
Joined: Tue Aug 16, 2011 4:55 am

Re: Stuck on upgrade/update from 2012R1.5 to 2012R1.6

Post by CBoekhuis »

Hi,
the ownerships of the file /usr/local/nagiosxi/etc/components/ccm_config.inc.php are already as asked.
Rerunnig the upgrade didn't change the result.

here is the requested output:

Code: Select all

nagiosxi:root:/tmp/nagiosxi> ll /usr/local/nagiosxi/scripts | grep nagiosql
-rwxr-x--- 1 nagios nagios    649 Mar  4 16:25 export_nagiosql.sh
-rwxr-x--- 1 nagios nagios    429 Mar  4 16:25 import_nagiosql.sh
-rw-r----- 1 nagios nagios    153 Mar  4 16:25 nagiosql.cookies
-rwxr-x--- 1 nagios nagios 272372 Mar  4 16:25 nagiosql_defaults.sql
-rw-r----- 1 nagios nagios  45884 Dec 13 14:45 nagiosql.delete.contact
-rwxr-x--- 1 nagios nagios    970 Mar  4 16:25 nagiosql_delete_contact.php
-rwxr-x--- 1 nagios nagios   2010 Mar  4 16:25 nagiosql_delete_host.php
-rwxr-x--- 1 nagios nagios    505 Mar  4 16:25 nagiosql_delete_object.sh
-rwxr-x--- 1 nagios nagios   3118 Mar  4 16:25 nagiosql_delete_service.php
-rw-r----- 1 nagios nagios  39444 Nov 29 14:53 nagiosql.delete.timeperiod
-rwxr-x--- 1 nagios nagios    993 Mar  4 16:25 nagiosql_delete_timeperiod.php
-rw-r----- 1 nagios nagios   7400 Mar  4 15:17 nagiosql.export.additional
-rwxr-x--- 1 nagios nagios   1637 Mar  4 16:25 nagiosql_exportall.php
-rw-r----- 1 nagios nagios   4788 Mar  4 16:26 nagiosql.export.monitoring
-rwxr-x--- 1 nagios nagios   1323 Mar  4 16:25 nagiosql_importall.php
-rw-r----- 1 nagios nagios 493214 Mar  4 16:25 nagiosql.import.monitoring
-rw-r----- 1 nagios nagios   5286 Mar  4 16:25 nagiosql.login
-rwxr-x--- 1 nagios nagios   1847 Mar  4 16:25 nagiosql_login.php
-rwxr-x--- 1 nagios nagios   2108 Mar  4 16:25 nagiosql_snapshot.sh
-rwxr-x--- 1 nagios nagios    258 Mar  4 16:25 nagiosql_trim_backups.sh
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Stuck on upgrade/update from 2012R1.5 to 2012R1.6

Post by scottwilkerson »

There are a couple things. We need to increase the max_execution_time in /etc/php.ini I would change it to 180

Then run

Code: Select all

chmod ug+w /usr/local/nagiosxi/etc/components/ccm_config.inc.php
service httpd restart
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
CBoekhuis
Posts: 234
Joined: Tue Aug 16, 2011 4:55 am

Re: Stuck on upgrade/update from 2012R1.5 to 2012R1.6

Post by CBoekhuis »

Hi,

this did the trick.

Code: Select all

Running configuration check...done.
Stopping nagios: .done.
Starting nagios: done.
Archive:  sourceguardian/ixed4.lin.x86-32.zip
  inflating: /usr/lib/php/modules/ixed.5.1.lin  
Sourceguardian extension found for PHP version 5.1
Sourceguardian extension already in php.ini
Stopping httpd: [  OK  ]
Starting httpd: [  OK  ]
==================
UPGRADE COMPLETED!
==================
Thanx for your good help.

Regards
Christian
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Stuck on upgrade/update from 2012R1.5 to 2012R1.6

Post by abrist »

Great. Closing.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked