CFHTMLTOPDF Fails After Restarting Services
Since installing CF 2021 HF 1, we have had issues with CFHTMLTOPDF after a service restart. The error in the application log after trying to generate even a simple PDF is:
Error occurred while generating PDF.Reason: SERVER ERROR
The stacktrace is:
58472 "Error","cfthread-3","04/08/21","14:38:11","","GENERATEPDFS: Error occurred while generating PDF. Reason: SERVER ERROR"
58473 coldfusion.document.webkit.PDFgErrorHandler$ServiceManagerConversionException: Error occurred while generating PDF.
58474 at coldfusion.document.webkit.PDFgErrorHandler.handleConversionError(PDFgErrorHandler.java:190)
58475 at coldfusion.document.webkit.HttpPDFRequestHandler.requestPDFGeneration(HttpPDFRequestHandler.java:178)
58476 at coldfusion.tagext.htmltopdf.HtmlToPdfTag.processPDFgRequest(HtmlToPdfTag.java:1149)
58477 at coldfusion.tagext.htmltopdf.HtmlToPdfTag.handlePDFgConversionRequest(HtmlToPdfTag.java:1299)
58478 at coldfusion.tagext.htmltopdf.HtmlToPdfTag.convertToPDF(HtmlToPdfTag.java:1236)
58479 at coldfusion.tagext.htmltopdf.HtmlToPdfTag.doEndTag(HtmlToPdfTag.java:1412)
And the error in the server log is:
Read timed out http://127.0.0.1:8993/PDFgServlet/
After the above server error appears, the only way to correct the issue is to stop the "localhost" PDF service manager, edit and save it, and then restart it. If you only stop and restart it, the issue is not fixed. In terms of the messages in the server log, stopping the PDF service generates:
PDFg service manager http://127.0.0.1:8993/PDFgServlet/ unregistered.
But we don't see the corresponding "registered" message until after an edit AND restart:
PDFg service manager http://127.0.0.1:8993/PDFgServlet/ registered.
At this point, the service starts working again and PDFs can be generated.
Thoughts or suggesions?
Thanks,
Eric
