@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
... View more