1

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:

http://docs.icinga.org/latest/en/icinga-web-scratch.html

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:

Kev
  • 7,777
  • 17
  • 78
  • 108

2 Answers2

1

I poked about with this and the problem seems to be within the Agavi components, specifically:

lib/agavi/src/filter/AgaviExecutionFilter.class.php

And within the writeCache() method:

@mkdir(AgaviConfig::get('core.cache_dir') . DIRECTORY_SEPARATOR . 
        self::CACHE_SUBDIR .
        DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR , 
        array_slice($groups, 0, -1)), 0777, true);

I dropped a logger line into this code and saw that mkdir is trying to recursively create a directory such as:

/usr/local/icinga-www/app/cache/content/amF2YXNjcmlwdF9jb250ZW50/QXBwS2l0X1dpZGdldHMvU3F1aXNoTG9hZGVy

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 to E_ALL & ~E_NOTICE).

Hope this is of use to anyone else encountering the same issue.

Kev
  • 7,777
  • 17
  • 78
  • 108
1

I had the same issue. Took me a time to find the solution. The "AppKitPHPError" is pretty misleading; the real cause is much more simple an easy to resolve.

It is simply missing credentials. Edit the following two configs an fill in your correct DB-logon

  • /whereveryouricingarootis/icinga-web/app/modules/Web/config/icinga-io.xml
  • /whereveryouricingarootis/icinga-web/app/modules/Web/config/icinga-io.site.xml

After this you're done and the error will disappear

Have fun !!

ranX

ranX
  • 11
  • 1