icingaweb2 role: icinga-director service does not start
Closed this issue · 8 comments
I am testing the roles on openSUSE/Suse using the code from the various pull requests I opened for the different roles.
I have two errors left: For some reason the icinga-director service does not want to start. Is this an error in my installation due to something missing or misconfigured or a dependency not installed? Or is this an error in e.g. the icinga-director package?
OS is Leap 15.5.
Thanks in advance,
Johannes
This is the log from the icingaweb2 role being executed:
[...]
TASK [icinga.icinga.icingaweb2 : Module Director | Ensure config directory] ****
changed: [icinga2-server]
TASK [icinga.icinga.icingaweb2 : Module Director | Manage config files] ********
included: /home/kastl/Icinga/icinga_collection_vagrant_libvirt_ansible/ansible/collections/ansible_collections/icinga/icinga/roles/icingaweb2/tasks/modules/manage_module_config.yml for icinga2-server => (item=kickstart)
included: /home/kastl/Icinga/icinga_collection_vagrant_libvirt_ansible/ansible/collections/ansible_collections/icinga/icinga/roles/icingaweb2/tasks/modules/manage_module_config.yml for icinga2-server => (item=config)
TASK [icinga.icinga.icingaweb2 : Module director | Set file content as hash] ***
ok: [icinga2-server]
TASK [icinga.icinga.icingaweb2 : Module director | Write config file kickstart.ini] ***
changed: [icinga2-server]
TASK [icinga.icinga.icingaweb2 : Module director | Set file content as hash] ***
ok: [icinga2-server]
TASK [icinga.icinga.icingaweb2 : Module director | Write config file config.ini] ***
changed: [icinga2-server]
TASK [icinga.icinga.icingaweb2 : Module Director | Check for pending migrations] ***
changed: [icinga2-server]
TASK [icinga.icinga.icingaweb2 : Module Director | Apply pending migrations] ***
changed: [icinga2-server]
TASK [icinga.icinga.icingaweb2 : Module Director | Check if kickstart is required] ***
changed: [icinga2-server]
TASK [icinga.icinga.icingaweb2 : Module Director | Check if kickstart is required] ***
changed: [icinga2-server]
TASK [icinga.icinga.icingaweb2 : Module Director | Ensure daemon is running] ***
fatal: [icinga2-server]: FAILED! => {"changed": false, "msg": "Unable to start service icinga-director.service: Job for icinga-director.service failed because the control process exited with error code.\nSee \"systemctl status icinga-director.service\" and \"journalctl -xeu icinga-director.service\" for details.\n"}
PLAY RECAP *********************************************************************
icinga2-server : ok=188 changed=82 unreachable=0 failed=1 skipped=32 rescued=0 ignored=0
The journal for the service states the following
Dec 07 20:36:39 icinga2-server systemd[1]: Starting Icinga Director - Monitoring Configuration...
Dec 07 20:36:39 icinga2-server icingadirector[15059]: PHP Fatal error: Uncaught Error: Undefined constant "Icinga\Module\Director\Daemon\SIGHUP" in /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php:187
Dec 07 20:36:39 icinga2-server icingadirector[15059]: Stack trace:
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #0 /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php(68): Icinga\Module\Director\Daemon\BackgroundDaemon->registerSignalHandlers()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #1 /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php(52): Icinga\Module\Director\Daemon\BackgroundDaemon->initialize()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #2 /usr/share/icinga-php/vendor/vendor/react/event-loop/src/Tick/FutureTickQueue.php(46): Icinga\Module\Director\Daemon\BackgroundDaemon->Icinga\Module\Director\Daemon\{closure}()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #3 /usr/share/icinga-php/vendor/vendor/react/event-loop/src/StreamSelectLoop.php(183): React\EventLoop\Tick\FutureTickQueue->tick()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #4 /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php(55): React\EventLoop\StreamSelectLoop->run()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #5 /usr/share/icingaweb2/modules/director/application/clicommands/DaemonCommand.php(24): Icinga\Module\Director\Daemon\BackgroundDaemon->run()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #6 /usr/share/php/Icinga/Cli/Loader.php(269): Icinga\Module\Director\Clicommands\DaemonCommand->runAction()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #7 /usr/share/php/Icinga/Application/Cli.php(165): Icinga\Cli\Loader->dispatch()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #8 /usr/share/php/Icinga/Application/Cli.php(155): Icinga\Application\Cli->dispatchOnce()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #9 /usr/bin/icingacli(7): Icinga\Application\Cli->dispatch()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #10 {main}
Dec 07 20:36:39 icinga2-server icingadirector[15059]: thrown in /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php on line 187
Dec 07 20:36:39 icinga2-server icingadirector[15059]: Fatal error: Uncaught Error: Undefined constant "Icinga\Module\Director\Daemon\SIGHUP" in /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php:187
Dec 07 20:36:39 icinga2-server icingadirector[15059]: Stack trace:
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #0 /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php(68): Icinga\Module\Director\Daemon\BackgroundDaemon->registerSignalHandlers()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #1 /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php(52): Icinga\Module\Director\Daemon\BackgroundDaemon->initialize()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #2 /usr/share/icinga-php/vendor/vendor/react/event-loop/src/Tick/FutureTickQueue.php(46): Icinga\Module\Director\Daemon\BackgroundDaemon->Icinga\Module\Director\Daemon\{closure}()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #3 /usr/share/icinga-php/vendor/vendor/react/event-loop/src/StreamSelectLoop.php(183): React\EventLoop\Tick\FutureTickQueue->tick()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #4 /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php(55): React\EventLoop\StreamSelectLoop->run()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #5 /usr/share/icingaweb2/modules/director/application/clicommands/DaemonCommand.php(24): Icinga\Module\Director\Daemon\BackgroundDaemon->run()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #6 /usr/share/php/Icinga/Cli/Loader.php(269): Icinga\Module\Director\Clicommands\DaemonCommand->runAction()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #7 /usr/share/php/Icinga/Application/Cli.php(165): Icinga\Cli\Loader->dispatch()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #8 /usr/share/php/Icinga/Application/Cli.php(155): Icinga\Application\Cli->dispatchOnce()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #9 /usr/bin/icingacli(7): Icinga\Application\Cli->dispatch()
Dec 07 20:36:39 icinga2-server icingadirector[15059]: #10 {main}
Dec 07 20:36:39 icinga2-server icingadirector[15059]: thrown in /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php on line 187
Dec 07 20:36:39 icinga2-server systemd[1]: icinga-director.service: Main process exited, code=exited, status=255/EXCEPTION
Dec 07 20:36:39 icinga2-server systemd[1]: icinga-director.service: Failed with result 'exit-code'.
Dec 07 20:36:39 icinga2-server systemd[1]: Failed to start Icinga Director - Monitoring Configuration.
Hey, I know the current director does have a few issues. Which version are you using? Can you somehow verify if it is working, when you manually install the director and start the service?
Hey, I know the current director does have a few issues. Which version are you using? Can you somehow verify if it is working, when you manually install the director and start the service?
Installing the packages icinga-director icinga-director-daemon icinga-director-php icinga-director-web icinga-php-incubator
, then starting the service icinga-director.service
results in the same error.
Installing the packages icinga-director icinga-director-daemon icinga-director-php icinga-director-web icinga-php-incubator, then starting the service icinga-director.service results in the same error.
This sounds like the right thing to do, so just to double-check - which PHP version is used by your webserver/php-fpm (depending on your setup)?
Installation of icinga-director
pulls in the following packages, so I daresay it is php8.1:
$ zypper in icinga-director
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following 55 NEW packages are going to be installed:
apache2 apache2-mod_php81 apache2-prefork apache2-utils icinga-director icinga-director-daemon icinga-director-php icinga-director-web icinga-l10n icinga-php-incubator icinga-php-library
icinga-php-thirdparty icingacli icingaweb2 icingaweb2-common libX11-6 libX11-data libXau6 libXpm4 libapr-util1 libapr1 libbrotlienc1 libgd3 libicu73_2 libicu73_2-ledata libjbig2 libjpeg8
libonig4 libpcre2-8-0 libpq5 libtiff5 libwebp7 libxcb1 logrotate php-icinga php81 php81-cli php81-curl php81-dom php81-fileinfo php81-gd php81-gettext php81-iconv php81-intl php81-ldap
php81-mbstring php81-mysql php81-openssl php81-pdo php81-pgsql php81-posix php81-soap php81-sockets system-user-wwwrun xz
55 new packages to install.
Overall download size: 37.7 MiB. Already cached: 0 B. After the operation, additional 182.6 MiB will be used.
Continue? [y/n/v/...? shows all options] (y):
It could of course be that the installation on SUSE/openSUSE needs additional tweaks to get the php setup right.
It could of course be that the installation on SUSE/openSUSE needs additional tweaks to get the php setup right.
Almost! Found the culprit, it's a dependency the package doesn't install: php81-pcntl
- I will open an issue upstream why this particular package isn't included as dependency.
If this is a problem with the general packaging - this isn't something we need to take care of in the collection?
Therefore I would add a disclaimer, that on this specific scenario as long as this bug isn't resolved, the php81-pcntl
needs to be installed in advance.
If so can we close the issue?
closed du to inactivity. And packaging issues.