Page 1 of 2
Scheduled reports sends corrupted pdf/jpg
Posted: Mon Jul 09, 2018 1:19 am
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
Re: Scheduled reports sends corrupted pdf/jpg
Posted: Mon Jul 09, 2018 2:42 am
by Cpt.Ackbar
I am facing the same error.
Re: Scheduled reports sends corrupted pdf/jpg
Posted: Mon Jul 09, 2018 12:02 pm
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?
Re: Scheduled reports sends corrupted pdf/jpg
Posted: Tue Jul 10, 2018 1:06 am
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
Re: Scheduled reports sends corrupted pdf/jpg
Posted: Tue Jul 10, 2018 2:30 am
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
Re: Scheduled reports sends corrupted pdf/jpg
Posted: Tue Jul 10, 2018 8:29 am
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...
Re: Scheduled reports sends corrupted pdf/jpg
Posted: Tue Jul 10, 2018 9:09 am
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.
Re: Scheduled reports sends corrupted pdf/jpg
Posted: Tue Jul 10, 2018 9:56 am
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
Re: Scheduled reports sends corrupted pdf/jpg
Posted: Tue Jul 10, 2018 2:20 pm
by tgriep
Can you run the following as root
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
Re: Scheduled reports sends corrupted pdf/jpg
Posted: Wed Jul 11, 2018 3:04 am
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