• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

New Here ,
Mar 19, 2021 Mar 19, 2021

Copy link to clipboard

Copied

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.

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2021 Mar 20, 2021

Copy link to clipboard

Copied

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)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 20, 2021 Mar 20, 2021

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 20, 2021 Mar 20, 2021

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 27, 2021 Dec 27, 2021

Copy link to clipboard

Copied

Any resolution to this?
I've also run the ColdFusion_2021_Addon_WWEJ_linux64.bin on my Zorin linux with successful messaging from the installer UI.
There's even this message in my coldfusion-out.log

"1029 Dec 27, 2021 18:23:17 PM Information [main] - Package pdf started... "

But I experience the same problem from the CF Admin page:

1063Dec 27, 2021 18:31:37 PM Error [http-nio-8500-exec-3] - Server Error
1064Dec 27, 2021 18:31:37 PM Error [http-nio-8500-exec-3] - Connection verification failed.  
1065Dec 27, 2021 18:31:37 PM Error [http-nio-8500-exec-3] - Error enabling PDF Service Manager.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 28, 2021 Dec 28, 2021

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 29, 2021 Dec 29, 2021

Copy link to clipboard

Copied

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?

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 29, 2021 Dec 29, 2021

Copy link to clipboard

Copied

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)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 30, 2021 Dec 30, 2021

Copy link to clipboard

Copied

Hey Charlie, always nice to hear from you 🙂

 

Aye, I spy both folders here:

The first one is probably from the original installation:

/opt/ColdFusion2021/cfusion/jetty

 

The second is probably from running ColdFusion_2021_Addon_WWEJ_linux64.bit (the cure recommended by doctor internet).

/opt/coldfusionaddonservices

 

Both start.ini versions have the same passeges you cited, verbatim:

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

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

I'm browsing this development environment by way of http://127.0.0.1:8500/  fwiw.

 

So, if both are trying to run, I suspect that would cause an issue. Netstat did not indicate that either was listening there. So I guess nobody won that battle.

 

Onto the logs. They are attached.

2021_12_28.stderrout.log is from coldfusionaddonservices

2021_12_30.stderrout.log is from /cfusion/jetty

Both contain the Started ServerConnector message, but are soon followed by

ConcurrentModificationException and ServletException messages.

 

I suspect this will not be fixed this year 😉
Al

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 30, 2021 Dec 30, 2021

Copy link to clipboard

Copied

Al, so about the errors in both, those are happening when the CF admin is doing the "verify" of its ability to reach the it. So that's a sign at least that it's GETTING THROUGH. (And I'd think that must mean that at the moment it DID get teh verify, the port it was litening on MUST have been open, but that's just a guess. Perhaps it "crashed" on serving the first request.)

 

The question now is why is it getting the error. In the logs folder (for either), is there any more info on those (different) days?

 

Also, since you mention accessing the CF Admin using http://127.0.0.1:8500/, what happens when you request http://127.0.0.1:8993/? As you may know, that SHOULD show a UI that offers a link to both the PDFG and the Solr services, within that addon (or jetty) implementation. (While clicking the PDFG link will do nothing, the solr one presents a very uesful UI that many never realize exists to manage it.) But for now, what does the URL show? and what IF you click that pdfg link?

 

Of course, if a netstat shows the port not listened on, the URL should fail right away. But how about trying it BEFORE you may goto the CF Admin to try the verify?

 

And CF may even be doing that verify automatically, at startup of CF. So consider stopping CF and THEN starting the cfjetty (either one), while it's down. Can you reach that url above THEN?

 

BTW, I hadn't planned to propose you try the 8993 URL, since this is on Linux and most people would complain "it's headless and I have no browser". There are of course ways to do that, like port forwarding. And it may or may not be important to make the call FROM a browser on the machine with CF, since that would use the same resolution of whatever name you may use (like localhost, if you did that, or a domain name), as CF would when IT called the service using that. Just something to keep in mind. For the simple test of the 8993, don't worry if you are port forwarding from some other machine.

 

If you are not, is it that this is a VM? and you're accessing the URL from a host, such that ports in the VM are exposed to the host (as it the case with WSL on Windows, also)? In that case, you are of course making the request "from the same machine as CF", at least in a sense. Again, just something to keep in mind as we may be contemplating all this, in doing various diagnostics.


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 31, 2021 Dec 31, 2021

Copy link to clipboard

Copied

Hi @AlHolden ,

I too am curious to know what the result is of a GET request to http://127.0.0.1:8993.

Could you also share a printscreen of the PDF Service page from the ColdFusion Administrator. The reason for this request is to verify whether your settings are:

Name: localhost
Host Name: 127.0.0.1
Port: 8993
Weight: 2
Https Enabled: NO
Connection Status:.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 31, 2021 Dec 31, 2021

Copy link to clipboard

Copied

@AlHolden , your log files indicate to me that you have to submit a bug report.

 

The logs show a ServletException

 

2021-12-27 18:23:38.605:WARN:oejs.HttpChannel:qtp1307904972-15: /PDFgServlet/
javax.servlet.ServletException: javax.servlet.ServletException: PDFgServlet@9ac5bab0==coldfusion.pdf.service.remote.PDFGServlet,jsp=null,order=-1,inst=true,async=false

 

caused by

 

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

 

This suggests that, in the underlying Java code, there is an attempt to modify an ArrayList while it is being read. Most probably an attempt that fails to make use of, or proper use of, an Iterator. Which would make this a bug.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 31, 2021 Dec 31, 2021

Copy link to clipboard

Copied

In your bug report, please refer to this forum page.

Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 31, 2021 Dec 31, 2021

Copy link to clipboard

Copied

Something else we haven't yet touched on, which is worth a try: upgrading the Java engine that ColdFusion 2021 runs on to the most recent supported version, JDK 11.0.13

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 09, 2022 Feb 09, 2022

Copy link to clipboard

Copied

@BKBKcan you do me a favor and check this bug first (before I file my own) in reference to the things you noted in my logs posted here?

I suspect that mine would then be a duplicate.

https://tracker.adobe.com/#/view/CF-4212668

Thanks,

Al

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 10, 2022 Feb 10, 2022

Copy link to clipboard

Copied

That's true, @AlHolden . I have checked. The circumstances are more or less the same. If you filed a bug, it would probably be a duplicate. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 09, 2022 Feb 09, 2022

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 29, 2022 Aug 29, 2022

Copy link to clipboard

Copied

LATEST

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.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation