Servicegrid export failing

we’re getting failures trying to export from the servicegrid -

creates a 0 byte file

Warning : Uncaught ErrorException: require_once(/usr/share/php/Icinga/File/…/…/vendor/dompdf/lib/html5lib/Parser.php): failed to open stream: No such file or directory in /usr/share/php/Icinga/File/Pdf.php:25 Stack trace: #0 /usr/share/php/Icinga/File/Pdf.php(25): Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}(2, ‘require_once(/u…’, ‘/usr/share/php/…’, 25, Array) #1 /usr/share/php/Icinga/File/Pdf.php(25): require_once() #2 [internal function]: Icinga\Application\ClassLoader->Icinga\File{closure}() #3 /usr/share/php/Icinga/File/Pdf.php(31): call_user_func(Object(Closure)) #4 /usr/share/php/Icinga/Application/ClassLoader.php(303): require(’/usr/share/php/…’) #5 [internal function]: Icinga\Application\ClassLoader->loadClass(‘Icinga\File\Pdf’) #6 /usr/share/php/Icinga/Web/Controller/ActionController.php(532): spl_autoload_call(‘Icinga\File\Pdf’) #7 /usr/share/php/Icinga/Web/Controller/ActionController.php(482): Icinga\Web\Controller\ActionController->sendAsPdf() #8 /usr/share/icingaweb2/ in /usr/share/php/Icinga/File/Pdf.php on line 25

Fatal error : Icinga\Application\ClassLoader::Icinga\File{closure}(): Failed opening required ‘/usr/share/php/Icinga/File/…/…/vendor/dompdf/lib/html5lib/Parser.php’ (include_path=’/usr/share/icingaweb2/library/vendor:.:/usr/share/php’) in /usr/share/php/Icinga/File/Pdf.php on line 25

Fatal error : Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in /usr/share/icingaweb2/library/vendor/Zend/Db/Statement/Pdo.php on line 280

a couple weeks ago it was working fine.
other dashlets like listing hosts or service are able to export csv and json fine.

icingaweb2 v 2.5.1

The default memory_limit of 128MB was hit, try to raise this in your php.ini. Depending on your distribution, this is located either in the PHP-FPM prefix or directly in /etc/php.


i can try that but that just kicks the can down the road. it also doesn’t explain the pdf failure. i have a lab with a smaller number of hosts/services where the json and csv work but get the same pdf failure message.

i’m also seeing the service grid is incomplete - a number of services and hosts are not being shown. in the lab we have300 hosts and 2200 service but service grid only shows 30 hosts and about a dozen services.

so here’s something else that’s weird - the url icingaweb2/monitoring/list/servicegrid?problems only shows a small number of hosts/services as mentioned above. BUT if i remove the ?problems bit, they’re all shown as expected.

i was able to almost solve the pdf issue as being related to the $baseDir in /usr/share/php/Icinga/File/Pdf.php file needing an edit. there’s no long a pdf error but there are some icon (eyeball, check, bell, circle) rendering issues, timeouts for multiple pages, and only printing the first page of the servicegrid.

but the initial problem of the 0 byte size still exists. @dnsmichi i’m not sure which of the many php.ini file to change to increase the memory. i’ve been trying to lower the memory in the lab to see if i can replicate but no luck so far. i’ve been changing /etc/php/7.0/phpdbg/php.ini

Without the knowledge of your distribution and version (see the FAQ for adding all the details in the initial topic), I cannot tell you anything concrete unfortunately.

The path sounds like a Debian or Ubuntu, but that’s just a guess.


yes - that’s correct. here’s the system information:

icingaweb2 - version 2.5.1
icinga2 - (version: r2.8.1-1)

Application information:
Installation root: /usr
Sysconf directory: /etc
Run directory: /run
Local state directory: /var
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/

System information:
Platform: Debian GNU/Linux
Platform version: 9 (stretch)
Kernel: Linux
Kernel version: 4.4.0-142-generic
Architecture: x86_64

Build information:
Compiler: GNU 6.3.0
Build host: d3c3d2a588bd

PHP 7.0.33-0+deb9u3 (cli) (built: Mar 8 2019 10:01:24) ( NTS )

Server version: Apache/2.4.25 (Debian)
Server built: 2018-03-31T08:47:16

also noteworthy is that we are running in docker containers in a cluster of 2 masters with 5 satellite zones each with two nodes; the lab only has 2 satellite zones with two nodes each.

docker version
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:24:56 2018
OS/Arch: linux/amd64
Experimental: false

Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:23:21 2018
OS/Arch: linux/amd64
Experimental: false

From a quick run in a Docker container, I’d say you’ll need to edit /etc/php/7.0/apache2/php.ini.

If you instead decided to disable mpm_prefork and use FPM instead, this is then located in /etc/php/7.0/fpm/php.ini.