CFHTMLTOPDF Fails After Restarting Services

New Here ,
Apr 13, 2021 Apr 13, 2021

Copy link to clipboard

Copied

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

Views

82

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

New Here , Apr 15, 2021 Apr 15, 2021
Update: we changed the order of how we restart the services (pushing the PDF service to the beginning) and this appears to have solved the issue. There is still a PDFgServlet timeout error after all of the services are restarted, but initiating a PDF job after this automatically registers the service and all is well.

Likes

Translate

Translate
New Here ,
Apr 15, 2021 Apr 15, 2021

Copy link to clipboard

Copied

Update: we changed the order of how we restart the services (pushing the PDF service to the beginning) and this appears to have solved the issue. There is still a PDFgServlet timeout error after all of the services are restarted, but initiating a PDF job after this automatically registers the service and all is well.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

LATEST

Thank you ej401...I have the same exact problem and your solution works.  I'm not excited about having to restart the whole CF in order to get it to recognize a pdf service.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines