Issue during printing report to PDF or JPG
Issue during printing report to PDF or JPG
I cannot return back to the past therefore I cannot know the exact version cause me the problem.
Some months ago, approximately around 5.4.5/5.4.6 I can print pdf/jpg report without problems.
Yesterday I tryed to migrate to 5.5.1 from 5.5.0 with documented tilde error and wkhtmltox rpm update.
I could upgrade without problem but then I decide to go back to 5.5.0 (by snapshot of the vm) because I wanted to check report export.
Indeed It did not work. The error is an SQL Error about the non existence of unix_timestamp funcion.
I documented myself about it and I discovered that the function does not exist in PostgresSQL but only in MySQL.
Then I discovered that Nagios, from 5 version, uses only MySQL.
Do you think I need to migrate to MySQL also with NagiosXI db following the guide?
Regards,
Graziano.
Some months ago, approximately around 5.4.5/5.4.6 I can print pdf/jpg report without problems.
Yesterday I tryed to migrate to 5.5.1 from 5.5.0 with documented tilde error and wkhtmltox rpm update.
I could upgrade without problem but then I decide to go back to 5.5.0 (by snapshot of the vm) because I wanted to check report export.
Indeed It did not work. The error is an SQL Error about the non existence of unix_timestamp funcion.
I documented myself about it and I discovered that the function does not exist in PostgresSQL but only in MySQL.
Then I discovered that Nagios, from 5 version, uses only MySQL.
Do you think I need to migrate to MySQL also with NagiosXI db following the guide?
Regards,
Graziano.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issue during printing report to PDF or JPG
This fix was in 5.5.1, so going back to 5.5.0 will have the bug with the function that does not existxdatanet wrote:I documented myself about it and I discovered that the function does not exist in PostgresSQL but only in MySQL.
Re: Issue during printing report to PDF or JPG
Ok, indeed the error after upgrade is:
"Failed to create pdf
Verify that your Nagios XI server can connect to the URL:
http://localhost/nagiosxi/reports/avail ... 1&export=1"
And this is because I decided to roll back...
Regards,
Graziano.
"Failed to create pdf
Verify that your Nagios XI server can connect to the URL:
http://localhost/nagiosxi/reports/avail ... 1&export=1"
And this is because I decided to roll back...
Regards,
Graziano.
Re: Issue during printing report to PDF or JPG
Maybe a problem with manual update of wkhtmltox libs???
The link exists in /usr/bin/ and also the files in /usr/local/bin/...
Really we have to update to 12.1.3?? This is a 2014 version...
Regards,
Graziano.
Code: Select all
[Thu Jul 19 14:36:48 2018] [error] [client 192.168.3.146] PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/nagiosxi/html/dashboards/dashboard.php on line 0, referer: http://nagiosxi.xdatanet.com/nagiosxi/dashboards/
sh: /usr/bin/wkhtmltopdf: No such file or directory
sh: /usr/bin/wkhtmltopdf: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
sh: /usr/bin/wkhtmltoimage: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
Really we have to update to 12.1.3?? This is a 2014 version...
Regards,
Graziano.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issue during printing report to PDF or JPG
did you manually install a 32 bit version on a 64 bit system or vise-versa?
Re: Issue during printing report to PDF or JPG
To make a summary for CentoOS 6.4...
Before upgrading:
- NagiosXI 5.5.0;
- wkhtlmtox version 12.5.0;
- error printing in jpg and pdf due unix_timestamp funciont bug in NagiosXI resolved in 5.5.1;
- launching wkhtmltopdf from command line it works like a charm...;
The correct step to migrate is:
- download the 5.5.1 upgrade files, decompress, open upgrade script and comment around line 1232 the install procedure included parenthesis;
- launch the upgrade;
- at the end of upgrade process the wkhtmltox didn't work anymore...
- download the latest patch of wkhtmltox, wkhtmltox-0.12.5-1.centos6.x86_64.rpm;
- install the rpm with rpm -ihv wk[...]. rpm
Now it works again.
Regards,
Graziano.
Before upgrading:
- NagiosXI 5.5.0;
- wkhtlmtox version 12.5.0;
- error printing in jpg and pdf due unix_timestamp funciont bug in NagiosXI resolved in 5.5.1;
- launching wkhtmltopdf from command line it works like a charm...;
The correct step to migrate is:
- download the 5.5.1 upgrade files, decompress, open upgrade script and comment around line 1232 the install procedure included parenthesis;
- launch the upgrade;
- at the end of upgrade process the wkhtmltox didn't work anymore...
- download the latest patch of wkhtmltox, wkhtmltox-0.12.5-1.centos6.x86_64.rpm;
- install the rpm with rpm -ihv wk[...]. rpm
Now it works again.
Regards,
Graziano.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issue during printing report to PDF or JPG
Glad this works! I am going to pass this on to the developers to get it changed in the upgrade scriptxdatanet wrote:To make a summary for CentoOS 6.4...
Before upgrading:
- NagiosXI 5.5.0;
- wkhtlmtox version 12.5.0;
- error printing in jpg and pdf due unix_timestamp funciont bug in NagiosXI resolved in 5.5.1;
- launching wkhtmltopdf from command line it works like a charm...;
The correct step to migrate is:
- download the 5.5.1 upgrade files, decompress, open upgrade script and comment around line 1232 the install procedure included parenthesis;
- launch the upgrade;
- at the end of upgrade process the wkhtmltox didn't work anymore...
- download the latest patch of wkhtmltox, wkhtmltox-0.12.5-1.centos6.x86_64.rpm;
- install the rpm with rpm -ihv wk[...]. rpm
Now it works again.
Regards,
Graziano.
Thanks!
Re: Issue during printing report to PDF or JPG
Just a little extra info on this in case anyone is wondering why we're using the old version. The newer versions have issues generating PDFs when using a self-signed SSL certificates. If you're not using them, or if it's working fine on your system, it shouldn't be a problem using the latest wkhtmltox rpm.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Issue during printing report to PDF or JPG
I have understood... Now it's clear.The newer versions have issues generating PDFs when using a self-signed SSL certificates.
Thanks.
Re: Issue during printing report to PDF or JPG
Did you have further (related) questions or are we good to lock this up?
Former Nagios employee