I have successfully installed and configured Icinga 1.3 and got the basic
web interface up and running and all is good.
I'm now trying to get icinga-web to work. I've followed the instructions
documented here:
When I browse to the icinga-web app I am able to logon but get a blank page. When I
do a view-source I see all the HTML and markup for the page and also the
following error in Chrome's developer tools:
GET http://nagios.node/icinga-web/appkit/squishloader/javascript 500
(Internal Server Error)
Upon checking /usr/local/icinga-web/app/data/log/icinga-web-2011-03-16.log
I
am seeing this identical error for every request I make of the page:
[Wed Mar 16 01:29:08 2011] [fatal] Uncaught AppKitPHPError: PHP Error mkdir() [function.mkdir]: File exists (/usr/local/icinga-web/app/cache/config/compile.xml_development__033d402eaeb08f42e4e3d5f8474e444805e2c7c6.php:1327) (/usr/local/icinga-web/app/modules/AppKit/lib/logging/AppKitExceptionHandler.class.php:20)`
As per the install docs I tried clearing the cache with:
rm /usr/local/icinga-web/app/cache/config/*.php
And then restarting apache but I can't seem to get past this.
I built icinga-web today from the git repo at:
git://git.icinga.org/icinga-web.git
I also tried building from the 1.3.0 tar ball as well but still get the same problem.
Has anyone encountered this issue before?
Update:
This is installed on:
- Centos 5.2 32 bit x86
- Apache 2.2.3 (standard repo install)
- PHP 5.2.17 (installed from IUS Community Packages)
- MySQL 5.0 (standard repo install)
- IDOUtils installed – I used this quick start: http://docs.icinga.org/latest/en/quickstart-idoutils.html
Best Answer
I poked about with this and the problem seems to be within the Agavi components, specifically:
And within the
writeCache()
method:I dropped a logger line into this code and saw that mkdir is trying to recursively create a directory such as:
I deleted this, restarted apache but the problem persisted.
At this point the server was running PHP 5.2.17.
I upgraded PHP to 5.3.5 and this issue magically resolved itself.
Out of interest I knocked PHP back to 5.2.17 to see if there were any differences between the
mkdir()
function behavior in that version compared to the one in 5.3.5. A test script showed that all that PHP did was warn that the folder existed in both versions, there was no hard error thrown.Also, and bizarrely, icinga-web started working with PHP 5.2.17....and I have no idea why. I checked both version's php.ini files thinking that the error_reporting settings may have changed, but they were the same (except that PHP 5.3.5 is set to
E_ALL & ~E_NOTICE | E_DEPRECATED
whereas 5.2.17 is set toE_ALL & ~E_NOTICE
).Hope this is of use to anyone else encountering the same issue.