Page 1 of 2
Nagvis PHP error
Posted: Tue Apr 22, 2014 5:16 pm
by hillhealthcenter
I get this error when I click the Default Automap button in Nagvis:
PHP error in ajax request handler: Error: (2) fopen(/usr/local/nagvis/var/__automap.dot): failed to open stream: Permission denied
I'm not sure where to begin troubleshooting. Should I reconfigure Nagvis?
Thanks,
Tom
Re: Nagvis PHP error
Posted: Wed Apr 23, 2014 9:54 am
by abrist
Could you try to access the page once again and then post a large tail of the apache log?
Re: Nagvis PHP error
Posted: Wed Apr 23, 2014 4:34 pm
by hillhealthcenter
[codelogin as: root
[email protected]'s password:
Last login: Wed Apr 23 17:19:17 2014 from 22hsmk1.hhc.com
[root@nagiosxi ~]# [root@nagiosxi ~]# tail -30 /var/log/httpd/error_log -bash: [root@nagiosxi: command not found
[root@nagiosxi ~]# tail -30 /var/log/httpd/error_log
[Wed Apr 23 17:22:28 2014] [error] [client 192.168.102.81] PHP Warning: fopen(/usr/local/nagvis/var/__automap.dot): failed to open stream: Permission denied in /usr/local/nagvis/share/server/core/classes/NagVisAutoMap.php on line 340, referer:
http://192.168.100.230/nagvis/frontend/nagvis-js/
[Wed Apr 23 17:22:28 2014] [error] [client 192.168.102.81] PHP Warning: fwrite() expects parameter 1 to be resource, boolean given in /usr/local/nagvis/share/server/core/classes/NagVisAutoMap.php on line 341, referer:
http://192.168.100.230/nagvis/frontend/nagvis-js/
[Wed Apr 23 17:22:28 2014] [error] [client 192.168.102.81] PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /usr/local/nagvis/share/server/core/classes/NagVisAutoMap.php on line 342, referer:
http://192.168.100.230/nagvis/frontend/nagvis-js/
[Wed Apr 23 17:25:02 2014] [error] [client 192.168.102.81] PHP Warning: fopen(/usr/local/nagvis/var/__automap.dot): failed to open stream: Permission denied in /usr/local/nagvis/share/server/core/classes/NagVisAutoMap.php on line 340, referer:
http://192.168.100.230/nagvis/frontend/nagvis-js/
[Wed Apr 23 17:25:02 2014] [error] [client 192.168.102.81] PHP Warning: fwrite() expects parameter 1 to be resource, boolean given in /usr/local/nagvis/share/server/core/classes/NagVisAutoMap.php on line 341, referer:
http://192.168.100.230/nagvis/frontend/nagvis-js/
[Wed Apr 23 17:25:02 2014] [error] [client 192.168.102.81] PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /usr/local/nagvis/share/server/core/classes/NagVisAutoMap.php on line 342, referer:
http://192.168.100.230/nagvis/frontend/nagvis-js/
[root@nagiosxi ~]#
][/code]
Re: Nagvis PHP error
Posted: Wed Apr 23, 2014 4:39 pm
by abrist
Have you upgraded nagvis? (don't upgrade as newer versions of nagvis than what shipped with XI will cause issues)
Re: Nagvis PHP error
Posted: Thu Apr 24, 2014 7:08 am
by hillhealthcenter
Andy,
Thanks for getting back to me.
My colleague may have attempted to upgrade Nagvis. The installed version is NagVis Version 1.5.9
Is this the proper version? How can I get this sorted?
Thanks,
Tom
Re: Nagvis PHP error
Posted: Thu Apr 24, 2014 9:08 am
by slansing
1.5.9 is correct, what is the output of the following:
Is it only automap that causes this? What about the other maps?
Re: Nagvis PHP error
Posted: Thu Apr 24, 2014 12:39 pm
by hillhealthcenter
Code: Select all
login as: root
[email protected]'s password:
Last login: Wed Apr 23 17:24:50 2014 from 22hsmk1.hhc.com
[root@nagiosxi ~]# ls -la /usr/local/nagvis/var/
total 140
drwxrwxr-x 3 775 apache 4096 Apr 7 17:27 .
drwxr-xr-x 5 apache apache 4096 Apr 22 16:40 ..
-rw-r--r-- 1 664 apache 466 Apr 7 11:49 __automap.cfg-1.5.9-cache
-rw-r--r-- 1 664 apache 7001 Apr 7 11:49 __automap.cfg-1.5.9-cache-defs
-rw-r--r-- 1 664 apache 20454 Apr 22 15:12 __automap.dot
-rw-r--r-- 1 664 apache 805 Apr 7 17:27 context-default-de_DE.cache
-rw-r--r-- 1 664 apache 767 Apr 7 11:50 context-default-en_US.cache
-rw-r--r-- 1 664 apache 771 Apr 7 11:50 demo2.cfg-1.5.9-cache
-rw-r--r-- 1 664 apache 6982 Apr 7 11:50 demo2.cfg-1.5.9-cache-defs
-rw-r--r-- 1 664 apache 1246 Apr 7 11:50 demo.cfg-1.5.9-cache
-rw-r--r-- 1 664 apache 6981 Apr 7 11:50 demo.cfg-1.5.9-cache-defs
-rw-r--r-- 1 664 apache 1061 Apr 7 11:50 demo-map.cfg-1.5.9-cache
-rw-r--r-- 1 664 apache 6985 Apr 7 11:50 demo-map.cfg-1.5.9-cache-defs
-rw-r--r-- 1 664 apache 1828 Apr 7 11:50 demo-server.cfg-1.5.9-cache
-rw-r--r-- 1 664 apache 6989 Apr 7 11:50 demo-server.cfg-1.5.9-cache-defs
-rw-r--r-- 1 664 apache 2985 Apr 7 17:27 hover-default-de_DE.cache
-rw-r--r-- 1 664 apache 2916 Apr 7 11:50 hover-default-en_US.cache
-rw-r--r-- 1 664 apache 836 Apr 22 15:03 nagvis-audit.log
-rw-r--r-- 1 664 apache 26842 Apr 7 11:49 nagvis.ini.php-1.5.9-cache
drwxrwxr-x 4 664 apache 4096 Apr 7 11:49 tmpl
[root@nagiosxi ~]#
The demo maps are fine. There are no other maps.
Re: Nagvis PHP error
Posted: Thu Apr 24, 2014 4:07 pm
by lmiltchev
What is the NagVis version that is shown when you go to: Home->Nagvis->Need Help->NagVis Support Information? Can you show us a screenshot of this page?
Re: Nagvis PHP error
Posted: Fri Apr 25, 2014 11:19 am
by hillhealthcenter
See attached
Re: Nagvis PHP error
Posted: Fri Apr 25, 2014 2:00 pm
by slansing
Though your other maps work fine, only the automap requires the '.dot' file. Lets try changing it's user to the actual user name not the UID:
Code: Select all
chown apache /usr/local/nagvis/var/__automap.dot
It does not seem like apache is throwing fatal errors out in it's log, so that is a good sign. If this does not work, can you post your access log too?:
Code: Select all
tail -30 /var/log/httpd/access_log