Page 1 of 1

Wizard upload failed on centos 6.8

Posted: Tue Feb 28, 2017 5:04 am
by CBoekhuis
Hi,

i'm trying to install the Dell plugin. Due to prereq's i had to update from centos 6.7 to 6.8. After met all prereq a tryed to upload the Dell_OM_NagiosXI_monitoring_wizard.zip but this was resulting in a "Wizard upload failed".
We run Nagiosxi 5.4.2 .
Apache logging says:

[Tue Feb 28 10:41:29 2017] [error] [client x.x.x.x] PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0, referer: http://nagiosxi.something.nl/nagiosxi/a ... izards.php

Any Idea ?

Kind regards
Christian

Re: Wizard upload failed on centos 6.8

Posted: Tue Feb 28, 2017 11:06 am
by mcapra
Can you share the output of:

Code: Select all

ls -al /usr/local/nagiosxi
I think this may be an issue with the permissions on /usr/local/nagiosxi/tmp.

Re: Wizard upload failed on centos 6.8

Posted: Tue Feb 28, 2017 1:44 pm
by CBoekhuis
Permissions should be ok

drwxr-xr-x. 10 nagios nagios 4096 Jun 3 2016 .
drwxr-xr-x 23 root root 4096 Oct 4 12:27 ..
drwxr-xr-x. 2 nagios nagios 4096 Oct 4 12:28 cron
drwxr-xr-x. 3 nagios nagios 4096 Sep 23 15:30 etc
drwxr-xr-x. 20 nagios nagios 4096 Feb 27 15:09 html
drwxr-xr-x. 3 nagios nagios 4096 Apr 22 2011 nom
drwxr-xr-x. 2 nagios nagios 4096 Feb 28 07:59 scripts
drwsrwsr-x. 4 nagios nagios 12288 Feb 13 16:19 tmp
drwxr-xr-x. 2 nagios nagios 4096 Oct 4 12:28 tools
drwxr-xr-x. 6 nagios nagios 12288 Feb 28 19:42 var

Re: Wizard upload failed on centos 6.8

Posted: Tue Feb 28, 2017 4:42 pm
by mcapra
Can you share the output of the following commands executed from the CLI of your Nagios XI machine:

Code: Select all

php -r "error_reporting(E_ALL);ini_set('display_errors', TRUE);ini_set('display_startup_errors', TRUE);require('/usr/local/nagiosxi/html/includes/common.inc.php'); echo get_tmp_dir() . PHP_EOL;"
php -r "require('/usr/local/nagiosxi/html/includes/common.inc.php'); echo get_tmp_dir() . PHP_EOL;"
md5sum /usr/local/nagiosxi/html/includes/common.inc.php
md5sum /usr/local/nagiosxi/html/admin/configwizards.php

Re: Wizard upload failed on centos 6.8

Posted: Wed Mar 01, 2017 2:28 am
by CBoekhuis
Hi,

php -r "error_reporting(E_ALL);ini_set('display_errors', TRUE);ini_set('display_startup_errors', TRUE);require('/usr/local/nagiosxi/html/includes/common.inc.php'); echo get_tmp_dir() . PHP_EOL;"
/usr/local/nagiosxi/tmp

php -r "require('/usr/local/nagiosxi/html/includes/common.inc.php'); echo get_tmp_dir() . PHP_EOL;"
/usr/local/nagiosxi/tmp

md5sum /usr/local/nagiosxi/html/includes/common.inc.php
f834efb051541829044d35c0a51416c7 /usr/local/nagiosxi/html/includes/common.inc.php

md5sum /usr/local/nagiosxi/html/admin/configwizards.php
7ce812dca36a3618f01c3bdba6e3d6c0 /usr/local/nagiosxi/html/admin/configwizards.php

Re: Wizard upload failed on centos 6.8

Posted: Wed Mar 01, 2017 1:30 pm
by mcapra
Hmm, can you try the following:

Code: Select all

sed -i '2s/.*/ini_set\('display_errors', TRUE\);/' /usr/local/nagiosxi/html/admin/configwizards.php
Then attempt to upload the wizard and share any error messages that appear on the top of the page. They might look like this:
2017_03_01_12_27_10_Administration_Nagios_XI.png
Be sure to run this afterwards to revert the previous changes:

Code: Select all

sed -i '2s/.*/\/\//' /usr/local/nagiosxi/html/admin/configwizards.php

Re: Wizard upload failed on centos 6.8

Posted: Thu Mar 02, 2017 4:31 am
by CBoekhuis
Nothing. No messages on screen. Also when logging out and in again as another admin account.

When i do the same on a Centos 6.7 i get no errors. Install or delete the package works fine.

Re: Wizard upload failed on centos 6.8

Posted: Thu Mar 02, 2017 12:28 pm
by mcapra
Hmm, the only reason that message ever gets displayed is if move_uploaded_file returns false. We could try adding in some more verbose debugging settings:

Code: Select all

sed -i '2s/.*/error_reporting(E_ALL);ini_set('display_errors', TRUE);ini_set('display_startup_errors', TRUE);/' /usr/local/nagiosxi/html/admin/configwizards.php
See if that spits out any more specific errors. If it doesn't, we might be better off moving this to an email ticket and scheduling a remote assistance session.

Re: Wizard upload failed on centos 6.8

Posted: Thu Mar 02, 2017 4:25 pm
by CBoekhuis
Hi,

i managed to solve the problem. After restarting nagios ( service nagios restart) i got a permission denied :

Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Error: Unable to write to temp_path ('/tmp') - Permission denied

for some reason the /tmp had 755 instead of 777 +t .
After setting de right permissions the wizard loaded perfectly.

Thanks for you help.

Kind regards
Christian Bakker

Re: Wizard upload failed on centos 6.8

Posted: Thu Mar 02, 2017 5:37 pm
by lmiltchev
I am glad your issue has been resolved! I will be locking this topic how. If you have any more questions/issues, please start a new thread.