http://coldfusion.com logo
m

mike42780

05/02/2022, 5:05 PM
I have a local ACF 2021 environment setup locally on Windows 10 using Commandbox (not with docker). I need to do some PDF creation work, so I've been looking into the Coldfusion addons to get the PDF Service running and use cfhtmltopdf. My first choice was to use the docker version of the coldfusion addons so I could just turn it on when needed. I got it running on port 8993. I go into the coldfusion administrator and find the PDF service. I verified the connection, and then started it. Everything works great. I can go to http://127.0.0.1:8993 in the browser and see that the PDFgServlet is started. However when I try to create a PDF I get this error: "Error occurred while generating PDF. Reason: BAD REQUEST". I know the code works because I push it up to our Dev server and it runs fine. Any ideas why it appears to be running fine, but then won't create the PDF?
Here's my basic docker compose file
Copy code
version: '1'

services:  
  addons:
    container_name: addons
    image: adobecoldfusion/coldfusionaddons:latest
    environment:
      - acceptEULA=YES
    ports:
      - "8993:8993"
    networks:
      local:

networks:
  local:
    driver: bridge
j

Josh

05/02/2022, 9:15 PM
What do you get from the container logs. Docker-compose should be dumping logs to stdout.
b

bdw429s

05/03/2022, 12:21 AM
@mike42780 You will need to run the actual PDf services in a separate container or server and point ColdFusion to them
m

mike42780

05/03/2022, 1:27 AM
@bdw429s Sorry. Guess I'm slightly confused. Does docker not fulfill this in some way? Or could be tweaked to do that? When I run box it's not in docker either, but don't think it matters. Separately, I have the Coldfusion addons installed on our DEV server. I've tried pointing to this in the past, but don't think it worked. Maybe it's not setup for remote connections. I'd have to review that. Or maybe it was a firewall issue. And lastly, I have installed the actual Coldfusion addons installer on my local machine. I made sure the service was on, but I can't get it to connect in the CF admin (from the box instance). Somehow I got this working a few months back, but just revisited it and it's broken again.
b

bdw429s

05/03/2022, 1:28 AM
Does docker not fulfill this in some way
No
When I run box it's not in docker either, but don't think it matters.
Nope
Maybe it's not setup for remote connections.
That would be a requirement
Or maybe it was a firewall issue.
Could be. Only you can answer that
I can't get it to connect in the CF admin
How are you trying and what happens when you do it? Errors? Logs?
m

mike42780

05/03/2022, 1:33 AM
Ok. I turned off docker and I switch back to the standard coldfusion addons install. I turned the service back on. I go into CF Admin and try to validate or start it and it says "Error enabling PDF Service Manager. Check logs for more details". I see 2 recent logs under \ColdFusionAdd-onServices\logs. Nothing interesting.. I can still go to http://127.0.0.1:8993 and see that the PDF service is running
b

bdw429s

05/03/2022, 1:34 AM
It means the CF logs, not the addd on service logs
m

mike42780

05/03/2022, 1:34 AM
I was getting further with the docker instance I could at least validate and start the PDF service. The docker logs weren't interesting either
Ok. I didn't see much there either. but maybe looking at the wrong ones
"coldfusion.document.webkit.PDFgErrorHandler$ConnectionVerificationFailedException: Connection verification failed."
b

bdw429s

05/03/2022, 1:35 AM
Possibly. These errors are also difficult to troubleshoot due to terrible error handling in CF code that establishes the connections
m

mike42780

05/03/2022, 1:35 AM
Error enabling PDF Service Manager.
in the application log
b

bdw429s

05/03/2022, 1:36 AM
Copy code
Connection verification failed
This sounds like an issue with the private key file
Which is the most common error outside of connection errors
m

mike42780

05/03/2022, 1:37 AM
something with jetty?
b

bdw429s

05/03/2022, 1:37 AM
Not really
ColdFusion has a private key stored in the cfusion/lib folder in a file called
.prikey
When that doesn't match the key used in the PDF services, then you get that error
A good thing to check would be if you have the latest version of the add-on installer installed for the PDF services and the latest version of Coldfusion installed
m

mike42780

05/03/2022, 1:38 AM
i'm checking the coldfusion addons install. don't see any failures
b

bdw429s

05/03/2022, 1:38 AM
It's not the one that fails
CF itself refuses to connect to the PDF service because it's requests aren't encrypted properly
m

mike42780

05/03/2022, 1:39 AM
hmm. i just downloaded the addons installer from adobe's website today. I'm running ACF 2021.0.3 in box.
i'm on the latest version of box as well. just verified today
b

bdw429s

05/03/2022, 1:40 AM
Then I'd reach out to Adobe's support and ask them to help you troubleshoot it
Are you using a CommandBox server or a standard Tomcat-based CF install?
m

mike42780

05/03/2022, 1:41 AM
i setup Adobe coldfusion through commandbox locally for development work
have a dev and prod server that use the standard Adobe install. those work fine with the addon service
b

bdw429s

05/03/2022, 1:43 AM
A lot of people have an issue where it doesn't work until they update the .prikey file
unzip that and replace the .prikey file in the cfusion/lib folder inside your server home. Then restart the CF server
m

mike42780

05/03/2022, 1:47 AM
did that. same error. nothing changed unfortunately
b

bdw429s

05/03/2022, 1:48 AM
Hmm, that usually works for most people. Time to reach out to Adobe then
m

