PDF Reports are not generating in new Nagios xi Instance

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
shoreypu
Posts: 115
Joined: Wed Mar 13, 2019 2:06 pm

PDF Reports are not generating in new Nagios xi Instance

Post by shoreypu »

I've set up a new test server running v2024R1.3.4 on RHEL 9 using the configuration from our old test server. In our testing, we cannot generate PDF reports. Metric PDFs are created and downloaded, so this seems to be related to creating reports. In reports, the icon next to PDF just spins. Scheduled reports come in at 0 bytes with the following error "Adobe Acrobat Reader could not open '1743016567-StateHistory[94].pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)."

For my most recent test, I found the following in the /var/log/httpd/ssl_error_log:
[Wed Mar 26 15:17:07.422587 2025] [proxy_fcgi:error] [pid 1962:tid 2099] (70007)The timeout specified has expired: [client 172.20.198.117:51399] AH01075: Error dispatching request to : (polling), referer: https://<nagiosxiqahost>/nagiosxi/includes/components/scheduledreporting/schedulereport.php
[Wed Mar 26 15:17:07.985218 2025] [proxy_fcgi:error] [pid 1961:tid 2112] (70007)The timeout specified has expired: [client 127.0.0.1:32992] AH01075: Error dispatching request to : (polling)

Thanks in advance.

John
User avatar
lgute
Posts: 319
Joined: Mon Apr 06, 2020 2:49 pm

Re: PDF Reports are not generating in new Nagios xi Instance

Post by lgute »

Hi @shoreypu,

Thanks for reaching out.

There have been a lot of changes to the way PDF are generated in our products, so I suspect you may need to upgrade xi. If you are using VMs, please snapshot your current setup before upgrading. That way if anything goes wrong, you can easily get back to your current setup.
Please let us know if you have any other questions or concerns.

-Laura
CptClosecall
Posts: 1
Joined: Fri Mar 28, 2025 1:38 pm

Re: PDF Reports are not generating in new Nagios xi Instance

Post by CptClosecall »

i am having the same issue, exactly the same.

all other reports are working fine but the pdf that sends is completely blank (0kb) not even any formatting

when running tail -Fn0 /var/log/httpd/error_log /var/log/httpd/ssl_error_log /var/log/php-fpm/error.log /var/log/php-fpm/www-error.log /usr/local/nagiosxi/var/wkhtmltox.log

i edited /usr/local/nagiosxi/html/config.inc.php
to include "$cfg['insecure_ssl'] = true;"
as a troubleshooting step


i am seeing the authentication error, but not sure why thats failing

the logs are

[root@Nagios-CSP ~]# tail -Fn0 /var/log/httpd/error_log /var/log/httpd/ssl_error_log /var/log/php-fpm/error.log /var/log/php-fpm/www-error.log /usr/local/nagiosxi/var/wkhtmltox.log
==> /var/log/httpd/error_log <==

==> /var/log/httpd/ssl_error_log <==

==> /var/log/php-fpm/error.log <==

==> /var/log/php-fpm/www-error.log <==
tail: cannot open '/usr/local/nagiosxi/var/wkhtmltox.log' for reading: No such file or directory

==> /var/log/php-fpm/www-error.log <==
[28-Mar-2025 14:46:18] WARNING: [pool www] child 5333 said into stderr: "--2025-03-28 14:46:18-- http://localhost/nagiosxi/reports/execs ... 6293b829bf"
[28-Mar-2025 14:46:18] WARNING: [pool www] child 5333 said into stderr: "Resolving localhost (localhost)... ::1, 127.0.0.1"
[28-Mar-2025 14:46:18] WARNING: [pool www] child 5333 said into stderr: "Connecting to localhost (localhost)|::1|:80... connected."
[28-Mar-2025 14:46:18] WARNING: [pool www] child 5333 said into stderr: "HTTP request sent, awaiting response... 302 Found"
[28-Mar-2025 14:46:18] WARNING: [pool www] child 5333 said into stderr: "Location: https://localhost/nagiosxi/reports/exec ... 6293b829bf [following]"
[28-Mar-2025 14:46:18] WARNING: [pool www] child 5333 said into stderr: "--2025-03-28 14:46:18-- https://localhost/nagiosxi/reports/exec ... 6293b829bf"
[28-Mar-2025 14:46:18] WARNING: [pool www] child 5333 said into stderr: "Connecting to localhost (localhost)|::1|:443... connected."
[28-Mar-2025 14:46:18] WARNING: [pool www] child 5333 said into stderr: "WARNING: The certificate of 'localhost' is not trusted."
[28-Mar-2025 14:46:18] WARNING: [pool www] child 5333 said into stderr: "WARNING: The certificate of 'localhost' doesn't have a known issuer."
[28-Mar-2025 14:46:18] WARNING: [pool www] child 5333 said into stderr: "The certificate's owner does not match hostname 'localhost'"
[28-Mar-2025 14:47:16] WARNING: [pool www] child 68227 said into stderr: "ERROR: Unable to set php_value 'soap.wsdl_cache_dir'"
[28-Mar-2025 14:47:16] WARNING: [pool www] child 68227 said into stderr: "[28-Mar-2025 14:46:18] WARNING: [pool www] child 5333 said into stderr: "HTTP request sent, awaiting response... ""

