Icinga-director.service does not start

Hi, the deamon icinga-director.service isnt start.
the syslog says:

Aug  5 14:37:14 v113 icingadirector[23158]: PHP Fatal error:  Uncaught Error: Call to a member function translate() on null in /usr/share/php/Icinga/Application/functions.php:35
Aug  5 14:37:14 v113 icingadirector[23158]: Stack trace:
Aug  5 14:37:14 v113 icingadirector[23158]: #0 /usr/share/php/Icinga/Application/Config.php(328): t('Cannot read con...')
Aug  5 14:37:14 v113 icingadirector[23158]: #1 /usr/share/php/Icinga/Application/Config.php(397): Icinga\Application\Config::fromIni('/etc/icingaweb2...')
Aug  5 14:37:14 v113 icingadirector[23158]: #2 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(589): Icinga\Application\Config::app()
Aug  5 14:37:14 v113 icingadirector[23158]: #3 /usr/share/php/Icinga/Application/Cli.php(42): Icinga\Application\ApplicationBootstrap->loadConfig()
Aug  5 14:37:14 v113 icingadirector[23158]: #4 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(416): Icinga\Application\Cli->bootstrap()
Aug  5 14:37:14 v113 icingadirector[23158]: #5 /usr/bin/icingacli(7): Icinga\Application\ApplicationBootstrap::start('/usr/share/icin...')
Aug  5 14:37:14 v113 icingadirector[23158]: #6 {main}
Aug  5 14:37:14 v113 icingadirector[23158]:   thrown in /usr/share/php/Icinga/Application/functions.php on line 35
Aug  5 14:37:14 v113 icingadirector[23158]: Fatal error: Uncaught Error: Call to a member function translate() on null in /usr/share/php/Icinga/Application/functions.php:35
Aug  5 14:37:14 v113 icingadirector[23158]: Stack trace:
Aug  5 14:37:14 v113 icingadirector[23158]: #0 /usr/share/php/Icinga/Application/Config.php(328): t('Cannot read con...')
Aug  5 14:37:14 v113 icingadirector[23158]: #1 /usr/share/php/Icinga/Application/Config.php(397): Icinga\Application\Config::fromIni('/etc/icingaweb2...')
Aug  5 14:37:14 v113 icingadirector[23158]: #2 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(589): Icinga\Application\Config::app()
Aug  5 14:37:14 v113 icingadirector[23158]: #3 /usr/share/php/Icinga/Application/Cli.php(42): Icinga\Application\ApplicationBootstrap->loadConfig()
Aug  5 14:37:14 v113 icingadirector[23158]: #4 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(416): Icinga\Application\Cli->bootstrap()
Aug  5 14:37:14 v113 icingadirector[23158]: #5 /usr/bin/icingacli(7): Icinga\Application\ApplicationBootstrap::start('/usr/share/icin...')
Aug  5 14:37:14 v113 icingadirector[23158]: #6 {main}
Aug  5 14:37:14 v113 icingadirector[23158]:   thrown in /usr/share/php/Icinga/Application/functions.php on line 35

it look like the ipl\I18n\StaticTranslator issnt found. But i installed the icinga-php-library successfuly (version 0.6.1-1.buster)
If i look into “/usr/share/icinga-php/ipl/vendor/ipl/i18n” i dont see a StaticTranslator. Only i see a subfolder /src and in this i see it.

What is wrong? can somebody tell what i should do?

  • Director version (System - About): 1.8.1
  • Icinga Web 2 version and modules (System - About): 2.9.2
  • Icinga 2 version (icinga2 --version): r2.13.0-1
  • Operating System and version: debian10
  • Webserver, PHP versions: 7.3.29-1~deb10u1
  • icinga/icinga-php-library: 0.6.1
  • icinga/icinga-php-thirdparty: 0.10.0
  • incubator: 0.6.0
1 Like

Looks like you’re missing a php package. On our version of PHP (7.1) and a redhat system, ours is:
rh-php71-php-intl-7.1.30-2.el7.x86_64

Looks like for debian 10 it’s php7.3-intl based off your version of php:
https://packages.debian.org/buster/php7.3-intl

Hi Ben,
thanks for your answer. i have installed this package.

dpkg -l | grep php7.3-intl
ii  php7.3-intl                          7.3.29-1~deb10u1                      amd64        Internationalisation module for PHP

looks like the problem is another.

EDIT: I couldn’t let this ago, and as far as I can tell, the translate() comes from incubator. Might be worth removing incubator and trying a clean install

Same error? I’ve run into this before, I think that I was missing a php package, but I could be wrong (it was over a year).

Or maybe it was that one of my libraries (which are now all bundled together under the icinga-php) wasn’t up to date with the others. Could be a bug in that library.

Regardless, here’s a list of my redhat php stuff just in case:

rh-php71-php-pgsql-7.1.30-2.el7.x86_64
rh-php71-php-xml-7.1.30-2.el7.x86_64
rh-php71-php-common-7.1.30-2.el7.x86_64
rh-php71-php-process-7.1.30-2.el7.x86_64
rh-php71-php-pdo-7.1.30-2.el7.x86_64
rh-php71-php-fpm-7.1.30-2.el7.x86_64
rh-php71-php-mbstring-7.1.30-2.el7.x86_64
rh-php71-php-zip-7.1.30-2.el7.x86_64
rh-php71-php-gd-7.1.30-2.el7.x86_64
rh-php71-php-cli-7.1.30-2.el7.x86_64
rh-php71-php-json-7.1.30-2.el7.x86_64
rh-php71-php-intl-7.1.30-2.el7.x86_64
rh-php71-runtime-1-1.el7.x86_64
rh-php71-php-mysqlnd-7.1.30-2.el7.x86_64
rh-php71-php-ldap-7.1.30-2.el7.x86_64

Hi Ben, i have all this packages installed.
I open a ticked, perhaps icinga consultand can help.
thanks

the permissions in /etc/icingaweb2 issnt set correct.
i have set to www-data:icingaweb2 and now the service is started and the configuration issnt pending any more.
thanks.

3 Likes

Thanks for posting the solution here. :+1:

Oof, it was an obvious one right under our nose!

Glad you got it resolved without any of my hacky solutions :wink: