Quantcast

Help with UpgradeException

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Help with UpgradeException

Ian Clarke-2
I seem to get this exception fairly consistently on startup.  I'm using htmlunit to tests a page that is delivered to the client, and the client then connects to the server via a websocket.

But it's unclear what the root cause is, here is the full exception:

May 01, 2017 12:55:58 AM com.gargoylesoftware.htmlunit.javascript.host.WebSocket run
SEVERE: WS connect error
java.util.concurrent.ExecutionException: org.eclipse.jetty.websocket.api.UpgradeException: 0 null
 at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2237)
 at com.gargoylesoftware.htmlunit.javascript.host.WebSocket$1.run(WebSocket.java:151)
 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
 at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
 at java.lang.Thread.run(Thread.java:745)
Caused by: org.eclipse.jetty.websocket.api.UpgradeException: 0 null
 at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete(WebSocketUpgradeRequest.java:513)
 at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193)
 at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:185)
 at org.eclipse.jetty.client.HttpExchange.notifyFailureComplete(HttpExchange.java:269)
 at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:240)
 at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java:141)
 at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:735)
 at org.eclipse.jetty.client.HttpDestination.abort(HttpDestination.java:444)
 at org.eclipse.jetty.client.HttpDestination.close(HttpDestination.java:366)
 at org.eclipse.jetty.client.HttpClient.doStop(HttpClient.java:247)
 at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
 at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:142)
 at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:160)
 at org.eclipse.jetty.websocket.client.WebSocketClient.doStop(WebSocketClient.java:376)
 at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
 at com.gargoylesoftware.htmlunit.javascript.host.WebSocket.close(WebSocket.java:347)
 at com.gargoylesoftware.htmlunit.javascript.host.WebSocket.close(WebSocket.java:325)
 at com.gargoylesoftware.htmlunit.html.HtmlPage.cleanUp(HtmlPage.java:328)
 at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:516)
 at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394)
 at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:311)
 at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:459)
 at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:444)
 at io.kweb.routing.RoutingSpec$1$3.invoke(RoutingSpec.kt:59)
 at io.kweb.routing.RoutingSpec$1$3.invoke(RoutingSpec.kt:20)
 at io.kotlintest.specs.FreeSpec.minus(FreeSpec.kt:23)
 at io.kweb.routing.RoutingSpec$1.invoke(RoutingSpec.kt:58)
 at io.kweb.routing.RoutingSpec$1.invoke(RoutingSpec.kt:20)
 at io.kotlintest.specs.FreeSpec.minus(FreeSpec.kt:23)
 at io.kweb.routing.RoutingSpec.<init>(RoutingSpec.kt:24)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
 at java.lang.Class.newInstance(Class.java:438)
 at io.kotlintest.KTestJUnitRunner.<init>(KTestJUnitRunner.kt:9)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
 at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
 at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
 at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
 at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
 at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
 at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
 at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:49)
 at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
 at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
 at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.nio.channels.AsynchronousCloseException
 ... 42 more

May 01, 2017 12:56:13 AM com.gargoylesoftware.htmlunit.javascript.host.WebSocket run
SEVERE: WS connect error
java.lang.InterruptedException
 at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2225)
 at com.gargoylesoftware.htmlunit.javascript.host.WebSocket$1.run(WebSocket.java:151)
 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
 at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
 at java.lang.Thread.run(Thread.java:745)


Process finished with exit code 0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with UpgradeException

asashour
Hi Ian,

We have this error on the test suite as well, and the reason is because the client-side tries to connect to non-existing WebSocket URL.

However, if you have this error, with a correct server-side part, then it needs to be tackled.



Ahmed


From: Ian Clarke <[hidden email]>
To: [hidden email]
Sent: Monday, May 1, 2017 6:34 PM
Subject: [Htmlunit-user] Help with UpgradeException

I seem to get this exception fairly consistently on startup.  I'm using htmlunit to tests a page that is delivered to the client, and the client then connects to the server via a websocket.

But it's unclear what the root cause is, here is the full exception:

May 01, 2017 12:55:58 AM com.gargoylesoftware.htmlunit.javascript.host.WebSocket run
SEVERE: WS connect error
java.util.concurrent.ExecutionException: org.eclipse.jetty.websocket.api.UpgradeException: 0 null
 at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2237)
 at com.gargoylesoftware.htmlunit.javascript.host.WebSocket$1.run(WebSocket.java:151)
 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
 at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
 at java.lang.Thread.run(Thread.java:745)
Caused by: org.eclipse.jetty.websocket.api.UpgradeException: 0 null
 at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete(WebSocketUpgradeRequest.java:513)
 at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193)
 at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:185)
 at org.eclipse.jetty.client.HttpExchange.notifyFailureComplete(HttpExchange.java:269)
 at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:240)
 at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java:141)
 at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:735)
 at org.eclipse.jetty.client.HttpDestination.abort(HttpDestination.java:444)
 at org.eclipse.jetty.client.HttpDestination.close(HttpDestination.java:366)
 at org.eclipse.jetty.client.HttpClient.doStop(HttpClient.java:247)
 at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
 at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:142)
 at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:160)
 at org.eclipse.jetty.websocket.client.WebSocketClient.doStop(WebSocketClient.java:376)
 at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
 at com.gargoylesoftware.htmlunit.javascript.host.WebSocket.close(WebSocket.java:347)
 at com.gargoylesoftware.htmlunit.javascript.host.WebSocket.close(WebSocket.java:325)
 at com.gargoylesoftware.htmlunit.html.HtmlPage.cleanUp(HtmlPage.java:328)
 at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:516)
 at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394)
 at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:311)
 at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:459)
 at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:444)
 at io.kweb.routing.RoutingSpec$1$3.invoke(RoutingSpec.kt:59)
 at io.kweb.routing.RoutingSpec$1$3.invoke(RoutingSpec.kt:20)
 at io.kotlintest.specs.FreeSpec.minus(FreeSpec.kt:23)
 at io.kweb.routing.RoutingSpec$1.invoke(RoutingSpec.kt:58)
 at io.kweb.routing.RoutingSpec$1.invoke(RoutingSpec.kt:20)
 at io.kotlintest.specs.FreeSpec.minus(FreeSpec.kt:23)
 at io.kweb.routing.RoutingSpec.<init>(RoutingSpec.kt:24)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
 at java.lang.Class.newInstance(Class.java:438)
 at io.kotlintest.KTestJUnitRunner.<init>(KTestJUnitRunner.kt:9)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
 at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
 at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
 at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
 at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
 at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
 at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
 at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:49)
 at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
 at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
 at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.nio.channels.AsynchronousCloseException
 ... 42 more

May 01, 2017 12:56:13 AM com.gargoylesoftware.htmlunit.javascript.host.WebSocket run
SEVERE: WS connect error
java.lang.InterruptedException
 at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2225)
 at com.gargoylesoftware.htmlunit.javascript.host.WebSocket$1.run(WebSocket.java:151)
 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
 at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
 at java.lang.Thread.run(Thread.java:745)


Process finished with exit code 0

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Loading...