Wizard upload failed on centos 6.8

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

Wizard upload failed on centos 6.8

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Wizard upload failed on centos 6.8

Post 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.
Former Nagios employee
https://www.mcapra.com/
CBoekhuis
Posts: 234
Joined: Tue Aug 16, 2011 4:55 am

Re: Wizard upload failed on centos 6.8

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Wizard upload failed on centos 6.8

Post 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
Former Nagios employee
https://www.mcapra.com/
CBoekhuis
Posts: 234
Joined: Tue Aug 16, 2011 4:55 am

Re: Wizard upload failed on centos 6.8

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Wizard upload failed on centos 6.8

Post 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
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
https://www.mcapra.com/
CBoekhuis
Posts: 234
Joined: Tue Aug 16, 2011 4:55 am

Re: Wizard upload failed on centos 6.8

Post 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.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Wizard upload failed on centos 6.8

Post 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.
Former Nagios employee
https://www.mcapra.com/
CBoekhuis
Posts: 234
Joined: Tue Aug 16, 2011 4:55 am

Re: Wizard upload failed on centos 6.8

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Wizard upload failed on centos 6.8

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked