Copy link to clipboard
Copied
We are pleased to announce that we have released general updates to ColdFusion (2023 release) Update 11 and ColdFusion (2021 release) Update 17.
The updates include bug fixes and enhancements in Administrator, Language, CFSetup, Database, and other areas. They also contain library upgrades, such as netty, ehcache, etc.
After applying the update, we recommend clearing the Felix cache as a workaround for installing the HTMLToPDF package and verifying the Oracle data source.
The updates also contain enhancements to whitespace management and client variable support in CFPM.
Where do I download the updates from
Download the updates from the following locations:
For more information, view the following tech notes:
Known issues in the update
Are the Docker images available
The images are available on the Docker hub and ECR.
Is CFFiddle updated with the changes
CFFiddle is updated with the changes.
Please update your ColdFusion versions and provide your valuable feedback.
Copy link to clipboard
Copied
So, getting pretty weird now. cfdocument doesn't crash immediately, but functions like cfhtmltopdf before:
Copy link to clipboard
Copied
Thanks for the update, @Sireex . It indeed looks like something's gone wrong in the PDF engine.
Try my cfpm suggestion, and let's see how that goes.
Copy link to clipboard
Copied
Okay, I managed to get it working on our second test server using cfpm.bat.
I think out primary test server is beyond salvation atm, nothing seems to work there.
Thanks for the advice BKBK!
Copy link to clipboard
Copied
I am glad to hear the news.
You should give the "primary test server" one last try. In what follows, I am assuming that the server is on Update 17 of ColdFusion 2021.
Try the following variation of my cfpm.bat suggestion:
Copy link to clipboard
Copied
This happens on the problematic server when running install all:
zip package cannot be installed by the server. Please check the server logs and try installing again.
ajax package cannot be installed by the server. Please check the server logs and try installing again.
Other test server didn't produce any errors with install all
Copy link to clipboard
Copied
exception.log shows this when trying to generate PDF's:
"Error","ajp-nio-127.0.0.1-8020-exec-9","11/07/24","10:49:02","test_env","Connect to 127.0.0.1:8993 [/127.0.0.1] failed: Connection refused: connect http://127.0.0.1:8993/PDFgServlet/"
"Error","ajp-nio-127.0.0.1-8020-exec-9","11/07/24","10:49:03","test_env","Connect to 127.0.0.1:8993 [/127.0.0.1] failed: Connection refused: connect http://127.0.0.1:8993/PDFgServlet/"
"Error","ajp-nio-127.0.0.1-8020-exec-9","11/07/24","10:49:03","test_env","Error occurred while generating PDF.Reason: Error occurred while handling request.
Copy link to clipboard
Copied
exception.log shows this when trying to generate PDF's:
"Error","ajp-nio-127.0.0.1-8020-exec-9","11/07/24","10:49:02","test_env","Connect to 127.0.0.1:8993 [/127.0.0.1] failed: Connection refused: connect http://127.0.0.1:8993/PDFgServlet/"
"Error","ajp-nio-127.0.0.1-8020-exec-9","11/07/24","10:49:03","test_env","Connect to 127.0.0.1:8993 [/127.0.0.1] failed: Connection refused: connect http://127.0.0.1:8993/PDFgServlet/"
"Error","ajp-nio-127.0.0.1-8020-exec-9","11/07/24","10:49:03","test_env","Error occurred while generating PDF.Reason: Error occurred while handling request.
By @Sireex
The error shows we're now ready for the final sprint to the line. I say this because I think the cause of the error is that the port number 8993 is incorrect.
In a recent thread on PDF generation I showed a way to find the correct port programmatically. I shall repeat it here.
Save the following code as a CFM page and launch it:
<!--- 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 port 8996. Yours might be different.
Once you have the port number, implement it as follows:
Copy link to clipboard
Copied
If I tun this, I get nothing as service port. Then I checked with cfdump var="#cfhttpResult.Errordetail#",
and I get: Connect Exception: Connect to 127.0.0.1:9005 [/127.0.0.1] failed: Connection refused: connect
Other test server is returning
Copy link to clipboard
Copied
And lo and behold! When it try cfdocument in our wwwroot that doesn't use SSL, I get:
Using cfhtmltopdf still produces a server error.
Also, running PDF port code here produces Connect Exception: Connect to 127.0.0.1:9005 [/127.0.0.1] failed: Connection refused: connect
I have to say that I've never had this much problems with a single update, and I've been using CF since MX 7.
Copy link to clipboard
Copied
If I tun this, I get nothing as service port. Then I checked with cfdump var="#cfhttpResult.Errordetail#",
and I get: Connect Exception: Connect to 127.0.0.1:9005 [/127.0.0.1] failed: Connection refused: connect
By @Sireex
The Connection-Refused is not an issue. It is to be expected. The code should produce that when it cannot make a connection for any port in the range 8985 to 9005.
The relevant result is the fact that the code could not find any port. The question I now have is whether the PDF service was running at all. It does not normally require a certificate.
Let us rule something out: whether or not you can "verify" the PDF service.
Open the ColdFusion Administrator of the specific instance. Go to Data & Services > PDF Service.
From what you have said, you should see that the PDF Service Manager is registered with port 8993. Can you confirm this?
Next, press the button Verify All Service Managers. What happens? What is the Connection Status?
Copy link to clipboard
Copied
It's not running, before it was. And it can't be started:
"Error","http-nio-8500-exec-8","11/08/24","14:15:21","cfadmin","Error enabling PDF Service Manager."
"Error","http-nio-8500-exec-8","11/08/24","14:15:21","cfadmin","coldfusion.document.webkit.PDFgErrorHandler$ConnectionVerificationFailedException: Connection verification failed."
"Error","http-nio-8500-exec-16","11/08/24","14:15:25","cfadmin","Connect to 127.0.0.1:8993 [/127.0.0.1] failed: Connection refused: connect http://127.0.0.1:8993/PDFgServlet/verify"
Copy link to clipboard
Copied
I said, press the button Verify All Service Managers. I asked: What happens? What is the Connection Status?
Copy link to clipboard
Copied
Connection status is "Error", and manager can't be started.
Copy link to clipboard
Copied
Connection status is "Error", and manager can't be started.
By @Sireex
Thank you. That is important to know.
That is in fact the kind of feedback I am missing from you. Feedback such as "not working" and "I get an error" and "getting weird now" won't bring us closer to the solution. At this stage, what I consider the most important of my questions are those about the steps you do, and the result.
If so, were there any (available) packages there? If so, which packages?
If there were packages there, what happened when you clicked on each, then on Install ?
Copy link to clipboard
Copied
I understand. It can be frustrating to solve problems via forums when you can't see the problem yourself.
But I assure you that I followed every suggestion to the letter.
I did install add-on services, no errors there. I choose to install with default values it suggested.
And it seems to be running ok, when looking at Services.
When using cfpm.bat, it unistalled all the packages without errors.
Restarted CF at this point, no problems.
The only errors I got were during install all:
zip package cannot be installed by the server. Please check the server logs and try installing again.
ajax package cannot be installed by the server. Please check the server logs and try installing again.
Restarted Cf again after this, no problems.
In Package Manager, it shows that there are no packages to install.
Copy link to clipboard
Copied
Sirex, I think your only remaining problem is that the pdf service reports it can't be started, right? If so, try this one last step (mentioned by bkbk previously above, but the order of doing it is important).
On the pdf services page, edit your localhost service, but without any need of change, click the "update" button. Then try starting it. Then test your pdf.
And if your ORIGINAL problem remains, that's a different matter.
Copy link to clipboard
Copied
Ok, following that advice PDF service manager is now running and it's producing PDF pages, but the original problem still remains.
This is starting to feel like it is a cert problem. I can attach images and stylesheets from outside sources to our report, they work just fine. But as soon as I try to attach images and stylesheets from out faulty cert server, it won't show them.
I'll wait for a new cert and see if this fixes the problem.
Copy link to clipboard
Copied
@Sireex , thanks for the feedback. Appreciated.
Copy link to clipboard
Copied
@Sireex ,
In case you're still looking for a solution, here is a new line of enquiry for you. Follow these steps in order:
<cfscript>
// CF Admin login
adminObj = createObject("component","cfide.adminapi.administrator");
adminObj.login("your_cf_admin_password");
adminDocObj = createObject("component","cfide.adminapi.document");
writedump(var=adminDocObj.getallservicemanager(), label="All PDF Service Managers");
</cfscript>
Copy link to clipboard
Copied
Just to inform you that my last post crossed yours on the wire. 🙂
Copy link to clipboard
Copied
Hi @Sireex ,
Does the cfhtmltopdf code work now?
If not, could you please share the result of the Service Manager code.
Copy link to clipboard
Copied
Yes, cfhtmltopdf now works. After updating and starting it again in PDF service manager.
Copy link to clipboard
Copied
I am glad to hear the good news. Thanks for the update.
Copy link to clipboard
Copied
Talking about certificates, what URL did you use in the test code:
url="http://127.0.0.1:#port#"
or
url="https://127.0.0.1:#port#"
Copy link to clipboard
Copied
This happens on the problematic server when running install all:
zip package cannot be installed by the server. Please check the server logs and try installing again.
ajax package cannot be installed by the server. Please check the server logs and try installing again.
Other test server didn't produce any errors with install all
By @Sireex
This is not directly related to the cfhtmltopdf problem. Nevertheless, we're almost there.
Next, restart the ColdFusion instance.
Open the ColdFusion Administrator of the instance. Go to the Package Manager page. Click on Available Packages.
Do you see Ajax and Zip buttons there? If so, click on each, then on Install.