Jump to content
Changes to the Jaspersoft community edition download ×

Handshake error Failed connecting to ws server ws://localhost


Go to solution Solved by Michael Bielkiewicz,

Recommended Posts

Environment Java 8 , Jasper 8, Windows 11

When I try to export a dashboard report
Screenshot -> PDF

Following error occurs

18:06:06,536 INFO  [stdout] (pool-47-thread-2) 2023-05-08T18:06:06,534  WARN WebSocketServiceImpl,pool-47-thread-2:105 - Failed connecting to ws server ws://localhost:54220/devtools/browser/af2fadba-a2d0-45c8-92f0-f01c67360ebb... javax.websocket.DeploymentException: Handshake error.18:06:06,536 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.tyrus.client.ClientManager$3$1.run(ClientManager.java:679)18:06:06,536 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.tyrus.client.ClientManager$3.run(ClientManager.java:717)18:06:06,536 INFO  [stdout] (pool-47-thread-2)  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)18:06:06,536 INFO  [stdout] (pool-47-thread-2)  at java.util.concurrent.FutureTask.run(FutureTask.java:266)18:06:06,536 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.tyrus.client.ClientManager$SameThreadExecutorService.execute(ClientManager.java:871)18:06:06,536 INFO  [stdout] (pool-47-thread-2)  at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)18:06:06,536 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:516)18:06:06,536 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:378)18:06:06,536 INFO  [stdout] (pool-47-thread-2)  at com.github.kklisura.cdt.services.impl.WebSocketServiceImpl.connect(WebSocketServiceImpl.java:94)18:06:06,536 INFO  [stdout] (pool-47-thread-2)  at com.github.kklisura.cdt.services.impl.WebSocketServiceImpl.create(WebSocketServiceImpl.java:84)18:06:06,536 INFO  [stdout] (pool-47-thread-2)  at net.sf.jasperreports.chrome.IsolatedPageCreator.getBrowserDevToolsService(IsolatedPageCreator.java:147)18:06:06,536 INFO  [stdout] (pool-47-thread-2)  at net.sf.jasperreports.chrome.IsolatedPageCreator.lambda$runInPage$0(IsolatedPageCreator.java:71)18:06:06,538 INFO  [stdout] (pool-47-thread-2)  at net.sf.jasperreports.chrome.ChromeInstance.runWithChromeInstance(ChromeInstance.java:92)18:06:06,538 INFO  [stdout] (pool-47-thread-2)  at net.sf.jasperreports.chrome.IsolatedPageCreator.runInPage(IsolatedPageCreator.java:69)18:06:06,538 INFO  [stdout] (pool-47-thread-2)  at net.sf.jasperreports.chrome.BrowserService.evaluateInPage(BrowserService.java:98)18:06:06,538 INFO  [stdout] (pool-47-thread-2)  at com.jaspersoft.ji.remote.dashboard.ChromeDashboardRenderer.renderDashboard(ChromeDashboardRenderer.java:41)18:06:06,538 INFO  [stdout] (pool-47-thread-2)  at com.jaspersoft.ji.remote.dashboard.BaseDashboardRenderer.call(BaseDashboardRenderer.java:76)18:06:06,538 INFO  [stdout] (pool-47-thread-2)  at com.jaspersoft.ji.remote.dashboard.BaseDashboardRenderer.call(BaseDashboardRenderer.java:26)18:06:06,538 INFO  [stdout] (pool-47-thread-2)  at com.jaspersoft.ji.remote.dashboard.ContextInheritingCallable.call(ContextInheritingCallable.java:51)18:06:06,538 INFO  [stdout] (pool-47-thread-2)  at java.util.concurrent.FutureTask.run(FutureTask.java:266)18:06:06,538 INFO  [stdout] (pool-47-thread-2)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)18:06:06,538 INFO  [stdout] (pool-47-thread-2)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)18:06:06,538 INFO  [stdout] (pool-47-thread-2)  at java.lang.Thread.run(Thread.java:750)18:06:06,538 INFO  [stdout] (pool-47-thread-2) Caused by: org.glassfish.tyrus.core.HandshakeException: Response code was not 101: 403.18:06:06,538 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.tyrus.client.TyrusClientEngine.processResponse(TyrusClientEngine.java:320)18:06:06,538 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientFilter.handleHandshake(GrizzlyClientFilter.java:346)18:06:06,539 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientFilter.handleRead(GrizzlyClientFilter.java:315)18:06:06,539 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)18:06:06,539 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)18:06:06,539 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)18:06:06,539 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)18:06:06,539 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)18:06:06,539 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)18:06:06,539 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:526)18:06:06,539 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)18:06:06,539 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)18:06:06,539 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)18:06:06,539 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)18:06:06,539 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)18:06:06,539 INFO  [stdout] (pool-47-thread-2)  at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)[/code]

Chrome path is set and added

net.sf.jasperreports.chrome.argument.no-sandbox=true[/code]

to jasperreports.properties get rid of previous error messages , Now I am stuck here.

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

This is a tricky one and likely has something to do with Chromium not working/installed right. Please ensure you've got the proper version of Chromium installed per our install/platform support guides. In addition, another client had a similar issue and this was suggested:
 

If version of google-chrome 111 then, the issue would be similar to this:https://forum.katalon.com/t/failed-connecting-to-ws-server/85323and we can try to set remote-allow-origins to * as follows:In WEB-INF/applicationContext.xmlAdd these 2 properties:<prop key="net.sf.jasperreports.chrome.page.isolate">true</prop><prop key="net.sf.jasperreports.chrome.argument.remote-allow-origins">*</prop>Add the above two below this line (about line 1041) :<prop key="net.sf.jasperreports.chrome.argument.enable-logging">stderr</prop>These changes require a restart of the JR server.Please give it a shot and post back results.

Link to comment
Share on other sites

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...