Copy link to clipboard
Copied
We have recently bought and installed Coldfusion 2021 on a Linux server (comin from CF11). When creating a pdf we get the following error:
coldfusion.document.webkit.PDFgServiceManagerHelper$NoServiceManagerFoundException: No Service manager is available.
We restarted and PDFg servlet is available:
Started o.e.j.w.WebAppContext@5b4d25e7{PDFgServlet,/PDFgServlet,file:///opt/Cold
Fusion2021/cfusion/jetty/webapps/PDFgServlet/,AVAILABLE}
{/opt/ColdFusion2021/cfusion/jetty/webapps/PDFgServlet}
But when using 'verify' from ColdFusion we see:
2022-01-06 12:54:43.955:WARN:oejshC.PDFgServlet:qtp1671846437-22: unavailable
java.util.ConcurrentModificationException
at java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1043)
2022-01-06 12:54:43.957:WARN:oejs.HttpChannel:qtp1671846437-22: /PDFgServlet/verify
javax.servlet.ServletException: javax.servlet.ServletException: PDFgServlet@9ac5bab0==coldfusion.pdf.service.remote.PDFGServlet,jsp=null,order=-1,inst=true,async=false
Is there any solution to this? Thank you.
Copy link to clipboard
Copied
Try the solution offered here: https://community.adobe.com/t5/coldfusion-discussions/installing-coldfusion-add-on-services-pdfg-for...
But before all that, do a quick check. Open the ColdFusion Administrator. Go to Data & Services > PDF Service.
There should be a service manager, named Localhost, registered under the section PDF Service Managers. Is it enabled? To be sure, click on the Enabled button.
Does that help?
Copy link to clipboard
Copied
BKBK, thanks for the quick sespons. I tried the check you offered. The PDF Service Manager is localhost, but it is not enabled. When clicking on the Enabled button I get "Error enabling PDF Service Manager. Check logs for more details."
The log states:
"coldfusion.document.webkit.PDFgErrorHandler$ConnectionVerificationFailedException: Connection verification failed."
"Error enabling PDF Service Manager."
For the record: we use
localhost
127.0.0.1
port 8994
weight 2
https disabled
Copy link to clipboard
Copied
Addition to previous post:
We also encountered this forum thread: https://community.adobe.com/t5/coldfusion-discussions/cannot-start-pdf-service-manager-on-ubuntu-quo...
We took the advice and steps posted there, but without succes. We already have JDK 11.0.13 in use.
Copy link to clipboard
Copied
@ronj46336389 , thanks to Charlie for revisiting this thread. In the time since your thread I found a way to reproduce the error you saw ( "coldfusion.document.webkit.PDFgErrorHandler$ConnectionVerificationFailedException: Connection verification failed." ). Finding that also led to a solution.
A - To reproduce the exception:
1) Go to the PDF Service page in the ColdFusion Administrator. There you will see the PDF Service Manager, together with its domain name and port number.
2) Click on the button to Verify All Service Managers. You should then see a Connection Status of OK.
An OK means your settings are fine. In that case you are in a position to do the experiment of reproducing the exception.
( Otherwise, the port number is probably incorrect. In that case, proceed to section "B - To find the correct PDF Service port number, hence solve the problem". )
3) Click on the button to edit the PDF Service Manager. Doing so should automatically prefill the Add/Edit form:
4) Change the port number in the form, for example, by reducing it by 1. Here, from 8996 to 8995. Then press the button to Update PDF Service Manager. You will see that the registered PDF Service Manager is now listening on the new port.
5) Click on the button to Verify All Service Managers. You should then see an error:
If you view ColdFusion's exception.log, you will see the following error message:
"Error","http-nio-8500-exec-2","10/16/24","13:54:06","cfadmin","Connection verification failed. The root cause is : Connect to 127.0.0.1:8995 [/127.0.0.1] failed: Connection refused: connect"
coldfusion.document.webkit.PDFgErrorHandler$ConnectionVerificationFailedException: Connection verification failed.
at coldfusion.document.webkit.HttpPDFRequestHandler.verifyPDFgServiceManager(HttpPDFRequestHandler.java:489)
at
...
...
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Thread.java:842)
"Error","http-nio-8500-exec-6","10/16/24","13:58:26","cfadmin","Connect to 127.0.0.1:8995 [/127.0.0.1] failed: Connection refused: connect http://127.0.0.1:8995/PDFgServlet/verify"
B - To find the correct PDF Service port number, hence solve the problem:
The PDF Service port number is usually within the range 8985 to 9005. The following code will therefore find the port number.
<!--- Execution time of code = approximately 6 seconds on ColdFusion 2023 --->
<cfset pdfServicePort="">
<cfloop index="port" from="8985" to="9005">
<!--- Domain of PDF Servive Manager is 127.0.0.1 --->
<cfhttp url="http://127.0.0.1:#port#" method="get" result="cfhttpResult">
<cfif not findNoCase("Connection Failure",cfhttpResult.fileContent)>
<cfif structKeyExists(cfhttpResult.responseHeader, "server") and findNoCase("Jetty",cfhttpResult.responseHeader.server)>
<cfset pdfServicePort=port>
<cfbreak>
</cfif>
</cfif>
</cfloop>
PDF Service port: <cfoutput>#pdfServicePort#</cfoutput>
When I run this code, I get the result: PDF Service port: 8996
Copy link to clipboard
Copied
I realize this is a couple of years on, but in case it may help anyone, I had an instance where I got this error ("No Service manager is available"), and the solution was actually rather simple: on the "PDF service" page of the CF admin, make sure that the "enable" (or "play") button is on (and the "stop" button is not).
In other words, in at least one case I helped with today, the problem was simply that the PDF service was indeed NOT enabled. But there's no words to convey that (in the table to the right of the service). There are only these tiny UI elements, and it can be easy to miss whether the service is enabled or not. And what's also confusing is that the service will "verify" if you try it (reporting "ok"), but that's NOT checking whether the service is ENABLED in CF, only if the service it points to (the add-on service) is running.
Now, if instead you try to run the cfhtmltopdf and get instead the error, "Error occurred while generating PDF", that's a DIFFERENT problem. Often the solution is one I offered in a couple of other places, such as https://stackoverflow.com/a/77327211/90802.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now