Problem with Icinga web installation - server side errors

5,293

Solution 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.

Solution 2

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

Share:
5,293

Related videos on Youtube

Kev
Author by

Kev

###Actively looking for freelance work ###About Me: I'm a professional software developer and have spent my time building provisioning and web based self-service systems for IIS, Apache and Citrix XenServer, amongst other things. My Curriculum Vitae can be viewed on Stack Overflow Careers (might be a bit out of date). Stuff I like to listen to at last.fm You can get in touch here: kevin.e.kenny #@# gmail.com (you know what to do with the # and spaces). No Survey Emails Please. Also not ashamed to admit I like trains, mostly diesels, late Era 8 (BR Sectorisation) and Era 9 onwards :) I'm also interested in signalling if anyone from Network Rail is looking this far down ;)

Updated on September 17, 2022

Comments

  • Kev
    Kev over 1 year

    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:

    • Kenny Rasschaert
      Kenny Rasschaert about 13 years
      What operating system are you using? Did you install the IDOUtils?
    • Kev
      Kev about 13 years
      @kenny.r - sorry, copy and paste fail, I've added an update to the question. IDOUtils is installed.
    • Kev
      Kev about 13 years
      @kenny - problem solved. See my answer. I think it's one of those PHP oddities.