Icinga 2 with Debian 10 problems

Hello,

I upgraded my Icinga2 monitoring server from Debian 9 to Debian 10 about two weeks ago and since then I am facing, among others, these problems (please have a look also at the enclosed screenshots):

  1. If I run an import with the Director Kickstart Wizard, I get this error message: “No CURL extension detected, it must be installed and enabled (RestApiClient.php:84)”.

Please note that the packages php7.3-curl and php7.3 were also upgraded and are present:

root@mon01:~# dpkg -l | grep php
ii libapache2-mod-php 2:7.3+69 all server-side, HTML-embedded scripting language (Apache 2 module) (default)
ii libapache2-mod-php7.0 7.0.33-0+deb9u3 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii libapache2-mod-php7.3 7.3.4-2 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii php 2:7.3+69 all server-side, HTML-embedded scripting language (default)
ii php-common 2:69 all Common files for PHP packages
ii php-curl 2:7.3+69 all CURL module for PHP [default]
rc php-dompdf 0.6.2+dfsg-3 all HTML to PDF converter
rc php-font-lib 0.3.1+dfsg-3 all read, parse, export and make subsets of different fonts
ii php-htmlpurifier 4.10.0-1 all Standards-compliant HTML filter
ii php-icinga 2.6.3-1.stretch all PHP library to communicate with and use Icinga
rc php-imagick 3.4.3-4.1 amd64 Provides a wrapper to the ImageMagick library
ii php-remctl 3.15-1+b3 amd64 PECL module for Kerberos-authenticated command execution
ii php7.0 7.0.33-0+deb9u3 all server-side, HTML-embedded scripting language (metapackage)
ii php7.0-cli 7.0.33-0+deb9u3 amd64 command-line interpreter for the PHP scripting language
ii php7.0-common 7.0.33-0+deb9u3 amd64 documentation, examples and common module for PHP
rc php7.0-curl 7.0.33-0+deb9u3 amd64 CURL module for PHP
ii php7.0-fpm 7.0.33-0+deb9u3 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
ii php7.0-gd 7.0.33-0+deb9u3 amd64 GD module for PHP
ii php7.0-intl 7.0.33-0+deb9u3 amd64 Internationalisation module for PHP
ii php7.0-json 7.0.33-0+deb9u3 amd64 JSON module for PHP
ii php7.0-ldap 7.0.33-0+deb9u3 amd64 LDAP module for PHP
ii php7.0-mbstring 7.0.33-0+deb9u3 amd64 MBSTRING module for PHP
ii php7.0-mysql 7.0.33-0+deb9u3 amd64 MySQL module for PHP
ii php7.0-opcache 7.0.33-0+deb9u3 amd64 Zend OpCache module for PHP
ii php7.0-readline 7.0.33-0+deb9u3 amd64 readline module for PHP
ii php7.0-xml 7.0.33-0+deb9u3 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP
ii php7.3 7.3.4-2 all server-side, HTML-embedded scripting language (metapackage)
ii php7.3-cli 7.3.4-2 amd64 command-line interpreter for the PHP scripting language
ii php7.3-common 7.3.4-2 amd64 documentation, examples and common module for PHP
ii php7.3-curl 7.3.4-2 amd64 CURL module for PHP
rc php7.3-fpm 7.3.4-2 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
rc php7.3-gd 7.3.4-2 amd64 GD module for PHP
rc php7.3-intl 7.3.4-2 amd64 Internationalisation module for PHP
ii php7.3-json 7.3.4-2 amd64 JSON module for PHP
rc php7.3-ldap 7.3.4-2 amd64 LDAP module for PHP
rc php7.3-mysql 7.3.4-2 amd64 MySQL module for PHP
ii php7.3-opcache 7.3.4-2 amd64 Zend OpCache module for PHP
ii php7.3-readline 7.3.4-2 amd64 readline module for PHP
rc php7.3-xml 7.3.4-2 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP

  1. If I check a service manually through “check now”, I get this error message:

icinga2: Use of undefined constant CURLOPT_URL - assumed ‘CURLOPT_URL’.
#0 /usr/share/icingaweb2/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php(70): Icinga\Module\Monitoring\Command\Transport\CommandTransport->send(Object(Icinga\Module\Monitoring\Command\Object\ScheduleHostCheckCommand))
#1 /usr/share/php/Icinga/Web/Form.php(1161): Icinga\Module\Monitoring\Forms\Command\Object\CheckNowCommandForm->onSuccess()
#2 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php(275): Icinga\Web\Form->handleRequest()
#3 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php(60): Icinga\Module\Monitoring\Web\Controller\MonitoredObjectController->setupQuickActionForms()
#4 /usr/share/icingaweb2/modules/monitoring/application/controllers/HostController.php(61): Icinga\Module\Monitoring\Web\Controller\MonitoredObjectController->showAction()
#5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Monitoring\Controllers\HostController->showAction()
#6 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#7 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#8 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#9 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch()
#10 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#11 {main}

  1. The main menu on the left hand side disappears sometimes and comes back only if I refresh the page (F5).

About my environment:

Debian 10.0
Icinga2 r2.10.5-1
PHP 7.3
Apache2 2.4.38-3

root@mon01:~# icinga2 feature list
Disabled features: debuglog elasticsearch gelf graphite influxdb livestatus opentsdb perfdata statusdata syslog
Enabled features: api checker command compatlog ido-mysql mainlog notification

I have read that some Ubuntu users had similar problems after upgrading from Ubuntu 16.04 to Ubuntu 18.04. Are these issues already known in Debian 10 Buster and are going to get corrected with the next Icinga update or what should I do to correct them?

Thank you very much in advance.

Best regards,

Javier

Hi,

the output of dpkg -l shows some old references from PHP 7.0, I could imagine that Apache is still running using the old module. You can test this e.g. by creating a test.php with the following content: <?php echo phpinfo(); ?> - put that somewhere safe, non public and delete it right afterwards.

I’d suggest to uninstall the 7.0 modules and ensure that Apache uses 7.3 with all required modules.

Cheers,
Michael

Hello Michael,

thank you very much for your response. I finally solved the problem by uninstalling all PHP (7.0 and 7.3) modules and reinstalling php7.3 and php7.3-curl again:

apt-get remove --purge php*
apt-get install php7.3 php7.3-curl
php -v
apt-get install -y icingaweb2 icingacli
systemctl restart icinga2

Please note that if you do that, it is also necessary to reinstall the icingaweb2 icingacli packages:

Best regards,

Javier

1 Like