==> /var/log/httpd/ssl_error_log <==
[Fri Mar 28 14:47:18.199815 2025] [proxy_fcgi:error] [pid 1722:tid 1756] (70007)The timeout specified has expired: [client 172.25.3.40:65289] AH01075: Error dispatching request to : (polling), referer: https://172.25.0.6/nagiosxi/includes/co ... eperiod%3D
[Fri Mar 28 14:47:18.837062 2025] [proxy_fcgi:error] [pid 1722:tid 1770] (70007)The timeout specified has expired: [client ::1:45804] AH01075: Error dispatching request to : (polling)

==> /var/log/php-fpm/www-error.log <==
[28-Mar-2025 14:46:18] WARNING: [pool www] child 5333 said into stderr: "HTTP request sent, awaiting response... 504 Gateway Timeout"
[28-Mar-2025 14:47:18] WARNING: [pool www] child 5333 said into stderr: "Retrying."
[28-Mar-2025 14:47:19] WARNING: [pool www] child 5333 said into stderr: "--2025-03-28 14:47:19-- (try: 2) https://localhost/nagiosxi/reports/exec ... 6293b829bf"
[28-Mar-2025 14:47:19] WARNING: [pool www] child 5333 said into stderr: "Reusing existing connection to [localhost]:443."
[28-Mar-2025 14:47:19] WARNING: [pool www] child 5333 said into stderr: "HTTP request sent, awaiting response... 401 Unauthorized"
[28-Mar-2025 14:47:19] WARNING: [pool www] child 5333 said into stderr: "Username/Password Authentication Failed."
shoreypu
Posts: 115
Joined: Wed Mar 13, 2019 2:06 pm

Re: PDF Reports are not generating in new Nagios xi Instance

Post by shoreypu »

lgute wrote: Thu Mar 27, 2025 10:05 am Hi @shoreypu,

Thanks for reaching out.

There have been a lot of changes to the way PDF are generated in our products, so I suspect you may need to upgrade xi. If you are using VMs, please snapshot your current setup before upgrading. That way if anything goes wrong, you can easily get back to your current setup.
Hi Laura,

This is a new QA system which is now running RHEL9, replacing our old RHEL 7 system. We are not running the latest version of xi because of the Dashboard issues that have been reported. Is this PDR reporting issue a known issue that is resolved with the latest version of xi? I would not want to upgrade otherwise as we are in the middle of testing and sign off for the production upgrade.

Thanks...John
User avatar
lgute
Posts: 319
Joined: Mon Apr 06, 2020 2:49 pm

Re: PDF Reports are not generating in new Nagios xi Instance

Post by lgute »

Hi @shoreypu,

I know one of our developers is working on this and will check, to see if there is a resolution and what it is.
Please let us know if you have any other questions or concerns.

-Laura
User avatar
lgute
Posts: 319
Joined: Mon Apr 06, 2020 2:49 pm

Re: PDF Reports are not generating in new Nagios xi Instance

Post by lgute »

Hi @shoreypu,

I have a hotfix for your PDF issues. Please take a snapshot/backup of your xi system, before applying.

Download and install the google-chrome-stable package

Code: Select all

wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
sudo dnf install -y ./google-chrome-stable_current_x86_64.rpm
Edit the file /usr/local/nagiosxi/html/includes/utils-reports-export.inc.php and change line 164. It should look like this...

Code: Select all

    $bin = 'chromium-browser --headless=new --ignore-certificate-errors --enable-low-end-device-mode --disable-gpu --virtual-time-budget=10000 --run-all-compositor-stages-before-draw';
Change it to...

Code: Select all

    $bin = 'google-chrome-stable --headless=new --ignore-certificate-errors --enable-low-end-device-mode --disable-gpu --no-sandbox --virtual-time-budget=10000 --run-all-compositor-stages-before-draw';
...save and close.

Please let us know if this resolves your PDF issues or if you are still having issues.
Please let us know if you have any other questions or concerns.

-Laura
shoreypu
Posts: 115
Joined: Wed Mar 13, 2019 2:06 pm

Re: PDF Reports are not generating in new Nagios xi Instance

Post by shoreypu »

Laura,

Do you know if switching to Chrome is a temporary or permanent fix? The reason I ask is because our systems team said Chrome is not officially supported by RedHat, so our systems team would not expect any support from RedHat to resolve any related issues.

If this is only temporary, we could run a test to see if it would fix the issue, but would not be able to proceed with a change in our new production instance.

Thanks...John
DoubleDoubleA
Posts: 199
Joined: Thu Feb 09, 2017 5:07 pm

Re: PDF Reports are not generating in new Nagios xi Instance

Post by DoubleDoubleA »

Hi John,

Chromium is not necessarily a permanent solution. We chose it when we were moving from wkhtmltopdf, but it has been a headache from a packaging standpoint basically the whole time. We're evaluating other options.

Aaron
User avatar
lgute
Posts: 319
Joined: Mon Apr 06, 2020 2:49 pm

Re: PDF Reports are not generating in new Nagios xi Instance

Post by lgute »

For everyone's information, here is the changelog entry for the switch to Chromium, just over a year ago.
2024R1.1 - 03/26/2024
...
- Replaced wkhtmltox reporting backend with chromium [GL:xi#795] – DA
Please let us know if you have any other questions or concerns.

-Laura
shoreypu
Posts: 115
Joined: Wed Mar 13, 2019 2:06 pm

Re: PDF Reports are not generating in new Nagios xi Instance

Post by shoreypu »

Aaron & Laura,

Thanks for the information. We'll request that our systems team add the repo so we can test (and maintain) Chrome on our test system and let you know.

John