Jump to content

Recommended Posts

Posted

After trying the steps stated in Link

In my local Environment

Java 8 , Jasper 8, Windows 11

Now I can export a dashboard report using Screenshot -> PDF.

 

But in remote environment (uses docker), it failed with Timeout exception.
In Js.config.properties, chromium path is set

chrome.path=/usr/lib64/chromium-browser/chromium-browser.sh

and I try increasing timeout (chrome.page.timeout) but I does not fix the issue.

and I also tried the solutions suggested here but no success.

Here are the logs
 

2023-05-16T14:39:24,685 ERROR BaseDashboardRenderer,pool-23-thread-1:82 - Error rendering dashboard net.sf.jasperreports.engine.JRRuntimeException: java.util.concurrent.TimeoutException    at net.sf.jasperreports.chrome.BrowserService.lambda$evaluateInPage$1(BrowserService.java:149)    at net.sf.jasperreports.chrome.IsolatedPageCreator.lambda$runInPage$0(IsolatedPageCreator.java:96)    at net.sf.jasperreports.chrome.ChromeInstance.runWithChromeInstance(ChromeInstance.java:92)    at net.sf.jasperreports.chrome.IsolatedPageCreator.runInPage(IsolatedPageCreator.java:69)    at net.sf.jasperreports.chrome.BrowserService.evaluateInPage(BrowserService.java:98)    at com.jaspersoft.ji.remote.dashboard.ChromeDashboardRenderer.renderDashboard(ChromeDashboardRenderer.java:41)    at com.jaspersoft.ji.remote.dashboard.BaseDashboardRenderer.call(BaseDashboardRenderer.java:76)    at com.jaspersoft.ji.remote.dashboard.BaseDashboardRenderer.call(BaseDashboardRenderer.java:26)    at com.jaspersoft.ji.remote.dashboard.ContextInheritingCallable.call(ContextInheritingCallable.java:51)    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)    at java.base/java.lang.Thread.run(Thread.java:829)Caused by: java.util.concurrent.TimeoutException    at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1886)    at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2021)    at net.sf.jasperreports.chrome.BrowserService.lambda$evaluateInPage$1(BrowserService.java:144)    ... 12 more[/code]

PS: Chrome location for remote environment

Displaying image.png

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.
 

Posted

Hi, 

I am combining both the solutions provided by our team here.

1. In WEB-INF/applicationContext.xml
 
<prop key="net.sf.jasperreports.chrome.argument.enable-logging">stderr</prop>

Add below 2 properties after the above property in the file, if these don't exist.
 
<prop key="net.sf.jasperreports.chrome.page.isolate">true</prop>
<prop key="net.sf.jasperreports.chrome.argument.remote-allow-origins">*</prop>

2.

In WEB-INF/js.config.properties:

Put your server URL with correct domain apart from local URL.

deploy.base.local.url=https://localhost:8443/jasperserver-pro
deploy.base.url=https://{domain}:8443/jasperserver-pro

--Example http://bi.example.com/jasperserver-pro for deploy.base.url

And in WEB-INF/classes/jasperreports.properties add the following:

net.sf.jasperreports.chrome.argument.ignore-certificate-errors=true 
 

**make sure to use http or https appropriately. 
These changes require a restart of the JR server.

As the issue is repeating with dockerized setup, need to make sure all these are correctly set and remote JRS is restarted after all these change.

Posted

I tried the solution suggested by jmand.
The only new thing I have done is adding deploy.base.url.

Other options are already there.

but unfortunately it does not fix the issue. (I redeployed them on remote, So the JR server is started fresh with those changes)

  • 2 weeks later...
Posted

I don't see why it shouldn't work now. Can you recheck the chromium path? The usual location for Chromium in Linux is /usr/bin/chromium-browser... 

If there is any issue with the path then correct it and restart the server and try. If the given path is correct, then I will try to verify a few things to see if the issue is identifiable. As this seems to be specific to your environment.

Posted

 

Dear @sanidu_lakmal,

We are eagerly anticipating your response to the comment mentioned above. Please provide the requested information so that we can assist you in addressing your question effectively.

 

Posted

HI jmand , arai_4 

Sorry for the late reply.
Path to chromium executable is correct.

 

Displaying image.png

PS : I encountered wrong path issue before . It gives me another error message than this.
java.io.IOException: error=2, No such file or directory

Posted

Hi sanidu_lakmal

I don't see much options other than the provided config which would cause this issue. Can you share what exact JRS version are you using? Is it 8.2 or 8.0.4? Do you have all the hot fixes applied specific to the version you are using? Can you try with the latest version with all the hot fixes applied? That will make sure all the configuration are applied correctly. We don't see any other reason behind this error.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...