mike42780

05/03/2022, 1:48 AM
just restarted coldfusion addon service just in case too
b

bdw429s

05/03/2022, 1:48 AM
They made this issue practically impossible to debug, they can help you debug it 🙂
m

mike42780

05/03/2022, 1:48 AM
is there a best way to contact?
b

bdw429s

05/03/2022, 1:49 AM
Yes, you say @priyank_adobe’s name three times and he tells you the current spelling of the obfuscated E-mail address for installation support :)
m

mike42780

05/03/2022, 1:49 AM
Thanks Brad for helping me debug..
👍 1
m

Mark Takata (Adobe)

05/03/2022, 3:36 PM
Hi Mike. Please email cfsup@adobe.com and cc myself at takata@adobe.com. Adding @Aditya Nema here for visibility, this complexity will need to be addressed, I ran into the same thing when I was playing with PDFs two weeks ago.
👍 1
m

mike42780

05/03/2022, 3:51 PM
Thanks!
❤️ 1
m

Mark Takata (Adobe)

05/03/2022, 4:00 PM
Sure thing Mike! We're definitely pushing more into the Docker space, and the PDF service is also something we've had our eye on internally, trying to determine where improvements can be had in developer experience. If you have thoughts & ideas on this, or just want to share you & your company's use case for PDF generation & related document service usage, please feel free to email Aditya at anema@adobe.com. He is our Product Manager and loves to hear about how customers are specifically leveraging our tools & product features and where and how the community see opportunities for improvement, especially in ease of use, developer experience and functionality.
👍 1
m

mike42780

05/09/2022, 6:43 PM
As a final follow up Vikram Kumar from Adobe reached out to me and we were debugging this issue. After the PDF service failed to work all last week in our testing, it just randomly decided to work today. This is with the lastest Commandbox and the CF Addons installed locally on my computer. The best we can tell is with commandbox you might have to restart the CF addons service and then restart commandbox for it to register properly. Although I believe I did this last week and it didn't work. Every time I reboot this would be happening too, in theory. Vikram believes it works with the standard CF install w/o this issue, so maybe commandbox loses the connection somehow. Nothing too concrete here, and no additional logs to report that helped resolve anything. But somehow it's working today and hoping it lasts! Vikram also tried to run the docker CF addons and wasn't able to get that working either with commandbox's instance of CF.
b

bdw429s

05/09/2022, 6:51 PM
so maybe commandbox loses the connection somehow
Just to to be clear, CommandBox does not create nor maintain the Connections from ACF to the PDF service. CommandBox is just there to deploy the CF WAR, and any external socket connections made by ACF to an external service is entirely managed by ACF.
m

mike42780

05/09/2022, 7:16 PM
Yeah. i understand. In my debugging I mentioned Commandbox just basically installs ACF. I didn't think it did much past that in terms of altering any of CF's behavior. Vikram was very nice, but he didn't seem to have a definitive answer on why the PDF service wasn't working. Or just started to work randomly. And Adobe doesn't seem to be too knowledgeable about Commandbox, and the PDF service is hard to debug. Not a great combination. Surprised this issue doesn't come up more, unless no one is creating PDFs with Coldfusion.
b

bdw429s

05/09/2022, 7:17 PM
People create PDFs in CF, but more people use CFDocument, which is a native solution inside the JVM
The PDF service is only needed for the cfhtmltopdf tag, which isn't as common from what I've seen
doesn't seem to be too knowledgeable about Commandbox
Honestly, they shouldn't need to be. Saying you used CommandBox may as well be the same thing as telling them you've deployed ACF as a WAR on <servlet container of choice>. They should be able to troubleshoot ACF's connection to a PDF service regardless of the servlet that happened to deploy the WAR
m

mike42780

05/09/2022, 7:22 PM
Ok. I used to use that tag, but the cfhtmltopdf tag seemed to have more options and was slightly newer/better in terms of html support. But setting it up locally has been quite a challenge compared to the server. They need better debugging from what I've seen.
b

bdw429s

05/09/2022, 7:22 PM
Basically, their error handling around the PDf service connection is poor
It discards the useful exceptions and doesn't really tell you what the issue is
Also, they have zero docs around how the PDF service is connected and authenticated to, so you basically are set up to lose if it doesn't "just work"
m

mike42780

05/09/2022, 7:24 PM
Yeah, all good points. hopefully they can improve it for a future release. thanks again..
m

Mark Takata (Adobe)

05/09/2022, 8:46 PM
We're actively looking at setup and debugging issues with the PDF Service & HTMLtoPDF as we speak. Adding @Aditya Nema here for visibility.
👍 3
c

Cavan Vannice

05/26/2022, 8:22 PM
@Mark Takata (Adobe) @priyank_adobe @Aditya Nema I am having the same issue in a commandbox docker enviroment. Have you made any progress?
m

mike42780

05/26/2022, 8:53 PM
I was running Commandbox with a normal install. And then was trying to run Adobe Coldfusion Addons through docker. The only thing that kind of worked was going into the /start.ini file and changing the jetty.http.host to your local ip address. And then going into the CF Administrator and putting that IP address in.
I was only able to get Docker CFaddons working with a fresh instance of coldfusion, not my normal commandbox instance with a server.json configured. So not great. I eventually went back to the reguarl CF Addons install which tends to work a little better for me. I might have to restart a service here and then if it somehow loses the connection.
2 Views