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.
In my case, there were two changes that needed to be made.
1) /etc/default/icinga needs to be configured so that IDO2DB will run:
# start ido2db daemon (no/yes)
IDO2DB=yes
2) The IDO module needs to be defined in /etc/icinga/modules/
/etc/icinga/modules/idoutils.cfg:
define module {
module_name ido_mod
path /usr/lib/icinga/idomod.so
module_type neb
args config_file=/etc/icinga/idomod.cfg
}
The previous config file will, of course, need to match how your system is configured. The above is being used on an Ubuntu 12.10 server.
Best Answer
regarding the network connections
The IdoMysqlConnection in Icinga2 needs to be configured to point to host = "host2", port = "3306". Icinga Web databases.xml needs to be edited to point to the ido backend dsn for "host2:3306". Details on the documentation.