Hi Mark,
> -----Original Message-----
> From: Mark Thomas [mailto:[email protected]]
> Sent: Wednesday, October 9, 2013 3:38 PM
> To: Tomcat Developers List
> Subject: Re: svn commit: r1530081 -
> /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
>
> On 09/10/2013 12:26, Mark Thomas wrote:
> > On 09/10/2013 02:41, Konstantin Preißer wrote:
> >
> >> When trying with APR, I keep seeing that Tomcat initates the
> >> connection shutdown.
> >
> > I do still see the error when using APR with the current code. I'll dig
> > into this some more.
>
> This should be fixed as well now.
>
> Mark
Thanks a lot for fixing those problems.
Unfortunately, it seems there are some new problems when using the NIO
connector :( (though I do not think they affect a 8.0.0-RC4 release).
I was testing the current trunk with NIO connector on Windows with 64-Bit Java
and I tried to open the Drawboard example and there press F5 for several times
on different computers.
1) Sometimes I get following exceptions:
09-Oct-2013 23:11:28.069 SEVERE [http-nio-8783-exec-8]
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process Error
reading request, ignored
java.lang.IllegalStateException: Message will not be sent because the
WebSocket session has been closed
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:292)
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.endMessage(WsRemoteEndpointImplBase.java:279)
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase$EndMessageHandler.onResult(WsRemoteEndpointImplBase.java:436)
at
org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.clearHandler(WsRemoteEndpointImplServer.java:159)
at
org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doClose(WsRemoteEndpointImplServer.java:121)
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.close(WsRemoteEndpointImplBase.java:536)
at
org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:482)
at org.apache.tomcat.websocket.WsSession.onClose(WsSession.java:438)
at
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.close(WsHttpUpgradeHandler.java:172)
at
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.access$200(WsHttpUpgradeHandler.java:45)
at
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler$WsReadListener.onDataAvailable(WsHttpUpgradeHandler.java:203)
at
org.apache.coyote.http11.upgrade.AbstractServletInputStream.onDataAvailable(AbstractServletInputStream.java:169)
at
org.apache.coyote.http11.upgrade.AbstractProcessor.upgradeDispatch(AbstractProcessor.java:95)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:640)
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1595)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1553)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
The code in WsReadListener.onDataAvailable() seems to catch an IOException
which closes the session, therefore causing writing a Close end frame which in
turn fails again. So it probably is not much severe.
2) What is a bit more severe is that sometimes after pressing F5 a lot of
times, Firefox cannot establish a Websocket connection or make another HTTP
request to Tomcat.
Then I also get such exceptions sporadically:
09-Oct-2013 23:19:07.646 SEVERE [http-nio-8783-ClientPoller-0]
org.apache.tomcat.util.net.NioEndpoint.processSocket Error allocating socket
processor
java.lang.NullPointerException
at
org.apache.tomcat.util.net.NioEndpoint.processSocket(NioEndpoint.java:624)
at
org.apache.tomcat.util.net.NioEndpoint$Poller.processKey(NioEndpoint.java:1163)
at
org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1121)
at java.lang.Thread.run(Thread.java:724)
or these (which seems strange because there occurs a Timeout exception when
sending data, but I don't think Firefox would leave the connection open and
stop to read from it):
09-Oct-2013 23:14:57.453 SEVERE [http-nio-8783-exec-4]
websocket.drawboard.DrawboardEndpoint.onError onError: java.io.IOException:
java.util.concurrent.TimeoutException
java.io.IOException: java.util.concurrent.TimeoutException
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessageBlock(WsRemoteEndpointImplBase.java:226)
at
org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:474)
at org.apache.tomcat.websocket.WsSession.onClose(WsSession.java:438)
at
org.apache.tomcat.websocket.WsFrameBase.processDataControl(WsFrameBase.java:316)
at
org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:270)
at
org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:116)
at
org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:55)
at
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler$WsReadListener.onDataAvailable(WsHttpUpgradeHandler.java:192)
at
org.apache.coyote.http11.upgrade.AbstractServletInputStream.onDataAvailable(AbstractServletInputStream.java:169)
at
org.apache.coyote.http11.upgrade.AbstractProcessor.upgradeDispatch(AbstractProcessor.java:95)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:640)
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1595)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1553)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.util.concurrent.TimeoutException
at
org.apache.tomcat.websocket.FutureToSendHandler.get(FutureToSendHandler.java:99)
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessageBlock(WsRemoteEndpointImplBase.java:222)
... 16 more
I will do some more debugging later to see what happens on TCP level when
Firefox cannot establish a new Websocket connection.
Those errors seem to only happen with the Drawboard example (and there only if
some people already drew something so that the PNG images does not fit into a
single 8 KB packet when sending a binary message, but instead has e.g. 200 KB
(when it is completely white it only hase about 3 KB)), but not with the Snake
example.
Regards,
Konstantin Preißer
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]