Unable to start Director Deamo

Hi,

I am new to Icinga, so bear with me :slight_smile:

I am deploying a new system but have some issues getting the Director Deamon running. I have run through the prerequisites a million times, however I cant resolve this PHP error that pops up (similar issue with the vSphere Plugin)

When I try to start the deamon (icingacli director deamon rum) I get this:
PHP Fatal error: Uncaught Error: Call to undefined function posix_getpid() in /usr/share/icingaweb2/modules/director/library/Director/Daemon/DaemonProcessDetails.php:97
Stack trace:
#0 /usr/share/icingaweb2/modules/director/library/Director/Daemon/DaemonProcessDetails.php(28): Icinga\Module\Director\Daemon\DaemonProcessDetails->initialize()
#1 /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php(109): Icinga\Module\Director\Daemon\DaemonProcessDetails->__construct(‘d9a5480f0d78401…’)
#2 /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php(78): Icinga\Module\Director\Daemon\BackgroundDaemon->initializeProcessDetails(false)
#3 /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php(52): Icinga\Module\Director\Daemon\BackgroundDaemon->initialize()
#4 /usr/share/icingaweb2/modules/reactbundle/vendor/react/event-loop/src/Tick/FutureTickQueue.php(46): Icinga\Module\Director\Daemon\BackgroundDaemon->Icinga\Module\Director\Daemon{closure}()

in /usr/share/icingaweb2/modules/director/library/Director/Daemon/DaemonProcessDetails.php on line 97

Fatal error: Uncaught Error: Call to undefined function posix_getpid() in /usr/share/icingaweb2/modules/director/library/Director/Daemon/DaemonProcessDetails.php:97
Stack trace:
#0 /usr/share/icingaweb2/modules/director/library/Director/Daemon/DaemonProcessDetails.php(28): Icinga\Module\Director\Daemon\DaemonProcessDetails->initialize()
#1 /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php(109): Icinga\Module\Director\Daemon\DaemonProcessDetails->__construct(‘d9a5480f0d78401…’)
#2 /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php(78): Icinga\Module\Director\Daemon\BackgroundDaemon->initializeProcessDetails(false)
#3 /usr/share/icingaweb2/modules/director/library/Director/Daemon/BackgroundDaemon.php(52): Icinga\Module\Director\Daemon\BackgroundDaemon->initialize()
#4 /usr/share/icingaweb2/modules/reactbundle/vendor/react/event-loop/src/Tick/FutureTickQueue.php(46): Icinga\Module\Director\Daemon\BackgroundDaemon->Icinga\Module\Director\Daemon{closure}()

in /usr/share/icingaweb2/modules/director/library/Director/Daemon/DaemonProcessDetails.php on line 97

This is the installed php modules:
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
zip
zlib

As I said, I am a newbie(also on Linux) but do any of you know what this is caused by?

Hi and welcome :slight_smile:

did you restart the webserver and, depending on the distribution your are running, the php-fpm service after installing the modules?
For Debian/Ubuntu that should be systemctl restart apache2
For RHEL8/CentOS8 systemctl restart httpd and systemctl restart php-fpm

In future please provide some more detailed information about the system you are running and versions of icinga/icingaweb/director/modules is use :slight_smile:

Cheers
log1c

Hello,

please have a look on your icingacli which PHP version is used by it:

cat /usr/bin/icingacli

On the first line you will see which PHP version is used. Afterwards ensure you installed all required packages for this PHP version. For example, if you are using CentOS and rh-php73 you will have to ensure that the packages

rh-php73-php-posix
rh-php73-php-soap
rh-php73-php-cli
rh-php73-php-process

are installed. Once done, restart the Icinga Director service and try again.
It looks like you are simply missing the required PHP package for your used PHP version.

Thats embarrassing :slight_smile: It was a mixup of PHP versions @cstein this solved the issue!

Thanks for helping out!

1 Like