wkhtmltoimage and wkhtmltopdf failing after upgrade

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
epurins
Posts: 8
Joined: Wed Oct 02, 2019 5:16 pm

wkhtmltoimage and wkhtmltopdf failing after upgrade

Post by epurins »

Hi team,

After upgrading from 5.4.10 to 5.6.7, on self-managed centos 7.3 from tar archives, scheduled reports that call wkhtmltoimage and wkhtmltopdf are sent by email, but reports that use pdf or images are failing to embed the pdf/image.

Downloading the files from the report succeeds when it is a CSV, but fails with image and pdf types.

For example, the PDF error page includes the text:
Failed to create PDF
Verify that your Nagios XI server can connect to the URL:
https://localhost/nagiosxi/reports/availability.php?

If I hit the URL replacing localhost with my fully-qualified hostname, I get an image ok.
(https://my.nagios.com/nagiosxi/reports/availability.php?)

When I checked the 'External URL' field, it was unconfigured. I set a matching value, applied configuration, and restarted nagios with `systemctl restart nagios`. Downloading the report as a pdf or image still fails, and still displays the localhost url.

Tailing /var/log/httpd/error_log, there are log lines like the following:
/usr/bin/wkhtmltoimage: /lib64/libcrypto.so.10: version `OPENSSL_1.0.2' not found (required by /usr/bin/wkhtmltoimage)
/usr/bin/wkhtmltopdf: /lib64/libcrypto.so.10: version `OPENSSL_1.0.2' not found (required by /usr/bin/wkhtmltopdf)

Running the binaries to check their version string throws the same error on the command line.
[nagios@host epurins]$ /usr/bin/wkhtmltoimage -V
/usr/bin/wkhtmltoimage: /lib64/libcrypto.so.10: version `OPENSSL_1.0.2' not found (required by /usr/bin/wkhtmltoimage)
[nagios@host epurins]$ /usr/bin/wkhtmltopdf -V
/usr/bin/wkhtmltopdf: /lib64/libcrypto.so.10: version `OPENSSL_1.0.2' not found (required by /usr/bin/wkhtmltopdf)

What steps can I take to ensure that the binaries run ok on the command line without error?
How can I repair this component so it sends images ok again?

-e
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: wkhtmltoimage and wkhtmltopdf failing after upgrade

Post by scottwilkerson »

Something doesn't seem right, can I have you run

Code: Select all

yum reinstall openssl openssl-libs libzip
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
epurins
Posts: 8
Joined: Wed Oct 02, 2019 5:16 pm

Re: wkhtmltoimage and wkhtmltopdf failing after upgrade

Post by epurins »

Hi Scott,

I reinstalled, but the commands still fail with the same error.
I also tried removing the wkhtmltox.x86_64 package and re-installing that.

-e
epurins
Posts: 8
Joined: Wed Oct 02, 2019 5:16 pm

Re: wkhtmltoimage and wkhtmltopdf failing after upgrade

Post by epurins »

Hi Scott,

I looked at the prod server libs using ldd.
The applications point to libcrypto, which is expecting /lib64/libssl.so.10
This lib is a symlink on the system, pointing to `/lib64/libssl.so.1.0.1e`
So that seems to line up with the error.

Maybe the base OS repos for the centos version in production are too old to install a modern libssl?

-e
epurins
Posts: 8
Joined: Wed Oct 02, 2019 5:16 pm

Re: wkhtmltoimage and wkhtmltopdf failing after upgrade

Post by epurins »

Alternately, is there a suitable downgrade I can apply in the short term? I know the version from 5.4.10 was running ok. Is it safe to replace just this subcomponent?
epurins
Posts: 8
Joined: Wed Oct 02, 2019 5:16 pm

Re: wkhtmltoimage and wkhtmltopdf failing after upgrade

Post by epurins »

Answering own question, I was able to pull the old binaries from previous 5.4.10 install and replace them manually, and the system seems ok.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: wkhtmltoimage and wkhtmltopdf failing after upgrade

Post by scottwilkerson »

epurins wrote:Answering own question, I was able to pull the old binaries from previous 5.4.10 install and replace them manually, and the system seems ok.
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked