You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Marc <ma...@web.de> on 2017/01/27 20:01:07 UTC

Wicket Websocket - Exception is logged in WicketEndpoint if the user is closing the browser

Hi,

I've a page with a WebSocketBehavior. Everything is OK until the user is
closing the browser or tab. An exception is logged in
org.apache.wicket.protocol.ws.javax.WicketEndpoint. 

I don't know if this kind of exception should reach the onError method.
Everything is working fine but the error message is annoying. Is it really
an error which should be logged?

I've created a quickstart attached. websockets.zip
<http://apache-wicket.1842946.n4.nabble.com/file/n4676886/websockets.zip>  

Thanks!

2017-01-27 20:55:44.672 ERROR 18092 --- [nio-8080-exec-2]
o.a.w.protocol.ws.javax.WicketEndpoint   : An error occurred in web socket
connection with id : 1

java.io.IOException: java.io.IOException: Eine bestehende Verbindung wurde
softwaregesteuert
durch den Hostcomputer abgebrochen (an existing connection was forcibly
closed by the remote host)
	at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:315)
~[tomcat-embed-websocket-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:258)
~[tomcat-embed-websocket-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:606)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
	at org.apache.tomcat.websocket.WsSession.onClose(WsSession.java:526)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.websocket.WsFrameBase.processDataControl(WsFrameBase.java:348)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:290)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:131)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:69)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
	at
org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
[tomcat-embed-core-8.5.6.jar:8.5.6]
	at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
[tomcat-embed-core-8.5.6.jar:8.5.6]
	at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
[tomcat-embed-core-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
[tomcat-embed-core-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
[tomcat-embed-core-8.5.6.jar:8.5.6]
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[na:1.8.0_91]
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[na:1.8.0_91]
	at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[tomcat-embed-core-8.5.6.jar:8.5.6]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
Caused by: java.io.IOException: Eine bestehende Verbindung wurde
softwaregesteuert
durch den Hostcomputer abgebrochen
	at sun.nio.ch.SocketDispatcher.write0(Native Method) ~[na:1.8.0_91]
	at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
~[na:1.8.0_91]
	at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) ~[na:1.8.0_91]
	at sun.nio.ch.IOUtil.write(IOUtil.java:65) ~[na:1.8.0_91]
	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
~[na:1.8.0_91]
	at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:157)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1221)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.util.net.SocketWrapperBase.flushBlocking(SocketWrapperBase.java:451)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.util.net.SocketWrapperBase.flush(SocketWrapperBase.java:441)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:97)
~[tomcat-embed-websocket-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:494)
~[tomcat-embed-websocket-8.5.6.jar:8.5.6]
	at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:309)
~[tomcat-embed-websocket-8.5.6.jar:8.5.6]
	... 17 common frames omitted

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Websocket-Exception-is-logged-in-WicketEndpoint-if-the-user-is-closing-the-browser-tp4676886.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket Websocket - Exception is logged in WicketEndpoint if the user is closing the browser

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Please try with Tomcat 8.5.11. There were some improvements lately.
What I find strange in the stacktrace is that the server is notified that
the client closed the connection and still it tries to write a close frame
back to it.
I have two recommendations:
1) switch temporarily to English locale so that the error messages are more
clear to non-German people. Google Translate helps but the message doesn't
directly map to any of the error messages I know of in English
2) ask this question in Tomcat forums (users@tomcat.apache.org)

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Sat, Jan 28, 2017 at 8:40 PM, Marc <ma...@web.de> wrote:

> It seems that this exception only occurs in Google Chrome...
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Wicket-Websocket-Exception-is-logged-
> in-WicketEndpoint-if-the-user-is-closing-the-browser-
> tp4676886p4676889.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Wicket Websocket - Exception is logged in WicketEndpoint if the user is closing the browser

Posted by Marc <ma...@web.de>.
It seems that this exception only occurs in Google Chrome...

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Websocket-Exception-is-logged-in-WicketEndpoint-if-the-user-is-closing-the-browser-tp4676886p4676889.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org