Skip to main content
StargateMS
Inspiring
March 20, 2021
Question

Cannot start PDF Service Manager on Ubuntu ("connection refused")

  • March 20, 2021
  • 3 replies
  • 3529 views

Our company is in the process of setting up a new ColdFusion 2021 server for one of our customers. A feature they would like to use requires the PDF Service Manager. It seemed to install okay using the new Package Manager, but we're unable to start or verify the service. We simply get:

 

Error enabling PDF Service Manager.
Check logs for more details.

 

Checking the logs reveals:

 

application.log: Error enabling PDF Service Manager

 

server.log: Connect to 127.0.0.1:8993 [/127.0.0.1] failed: Connection refused (Connection refused) http://127.0.0.1:8993/PDFgServlet/verify

 

One would expect this to "just work," so we're at a loss as to what else we need to do. It's an Ubuntu 20.04.2 LTS Linux server.

    This topic has been closed for replies.

    3 replies

    AlHolden
    Inspiring
    February 9, 2022

    Looping back to this issue, I see that I neglected to mention what happens in a GET request to http://127.0.0.1:8993

    Nothing happens. The browser notes that nothing is there to connect to.

     

    I will try to file a bug as you suggest. I'm reluctant to change the Java engine, as I do not want to shuffle a bunch of variables while the cause is still unknown. Let's see what quick response comes first.

    Participant
    August 29, 2022

    Hi

    I had the same problem and never i get to make work CF in any debian based distro, but it worked in Centos 7 or AlmaLinux (Cento's fork)

    Is related to some issue with the operating system fonts for PDF service.

    I checked this post here:

    And gave me a hint about it.

    https://helpx.adobe.com/coldfusion/pdf-generation-in-coldfusion.html

    Despite that your post is related to CF 2021, i had the exactly the same issue , the one with the error 

    2021-12-27 18:23:38.600:WARN:oejshC.PDFgServlet:qtp1307904972-15: unavailable
    java.util.ConcurrentModificationException

     in CF 2018.

    Weird thing is that with the CF installer, the binary, it installed and started correctly the embebbed PDF service, but after the first CF service restart, the PDF service stopped working, so i had to download the PDF addon and make it work for Centos as the instructions of the URL that is send you before.

     

    If you need further help i can send you some notes.

     

    BKBK
    Community Expert
    Community Expert
    December 28, 2021

    Was the port 8993 available before you installed the PDF service? Verify that. For example, by uninstalling the PDF service, checking if port 8993 is free, then reinstalling the PDF service.

     

    Let's suppose you continue to get the same error. Then you could try the following (to find the appropriate port):

     

    1.  Open the ColdFusion Administrator.
    2.  Go to the page Data & Services > PDF Service.
    3.  In the section "PDF Service Managers", you should see a PDF service manager registered.
           Press the button "Verify all Service Managers". The expectation is that you should get a "Connection Status" of "OK". If you get "Error", then you should experiment by successively decreasing the port number by 1. You can do so as follows.
    4. Click on the edit button under "Actions". The details of the PDF service manager should appear in the user-interface, including the port value 8993. Change the port number to 8992 and press the button to update the PDF service manager.
    5.  Press the button "Verify all Service Managers". If you still get "Error", then click on the edit button, change the port to 8991, and press the button to update the PDF service manager once again.
    6.  If necessary continue in turn with ports 8990, 8989, 8988, 8987, and so on.
    7. Hopefully, one of the ports should verify as "OK". If so, restart ColdFusion.

    Does that solve the problem?

    AlHolden
    Inspiring
    December 29, 2021

    Thanks for the fast response, but no - the problem is not solved. 😞

    The Firewall on my Linux system is disabled, and I ran netstat to see that the port range surrounding 8993 was not already LISTENING or ESTABLISHED with another process.

    Per your suggestion, I also reconfigured the existing PDF Service to use ports 8992, 8991 and so on (also 8501, 8600 and 8900 for fun). Each configuration logged the same errors:

    application.log

    coldfusion.document.webkit.PDFgErrorHandler$ConnectionVerificationFailedException: Connection verification failed.

    Error enabling PDF Service Manager.

    coldfusion-out.log

    Information [main] - Package htmltopdf started... 

    Information [main] - Package pdf started...

    Error [http-nio-8500-exec-5] - Connect to 127.0.0.1:<port> [/127.0.0.1] failed: Connection refused (Connection refused) http://127.0.0.1:<port>/PDFgServlet/verify  

    Error [http-nio-8500-exec-2] - Connect to 127.0.0.1:<port> [/127.0.0.1] failed: Connection refused (Connection refused) http://127.0.0.1:<port>/PDFgServlet/  

    Error [http-nio-8500-exec-2] - Connection verification failed.

    Error [http-nio-8500-exec-5] - Error enabling PDF Service Manager.

     

    I will continue to entertain the "blocked port" theory, but I also suspect that the error may be presumptive or misleading: ie that the connection is actually refused because one of these daemons or services is lacking suffecient permissions on some resource or user?

     

    Charlie Arehart
    Community Expert
    Community Expert
    December 30, 2021

    Al, this COULD be a firewall issue, sure.

     

    But let's turn our attention also to how the pdfg (or "addon") service is configured, regarding IPs and ports. There may well be a config issue THERE which is blocking your attempt to access it. (And this could apply to the other folks much earlier in the thread.)

     

    1) A first step is to find whether the addon/pdfg service is installed and running from within the CF folder (/opt/ColdFusion2021/cfusion/jetty) or in its own folder (/opt/coldfusionaddonservices , with no jetty but which has the same files/folders the cfusion/jetty would have).

     

    I realize you said you used the add-on services installer, but whoever installed CF ALSO was given the option to install this pdfg/addon service, and that would implement it in that CF jetty folder. (And yes, one could HAVE BOTH INSTALLED, and even both running if they are set to use different ports.)

     

    Since you're not clear about how things are working, it just seems worth you checking for both. If you HAVE no jetty folder under cfusion, then you or whoever installed CF did NOT accept the option when offered in the CF installer.

     

    2a) Anyway, whichever you have (or both), look at the start.ini in that folder. And look for a line like this:

     

    ## Connector host/address to bind to
    #jetty.http.host=0.0.0.0

     

    That second line may or may not be commented, and it may have a different IP address. What does yours have? (My observation has been--at least with CF2021 and the version of jetty that it includes--that if it is like the above, it defaults to that 0.0.0.0 value).

     

    And this stuff can get confusing (and it's late for me), but I'm pretty sure this is what IP address this pdfg/jetty service is willing to LISTEN ON--meaning that when a request makes a call INTO it, like the "localhost" you may have set in the CF admin pdf service definition (or  you may perhaps use some machine name or domain name instead), what IP does THAT resolve to, and is it willing to accept/listen on that?

     

    More specifically, if for instance you see the ip (as indicated that ini file host value) as something like 192.168.1.19, then it means it's only willing to accept a request (from CF, via that PDF service configruation in the CF Admin) which asks for THAT ip address. Any other would be rejected, like you saw in the CF log.

     

    Again, that's my understanding, but I could be wrong. At least let's hear what your value is, and we can go from there. Perhaps others will have more info to share.

     

    Note also that there could be matters of ipv4 vs ipv6 that also can cause confusion.

     

    2b) Moving on, the next line in the ini file will show something like:

     

    ## Connector port to listen on
    jetty.http.port=8993

     

     

    That of course is the port on which it listens. What does yours have? Of course, you'd want to tell the CF pdf service to talk to this pdfg/addon service using that port.

     

    And again, it would be best to check both the [CF]/cfusion/jetty and the addonservices folders, in case somehow you may have both running.

     

    3) As another sanity check, look in each folder's logs folder (like /opt/coldfusionaddonservices/logs, or /opt/ColdFusion2021/cfusion/jetty/logs). You should find a log for today (assuming the service was started today) with both its date modified and literally its name showing today's date. (If there are none, then it would seem this instance is NOT the one to be paying attention to. Look at the other.)

     

    In the current day's stderrour.log (like /opt/ColdFusion2021/cfusion/jetty/logs/2021_12_30.stderrout.log), look about 20 lines down for a line like this:

     

    Started ServerConnector@27ec9117{HTTP/1.1, (http/1.1)}{0.0.0.0:8993}

     

     

    What do you show for those last two values? Those SHOULD match what's set in the start.ini values above. And in my case, when it showed that host line commented out, the 0.0.0.0 is indeed what I had in the log entry. And the port matched.

     

    Let's hear what you have, and perhaps it can help move the ball down the field. I'm open to correction, of course, if I have something wrong in my interpretation of things.

    /Charlie (troubleshooter, carehart. org)
    Charlie Arehart
    Community Expert
    Community Expert
    March 20, 2021

    There is a solution for you, and I'm sensing how you got where you are. 

     

    Did you use the zip install option, new in cf2021? If so, note that it does not install related services like the PDF service.

     

    And yes, I see you say you used the package manager (also new in cf2021) to "install it". That only installs into cf the support in cf for calling upon that feature, not the feature itself. (The zip install is very minimal, by design. No packages, no services, etc.) It's understandably confusing, depending on one's perspective. 

     

    Bottom line: you need to get the add-on service linux installer separately. It has long existed separately, as an option for those who might install it on a machine separate from cf. In your case, if you used that zip approach, you need it as an adjunct to that.

     

    And it's offered at:

     

    https://www.adobe.com/support/coldfusion/downloads.html

     

    There are various aspects of the docs and blog that for cf do explain all this, but one could easily fail to come across them, and they could often explain things better. 

     

    Again, a lot of the challenge is in the drive to push the zip installer. It's great for some needs, but many folks would do better just to use the traditional full installer. Both are offered (for each supported os) when downloading cf. It's bigger, but more feature complete and self-contained. 

     

    If you remain stuck and "just want it set up to work  correctly", I can help via consulting. See my signature. 

     

     

    /Charlie (troubleshooter, carehart. org)
    StargateMS
    Inspiring
    March 20, 2021

    Thanks, Charlie. Another staff member did the install, but it's likely he used the ZIP installer. It's a headless server, so there's less opportunity for a GUI install.

     

    Indeed, my expectation was that the PDF Service Manager was going to be installed with the "htmltopdf" package per its description:

     

    "The htmltopdf package helps you create PDF output from a text block containing CFML and HTML using the PDF Service Manager"

     

    It's abiguous whether the PDF Service Manager is or isn't installed with the package, but one could easily assume that it is per the expected convenience of the new Package Manager. My suggestion to Adobe would be to revise the description and error messages to note that PDF Service Manager is a separate install, which would avoid further confusion. I imagine there are other situations like ours where the person who does the installation is not necessarily the same person who uses ColdFusion Administrator.

     

    Thanks, again. We'll try that out and respond back if/once we get it working.

    StargateMS
    Inspiring
    March 20, 2021

    So far not working. Downloaded and ran the "ColdFusion_2021_Addon_WWEJ_linux64.bin" installer, restarted ColdFusion and then attempted to start the PDF Service. Got these errors:

     

    coldfusion-out.log:

    Mar 20, 2021 11:00:58 AM Error [http-nio-8500-exec-7] - Server Error
    Mar 20, 2021 11:00:58 AM Error [http-nio-8500-exec-7] - Connection verification failed. http://127.0.0.1:8993/PDFgServlet/verify
    Mar 20, 2021 11:00:58 AM Error [http-nio-8500-exec-7] - Error enabling PDF Service Manager.
    Mar 20, 2021 11:00:58 AM Error [http-nio-8500-exec-7] - coldfusion.document.webkit.PDFgErrorHandler$ConnectionVerificationFailedException: Connection verification failed.