Scheduled reports sends corrupted pdf/jpg

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
atsb
Posts: 75
Joined: Mon Feb 12, 2018 5:23 am

Scheduled reports sends corrupted pdf/jpg

Post by atsb »

Hello!

About nagios XI environment
1) Linux Distribution and version? Centos7
2) 32 or 64bit? 64bit
3) VMware Image or Manual Install of XI? Manual install
4) Are there special configurations on your system, ie; is Gnome installed? Are you using a proxy? Are you using SSL? SSL

Problem occurred after upgrading to nagios version 5.5. Scheduled reports are sent out just fine but attached files (pdf/jpg) seem to be corrupted. Cant open them, tried different programs to open .pdf: Adobe, Chrome, Edge, Mozilla in all cases it says something like "Could not open file because its damaged or not supported"
nagios-x-1-2.png
nagios-x-1-1.png
Cpt.Ackbar
Posts: 31
Joined: Thu Aug 17, 2017 7:14 am

Re: Scheduled reports sends corrupted pdf/jpg

Post by Cpt.Ackbar »

I am facing the same error.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Scheduled reports sends corrupted pdf/jpg

Post by tgriep »

Can you manually run the report from the XI GUI and download it as a PDF file?

Are the size of the attachments zero bytes?
If they are not zero bytes, can you attach one of them here so we can view the contents of the PDF of JPG file?
Be sure to check out our Knowledgebase for helpful articles and solutions!
atsb
Posts: 75
Joined: Mon Feb 12, 2018 5:23 am

Re: Scheduled reports sends corrupted pdf/jpg

Post by atsb »

Actually when downloading "Executive Summary" directly as jpg or pdf the content appears to be error message "SQL Error". Look for details in the files.
execsummary.jpg
execsummary.pdf
Cpt.Ackbar
Posts: 31
Joined: Thu Aug 17, 2017 7:14 am

Re: Scheduled reports sends corrupted pdf/jpg

Post by Cpt.Ackbar »

adding output of errorlog from time when report was generated

Code: Select all

cat /var/log/httpd/error_log | grep "Tue Jul 10 08:05" > log_from_time.txt
You do not have the required permissions to view the files attached to this post.
User avatar
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

Re: Scheduled reports sends corrupted pdf/jpg

Post by GldRush98 »

I can confirm generated PDF or JPG reports (any report generation, not just the exec summary) is broken on both of my XI 5.5.0 machines as well with the same error as above...
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Scheduled reports sends corrupted pdf/jpg

Post by tgriep »

I tried to recreate the issue but could not but take a look at this forum post which has a similar error and has instructions to update a PHP file to fix it.
https://support.nagios.com/forum/viewto ... =6&t=49283
Try it out and let us know if it fixes the issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

Re: Scheduled reports sends corrupted pdf/jpg

Post by GldRush98 »

I tried replacing the file and it improves the situation and fixes some reports. The Exec Summary is still broken, but it's not spitting out errors now:
execsummary.jpg
You do not have the required permissions to view the files attached to this post.
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Scheduled reports sends corrupted pdf/jpg

Post by tgriep »

Can you run the following as root

Code: Select all

tail -f /var/log/httpd/*_log
then try and download the Executive Report PDF file and post the output of the tail command?

Also, can you post these files from the Nagios server so we cna check the settings?

Code: Select all

/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/nagiosxi.conf
/etc/httpd/conf.d/ssl.conf
Be sure to check out our Knowledgebase for helpful articles and solutions!
atsb
Posts: 75
Joined: Mon Feb 12, 2018 5:23 am

Re: Scheduled reports sends corrupted pdf/jpg

Post by atsb »

tgriep wrote:I tried to recreate the issue but could not but take a look at this forum post which has a similar error and has instructions to update a PHP file to fix it.
https://support.nagios.com/forum/viewto ... =6&t=49283
Try it out and let us know if it fixes the issue.
This worked for me. pdf/jpg files are not corrupted anymore. Thanks
Locked