Icingaweb2 Monitoring module pdf export not working

Hi All,

I’m using Icinga2, icinga web2 on RHEL platform with apache as a webserver.

When im trying to export the host or services or any other information using Monitoring -> pdf option new tab is opening and getting below message . Im not seeing any errors in either icniga2 or icingaweb2 logs. However other exports json, csv are working as expected.

This page isn’t working

XXXXXXXX didn’t send any data.

ERR_EMPTY_RESPONSE

I tried updating the /library/Icinga/File/Pdf.php and library/Icinga/Web/Controller/ActionController.php files as per the patch 4044, still no luck. Also increased the memory limit in php.ini still no luck

Ensured PHP-mbstring module installed and in the icingaweb setup page all the pre-requisites met

Below are the version details.

Apache - 2.4.41
Icinga2 - 2.11.2
Icingaweb2 - 2.7.3
PHP - 7.3.13
OS - RHEL 7.6

With Regards,
Krishna Rajapantula

Did you install the chrome requirement ?

Hi Carsten,

You mean chrome-stable? I have not installed it.

I was under impression that this is pre-requisite for pdf-exporter module.

with Regards,
Krishna Rajapantula

There is no chrome requirement just for icingaweb2.
You are talking about the reporting module if I am not mistaken.

@krishna.rajapantula
I don’t have any systems running PHP 7.3, could this maybe be a “problem”?
On Ubuntu18 with PHP7.2 and CentOS7 with PHP7.1 it is working without problems

1 Like

Thank for the response. What can be the reason? Which log files I need to refer for more information.

I have not seen any relevant information on icingaweb and icinga logs, not even apache logs.

@log1c , yeah you are right. Missreaded pdf export :slight_smile:

Thanks.

I have noticed this issue is because of my php installation mbstring extenstion loading along with zlib. I have reinstalled the php including zlib and extension mbstring.

Also i was having issue with php - imagemagick extenstion delegates with none. So i have installed with png, freetype, fontconfig delegate support

Now I could see pdf is trying to get exported but it is failing with status-“Failed-File incomplete”

I see below error in the icingaweb2 log

ErrorException in icingaweb2/library/Icinga/Web/Session/Php72Session.php:20 with message: session_name(): Cannot change session name when headers already sent
#0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}(Integer, String, String, Integer, Array)
#1 icingaweb2/library/Icinga/Web/Session/Php72Session.php(20): session_name(String)
#2 icingaweb2/library/Icinga/Web/Session/PhpSession.php(167): Icinga\Web\Session\Php72Session->open()
#3 icingaweb2/library/Icinga/Web/Controller/ActionController.php(532): Icinga\Web\Session\PhpSession->write()
#4 icingaweb2/library/Icinga/Web/Controller/ActionController.php(474): Icinga\Web\Controller\ActionController->shutdownSession()
#5 icingaweb2/library/vendor/Zend/Controller/Action.php(512): Icinga\Web\Controller\ActionController->postDispatch()
#6 icingaweb2/library/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#7 icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#8 icingaweb2/library/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#9 icingaweb2/library/Icinga/Application/webrouter.php(99): Icinga\Application\Web->dispatch()
#10 icingaweb2/public/index.php(4): require_once(String)
#11 {main}

With Regards,
Krishna Rajapantula

I have exactly the same problem.

System short:

  • Ubuntu 18.04.5 LTS
  • Apache/2.4.29 (Ubuntu)
  • PHP 7.3.23-4
  • icinga2 version: r2.12.1-1
  • icingaweb2 version 2.8.2

System long:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION=“Ubuntu 18.04.5 LTS”

Server version: Apache/2.4.29 (Ubuntu)
Server built: 2020-08-12T21:33:25

PHP 7.3.23-4+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Oct 18 2020 21:21:27) ( NTS )

icinga2 - The Icinga 2 network monitoring daemon (version: r2.12.1-1)

System information:
Platform: Ubuntu
Platform version: 18.04.5 LTS (Bionic Beaver)
Kernel: Linux
Kernel version: 4.15.0-122-generic
Architecture: x86_64

Build information:
Compiler: GNU 8.4.0
Build host: runner-wytxxqbb-project-298-concurrent-0
OpenSSL version: OpenSSL 1.1.1g 21 Apr 2020

Application information:

General paths:
Config directory: /etc/icinga2
Data directory: /var/lib/icinga2
Log directory: /var/log/icinga2
Cache directory: /var/cache/icinga2
Spool directory: /var/spool/icinga2
Run directory: /run/icinga2

Old paths (deprecated):
Installation root: /usr
Sysconf directory: /etc
Run directory (base): /run
Local state directory: /var

Internal paths:
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/icinga2.pid

Icinga Web 2 Version
2.8.2
Git Commit
8a89839af94a247ee2149b2336c73b8251b477c0
PHP-Version
7.3.23-4+ubuntu18.04.1+deb.sury.org+1
Git Commit Datum
2020-08-17

Syslog:

Oct 27 13:32:04 MONITORING icingaweb2[97630]:
ErrorException in /usr/share/php/Icinga/Web/Session/Php72Session.php:20 with message: session_name(): Cannot change session name when headers already sent
#0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}(Integer, String, String, Integer, Array)
#1 /usr/share/php/Icinga/Web/Session/Php72Session.php(20): session_name(String)
#2 /usr/share/php/Icinga/Web/Session/PhpSession.php(167): Icinga\Web\Session\Php72Session->open()
#3 /usr/share/php/Icinga/Web/Controller/ActionController.php(536): Icinga\Web\Session\PhpSession->write()
#4 /usr/share/php/Icinga/Web/Controller/ActionController.php(478): Icinga\Web\Controller\ActionController->shutdownSession()
#5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(512): Icinga\Web\Controller\ActionController->postDispatch()
#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(99): Icinga\Application\Web->dispatch()
#10 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#11 {main}

any ideas how to fix this?

cheers
pio

any ideas how to fix this?

I installed a new server, but the problem is the same. but it works on older instances

pio