Not Getting Pdf on Azure Server
-
I'm creating pdf locally, I don't get an error. I'm getting several pdfs on Azure server then I can't get pdf. Stuck on creating pdf. Then it fails to create any pdf.
-
Please elaborate more...
Could you describe your deployment? Provide jsreport server logs?
-
I am using AKS.
Error:<html> <head> <title>504 Gateway Time-out</title> </head> <body> <center> <h1>504 Gateway Time-out</h1> </center> <hr> <center>Microsoft-Azure-Application-Gateway/v2</center> </body> </html>
How do i fix this error?
-
and log error message :
Error rendering report: Error: socket hang up at connResetException (internal/errors.js:604:14) at Socket.socketOnEnd (_http_client.js:460:23) at Socket.emit (events.js:323:22) at endReadableNT (_stream_readable.js:1204:12) at processTicksAndRejections (internal/process/task_queues.js:84:21)Error: at connResetException (internal/errors.js:604:14) at Socket.socketOnEnd (_http_client.js:460:23) at Socket.emit (events.js:323:22) at endReadableNT (_stream_readable.js:1204:12) at processTicksAndRejections (internal/process/task_queues.js:84:21)
-
Please paste the full jsreport stdout output or content of the
logs/reporter.log
.
-
Actually I don't have a problem getting 1 page and 3 page pdf in azure. I have a problem when I want to get a 12 page pdf. I tried to get the logs of this 12 page Pdfi using DebugLogsToResponse(). I encountered this error that I mentioned first.
<html> <head> <title>504 Gateway Time-out</title> </head> <body> <center> <h1>504 Gateway Time-out</h1> </center> <hr>
When I remove DebugLogsToResponse() and write only pdf creations in try catch, I get the error in catch.
Error rendering report: Error: socket hang up at connResetException (internal/errors.js:604:14) at Socket.socketOnEnd (_http_client.js:460:23) at Socket.emit (events.js:323:22) at endReadableNT (_stream_readable.js:1204:12) at processTicksAndRejections (internal/process/task_queues.js:84:21)Error: at connResetException (internal/errors.js:604:14) at Socket.socketOnEnd (_http_client.js:460:23) at Socket.emit (events.js:323:22) at endReadableNT (_stream_readable.js:1204:12) at processTicksAndRejections (internal/process/task_queues.js:84:21)This is how I add the jsreport to the service. What should I do to get a report in the form of logs/reporter.log?
services.AddJsReport( new LocalReporting().UseBinary(jsreport.Binary.Linux.JsReportBinary.GetBinary()).Configure(cfg => { cfg.Chrome = new ChromeConfiguration() { Timeout = 1200000 }; cfg.TemplatingEngines = new TemplatingEnginesConfiguration() { Timeout = 1200000 }; cfg.Extensions = new ExtensionsConfiguration() { Phantom = new PhantomConfiguration() { Timeout = 1200000 }, Express = new ExpressConfiguration { InputRequestLimit = "500mb" }, Scripts = new ScriptsConfiguration() { Timeout = 1200000 }, }; cfg.EnableRequestReportTimeout = true; cfg.Logger = new LoggerConfiguration() { Transport = new LoggerTransportConfiguration() { Transport = "console", Level = "debug" } }; cfg.AllowedLocalFilesAccess(); cfg.FileSystemStore().BaseUrlAsWorkingDirectory(); return cfg; }).KillRunningJsReportProcesses().AsUtility().Create());
-
Hm, maybe you get out of resources?
When using AKS, did you consider running jsreport in extra POD? That is typically much better approach than embedding it directly to your app.