Error DynamicPdf.HtmlConverter.NET v1.3.0

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Converter for .NET (v3)  /  Error DynamicPdf.HtmlConverter.NET v1.3.0

DynamicPDF Converter for .NET (v3) Forum

I am has error to  converter html to pdf:

Conversion failed. Refer inner exception for details.
 at ceTe.DynamicPDF.Conversion.DevTools.RuntimeCLI.Chrome.<CreateNewSession>d__6.MoveNext()<---
sending the request. ---> System.Net.Http.CurlException: Couldn't connect to server
   at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error)
   at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult)
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at System.Net.Http.HttpClient.<FinishSendAsyncUnbuffered>d__59.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at System.Net.Http.HttpClient.<GetStringAsyncCore>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at ceTe.DynamicPDF.Conversion.DevTools.RuntimeCLI.Chrome.<CreateNewSession>d__6.MoveNext()
   --- End of inner exception stack trace ---
   at ceTe.DynamicPDF.HtmlConverter.Converter.l.MoveNext()
---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.CurlException: Couldn't connect to server
   at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error)
   at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult)
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at System.Net.Http.HttpClient.<FinishSendAsyncUnbuffered>d__59.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at System.Net.Http.HttpClient.<GetStringAsyncCore>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at ceTe.DynamicPDF.Conversion.DevTools.RuntimeCLI.Chrome.<CreateNewSession>d__6.MoveNext()<---



.Net Core 2.2;
Host: Openshift -container Linux
Posted by a ceTe Software moderator
Hello,

HtmlConverter uses Chromium to do the conversions, do you have chromium installed in your Linux machine? Also, you will have to set the chromium path using the ChromiumProcessPath property of the Converter. And please try setting a temp directory to avoid any file access issues. Below is the sample code for this.

Converter.ChromiumProcessPath = @"/home/hc/chrome";
Converter.TemporaryDirectory = @"/home/hc/tmp/";

Please run the chromium with the no-sandbox and disable-gpu tags. Here are the docker commands:
    RUN echo '#!/bin/bash' > chrome
    RUN echo 'chromium --no-sandbox --disable-gpu $@' >> chrome
    RUN chmod +x chrome

We are continuing to look into this. We'll post an update once we have more information.

Thanks,
ceTe Software Support Team.
There is another way to fix this problem?
In my environment openshift blocks to run chrome


All times are US Eastern Standard time. The time now is 12:41 PM.