133
Views
3
Comments
[Ultimate PDF] Intermittent error - Unable to connect remote server
ultimate-pdf
Reactive icon
Forge asset by Leonardo Fernandes
Application Type
Reactive

Getting intermittent error while generating the PDF Via Ultimate PDF plugin.

An error occurred while generating the pdf for https://XXXXXXXXXXX URL : Unable to connect to the remote server


at ssUltimatePDF.Actions.ActionPrintPDF_Proxy(HeContext heContext, String inParamURL, String inParamTemporaryFolder, String inParamProduct, String inParamRevision, RCViewportRecord inParamViewport, RCPaperRecord inParamPaper, Byte[]& outParamPDF)
at ssUltimatePDF.Actions.ActionPrintToPDF_Advanced(HeContext heContext, String inParamURL, String inParamPaperSize, String inParamMarginSize, Byte[]& outParamPDF)

The call is failing at PrintPDF_Service  of  PrintPDF_Proxy Action .

The modules are deployed in 2 different server.



2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

Hi Sabeeb. Is this the only error log that you have? If you can find another error log, please send those as well.

If it's the only error log, it may indicate that a service action call did not succeed. My understanding is that your deployment zone needs to be configured with the address of your load balancer, and all your front-ends need to resolve that address. Check these documentation pages:

https://success.outsystems.com/Documentation/11/Managing_the_Applications_Lifecycle/Deploy_Applications/Selective_Deployment_Using_Deployment_Zones/Deployment_Zones_Reference

https://success.outsystems.com/Documentation/11/Managing_the_Applications_Lifecycle/Deploy_Applications/Selective_Deployment_Using_Deployment_Zones/Recommended_Network_Architecture


Comparing the Server on the error log (i.e. the front-end server that received the error) and the URL it was trying to connect to might give you some clues to understand why it's happening.

UserImage.jpg
Sabeeb Anengadan

Hi Leo ,

Both modules are deployed in the Front end Servers and the URLs referred only via load balancer URL. 

The issue is intermittent.

Any issue with the 

UserURLToAbsoluteURL(URL) in PrintPDFProxy call ?

Initial Logs......

An error occurred while generating the pdf

Environment Information

 CompiledWith=11.10.7.060000

RequestUrl: https://XXX-LoadbalacnerURLXXXXXXX/DownloadFormsServices/GateCheck.aspx?GateCheckFormId=27 (Method: GET)

AppDomain: /DownloadFormsServices-12-132870158606886553

FilePath: D:\OutSystems\Platform Server\running\DownloadFormsServices.1825025538\DownloadGateCheck_PDF.aspx

Locale: en-US

DateFormat: yyyy-MM-dd

TID: 67

Thread Name:

.NET: 4.0.30319.42000

Stack

An error occurred while generating the pdf

   at ssUltimatePDF.Actions.ActionPrintToPDF_Advanced(HeContext heContext, String inParamURL, String inParamPaperSize, String inParamMarginSize, Byte[]& outParamPDF)

   at ssUltimatePDF.Actions.ActionPrintToPDF(HeContext heContext, String inParamURL, Byte[]& outParamPDF)

   at ssDownloadFormsServices.RsseSpaceUltimatePDF.MssPrintToPDF(HeContext heContext, String inParamURL, Byte[]& outParamPDF)

   at ssDownloadFormsServices.Flows.FlowMainFlow.ScrnDownloadGateCheck_PDF.Preparation(HeContext heContext)

   at ssDownloadFormsServices.Flows.FlowMainFlow.ScrnDownloadGateCheck_PDF.Page_Load(Object sender, EventArgs e)

   at System.Web.UI.Control.OnLoad(EventArgs e)

   at System.Web.UI.Control.LoadRecursive()


   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

Hi Sabeeb.

This is ultimately a network issue, so let's approach it as such.


1. You gave us evidence that the error happens in a request under the hostname XXX-LoadbalacnerURLXXXXXXX. However, more important than that is the front-end server that executed the request. You can find this information in the Server field, above the stack trace:


2. You may try to find some pattern common to all occurrences, for example if all of the errors happen in the same front-end server that might indicate there's a configuration problem related to that front-end server.


3. Find what was the URL that the server was trying to reach. You will find that in the same error message, but be aware that there's an internal error message that includes the URL, and another user-facing error message that doesn't include the URL. The one that includes the URL will be something like the first error you posted: "An error occurred while generating the pdf for https://XXXXXXXXXXX URL"


4. Check if the front-end server has connectivity to that URL. You can use NetChecker to execute telnet commands and see if the connection works. Make sure you attempt the telnet command a few times to increase the probability of it being executed in all front-end servers.


5. You seem to be using an older version of Ultimate PDF, and in that case it may be worth trying the latest version. The way URLs are resolved was changed on version 5.1.0.


Hope this helps you find the problem. If not, please come back with some more details.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.