Testsuite: org.apache.tomcat.websocket.server.TestClose Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.734 sec ------------- Standard Error ----------------- 18-Jan-2024 17:58:40.843 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpCloseInOnMessage] 18-Jan-2024 17:58:41.363 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio2-127.0.0.1-auto-1"] 18-Jan-2024 17:58:41.449 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 18-Jan-2024 17:58:41.449 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.86-dev] 18-Jan-2024 17:58:41.676 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio2-127.0.0.1-auto-1-37469"] 18-Jan-2024 17:58:41.805 INFO [http-nio2-127.0.0.1-auto-1-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 18-Jan-2024 17:58:41.808 INFO [http-nio2-127.0.0.1-auto-1-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 18-Jan-2024 17:58:41.852 INFO [http-nio2-127.0.0.1-auto-1-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: java.io.EOFException at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:320) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:256) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:801) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:670) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:637) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:180) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.io.EOFException at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:629) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:619) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker.invokeDirect(Invoker.java:160) at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:573) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:276) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297) at org.apache.tomcat.util.net.Nio2Channel.read(Nio2Channel.java:156) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper.fillReadBuffer(Nio2Endpoint.java:1165) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper.fillReadBuffer(Nio2Endpoint.java:1132) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper.read(Nio2Endpoint.java:954) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:74) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1295) at org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:339) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:479) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:415) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) ... 4 more 18-Jan-2024 17:58:41.853 INFO [http-nio2-127.0.0.1-auto-1-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [Closing WebSocket connection due to an error] 18-Jan-2024 17:58:41.854 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio2-127.0.0.1-auto-1-37469"] 18-Jan-2024 17:58:41.856 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 18-Jan-2024 17:58:41.869 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio2-127.0.0.1-auto-1-37469"] 18-Jan-2024 17:58:41.871 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio2-127.0.0.1-auto-1-37469"] 18-Jan-2024 17:58:41.883 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testWsCloseThenTcpCloseWhenOnMessageSends] 18-Jan-2024 17:58:41.891 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio2-127.0.0.1-auto-2"] 18-Jan-2024 17:58:41.916 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 18-Jan-2024 17:58:41.916 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.86-dev] 18-Jan-2024 17:58:41.922 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio2-127.0.0.1-auto-2-41225"] 18-Jan-2024 17:58:41.942 INFO [http-nio2-127.0.0.1-auto-2-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 18-Jan-2024 17:58:41.944 INFO [http-nio2-127.0.0.1-auto-2-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 18-Jan-2024 17:58:42.461 INFO [http-nio2-127.0.0.1-auto-2-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: java.io.IOException: Broken pipe at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:320) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:256) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:801) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:670) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:318) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:249) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:191) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:36) at org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage(TestClose.java:293) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBase.onMessage(PojoMessageHandlerWholeBase.java:101) at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:390) at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:130) at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:484) at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:284) at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1295) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:643) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:619) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.io.IOException: Broken pipe at java.base/sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:217) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:146) at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.implWrite(UnixAsynchronousSocketChannelImpl.java:711) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:382) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:416) at org.apache.tomcat.util.net.Nio2Channel.write(Nio2Channel.java:184) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.run(Nio2Endpoint.java:1118) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.start(Nio2Endpoint.java:1063) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1496) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1422) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1393) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:165) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:515) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:307) ... 33 more 18-Jan-2024 17:58:42.462 INFO [http-nio2-127.0.0.1-auto-2-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [Broken pipe] 18-Jan-2024 17:58:42.462 INFO [http-nio2-127.0.0.1-auto-2-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: Broken pipe at java.base/sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:217) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:146) at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.implWrite(UnixAsynchronousSocketChannelImpl.java:711) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:382) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:416) at org.apache.tomcat.util.net.Nio2Channel.write(Nio2Channel.java:184) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.run(Nio2Endpoint.java:1118) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.start(Nio2Endpoint.java:1063) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1496) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1422) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1393) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:165) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:515) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:307) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:249) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:191) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:36) at org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage(TestClose.java:293) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBase.onMessage(PojoMessageHandlerWholeBase.java:101) at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:390) at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:130) at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:484) at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:284) at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1295) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:643) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:619) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833) 18-Jan-2024 17:58:42.463 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio2-127.0.0.1-auto-2-41225"] 18-Jan-2024 17:58:42.465 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 18-Jan-2024 17:58:42.468 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio2-127.0.0.1-auto-2-41225"] 18-Jan-2024 17:58:42.468 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio2-127.0.0.1-auto-2-41225"] 18-Jan-2024 17:58:42.474 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpCloseWhenOnMessageSends] 18-Jan-2024 17:58:42.476 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio2-127.0.0.1-auto-3"] 18-Jan-2024 17:58:42.511 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 18-Jan-2024 17:58:42.511 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.86-dev] 18-Jan-2024 17:58:42.521 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio2-127.0.0.1-auto-3-33689"] 18-Jan-2024 17:58:42.526 INFO [http-nio2-127.0.0.1-auto-3-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 18-Jan-2024 17:58:42.530 INFO [http-nio2-127.0.0.1-auto-3-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 18-Jan-2024 17:58:43.050 INFO [http-nio2-127.0.0.1-auto-3-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: java.io.IOException: Broken pipe at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:320) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:256) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:801) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:670) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:318) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:249) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:191) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:36) at org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage(TestClose.java:293) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBase.onMessage(PojoMessageHandlerWholeBase.java:101) at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:390) at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:130) at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:484) at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:284) at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1295) at org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:339) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:479) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:415) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.io.IOException: Broken pipe at java.base/sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:217) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:146) at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.implWrite(UnixAsynchronousSocketChannelImpl.java:711) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:382) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:416) at org.apache.tomcat.util.net.Nio2Channel.write(Nio2Channel.java:184) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.run(Nio2Endpoint.java:1118) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.start(Nio2Endpoint.java:1063) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1496) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1422) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1393) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:165) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:515) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:307) ... 34 more 18-Jan-2024 17:58:43.051 INFO [http-nio2-127.0.0.1-auto-3-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [Broken pipe] 18-Jan-2024 17:58:43.051 INFO [http-nio2-127.0.0.1-auto-3-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: Broken pipe at java.base/sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:217) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:146) at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.implWrite(UnixAsynchronousSocketChannelImpl.java:711) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:382) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:416) at org.apache.tomcat.util.net.Nio2Channel.write(Nio2Channel.java:184) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.run(Nio2Endpoint.java:1118) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.start(Nio2Endpoint.java:1063) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1496) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1422) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1393) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:165) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:515) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:307) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:249) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:191) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:36) at org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage(TestClose.java:293) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBase.onMessage(PojoMessageHandlerWholeBase.java:101) at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:390) at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:130) at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:484) at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:284) at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1295) at org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:339) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:479) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:415) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833) 18-Jan-2024 17:58:43.052 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio2-127.0.0.1-auto-3-33689"] 18-Jan-2024 17:58:43.055 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 18-Jan-2024 17:58:43.058 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio2-127.0.0.1-auto-3-33689"] 18-Jan-2024 17:58:43.060 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio2-127.0.0.1-auto-3-33689"] 18-Jan-2024 17:58:43.062 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testWsCloseThenTcpClose] 18-Jan-2024 17:58:43.064 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio2-127.0.0.1-auto-4"] 18-Jan-2024 17:58:43.122 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 18-Jan-2024 17:58:43.122 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.86-dev] 18-Jan-2024 17:58:43.129 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio2-127.0.0.1-auto-4-37977"] 18-Jan-2024 17:58:43.134 INFO [http-nio2-127.0.0.1-auto-4-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 18-Jan-2024 17:58:43.136 INFO [http-nio2-127.0.0.1-auto-4-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1001], reason [null] 18-Jan-2024 17:58:43.136 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio2-127.0.0.1-auto-4-37977"] 18-Jan-2024 17:58:43.138 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 18-Jan-2024 17:58:43.139 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio2-127.0.0.1-auto-4-37977"] 18-Jan-2024 17:58:43.140 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio2-127.0.0.1-auto-4-37977"] 18-Jan-2024 17:58:43.143 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testWsCloseThenTcpReset] 18-Jan-2024 17:58:43.145 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio2-127.0.0.1-auto-5"] 18-Jan-2024 17:58:43.148 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 18-Jan-2024 17:58:43.148 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.86-dev] 18-Jan-2024 17:58:43.153 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio2-127.0.0.1-auto-5-33183"] 18-Jan-2024 17:58:43.156 INFO [http-nio2-127.0.0.1-auto-5-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 18-Jan-2024 17:58:43.159 INFO [http-nio2-127.0.0.1-auto-5-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: java.io.IOException: Connection reset by peer at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:320) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:256) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:801) at org.apache.tomcat.websocket.WsSession.onClose(WsSession.java:711) at org.apache.tomcat.websocket.WsFrameBase.processDataControl(WsFrameBase.java:347) at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:279) at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1295) at org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:339) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:479) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:415) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.io.IOException: Connection reset by peer at java.base/sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:217) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:146) at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.implWrite(UnixAsynchronousSocketChannelImpl.java:711) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:382) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:416) at org.apache.tomcat.util.net.Nio2Channel.write(Nio2Channel.java:184) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.run(Nio2Endpoint.java:1118) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.start(Nio2Endpoint.java:1063) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1496) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1422) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1393) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:165) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:515) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:307) ... 26 more 18-Jan-2024 17:58:43.160 INFO [http-nio2-127.0.0.1-auto-5-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1001], reason [null] 18-Jan-2024 17:58:43.161 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio2-127.0.0.1-auto-5-33183"] 18-Jan-2024 17:58:43.164 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 18-Jan-2024 17:58:43.166 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio2-127.0.0.1-auto-5-33183"] 18-Jan-2024 17:58:43.167 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio2-127.0.0.1-auto-5-33183"] 18-Jan-2024 17:58:43.176 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testWsCloseThenTcpResetWhenOnMessageSends] 18-Jan-2024 17:58:43.179 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio2-127.0.0.1-auto-6"] 18-Jan-2024 17:58:43.206 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 18-Jan-2024 17:58:43.206 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.86-dev] 18-Jan-2024 17:58:43.210 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio2-127.0.0.1-auto-6-40417"] 18-Jan-2024 17:58:43.215 INFO [http-nio2-127.0.0.1-auto-6-exec-4] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 18-Jan-2024 17:58:43.219 INFO [http-nio2-127.0.0.1-auto-6-exec-4] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 18-Jan-2024 17:58:43.221 INFO [http-nio2-127.0.0.1-auto-6-exec-4] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: java.io.IOException: Connection reset by peer at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:320) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:256) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:801) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:670) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:318) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:249) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:191) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:36) at org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage(TestClose.java:293) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBase.onMessage(PojoMessageHandlerWholeBase.java:101) at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:390) at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:130) at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:484) at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:284) at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1295) at org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:339) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:479) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:415) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.io.IOException: Connection reset by peer at java.base/sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:217) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:146) at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.implWrite(UnixAsynchronousSocketChannelImpl.java:711) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:382) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:416) at org.apache.tomcat.util.net.Nio2Channel.write(Nio2Channel.java:184) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.run(Nio2Endpoint.java:1118) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.start(Nio2Endpoint.java:1063) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1496) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1422) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1393) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:165) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:515) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:307) ... 34 more 18-Jan-2024 17:58:43.223 INFO [http-nio2-127.0.0.1-auto-6-exec-4] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [Connection reset by peer] 18-Jan-2024 17:58:43.224 INFO [http-nio2-127.0.0.1-auto-6-exec-4] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: Connection reset by peer at java.base/sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:217) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:146) at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.implWrite(UnixAsynchronousSocketChannelImpl.java:711) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:382) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:416) at org.apache.tomcat.util.net.Nio2Channel.write(Nio2Channel.java:184) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.run(Nio2Endpoint.java:1118) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.start(Nio2Endpoint.java:1063) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1496) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1422) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1393) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:165) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:515) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:307) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:249) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:191) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:36) at org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage(TestClose.java:293) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBase.onMessage(PojoMessageHandlerWholeBase.java:101) at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:390) at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:130) at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:484) at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:284) at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1295) at org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:339) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:479) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:415) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833) 18-Jan-2024 17:58:43.226 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio2-127.0.0.1-auto-6-40417"] 18-Jan-2024 17:58:43.230 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 18-Jan-2024 17:58:43.235 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio2-127.0.0.1-auto-6-40417"] 18-Jan-2024 17:58:43.238 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio2-127.0.0.1-auto-6-40417"] 18-Jan-2024 17:58:43.246 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpResetWhenOnMessageSends] 18-Jan-2024 17:58:43.248 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio2-127.0.0.1-auto-7"] 18-Jan-2024 17:58:43.266 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 18-Jan-2024 17:58:43.266 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.86-dev] 18-Jan-2024 17:58:43.282 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio2-127.0.0.1-auto-7-35039"] 18-Jan-2024 17:58:43.288 INFO [http-nio2-127.0.0.1-auto-7-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 18-Jan-2024 17:58:43.293 INFO [http-nio2-127.0.0.1-auto-7-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 18-Jan-2024 17:58:43.293 INFO [http-nio2-127.0.0.1-auto-7-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: java.io.IOException: Connection reset by peer at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:320) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:256) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:801) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:670) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:318) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:249) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:191) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:36) at org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage(TestClose.java:293) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBase.onMessage(PojoMessageHandlerWholeBase.java:101) at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:390) at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:130) at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:484) at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:284) at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1295) at org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:339) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:479) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:415) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.io.IOException: Connection reset by peer at java.base/sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:217) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:146) at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.implWrite(UnixAsynchronousSocketChannelImpl.java:711) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:382) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:416) at org.apache.tomcat.util.net.Nio2Channel.write(Nio2Channel.java:184) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.run(Nio2Endpoint.java:1118) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.start(Nio2Endpoint.java:1063) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1496) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1422) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1393) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:165) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:515) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:307) ... 34 more 18-Jan-2024 17:58:43.294 INFO [http-nio2-127.0.0.1-auto-7-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [Connection reset by peer] 18-Jan-2024 17:58:43.294 INFO [http-nio2-127.0.0.1-auto-7-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: Connection reset by peer at java.base/sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:66) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:217) at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:146) at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.implWrite(UnixAsynchronousSocketChannelImpl.java:711) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:382) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:416) at org.apache.tomcat.util.net.Nio2Channel.write(Nio2Channel.java:184) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.run(Nio2Endpoint.java:1118) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState.start(Nio2Endpoint.java:1063) at org.apache.tomcat.util.net.SocketWrapperBase.vectoredOperation(SocketWrapperBase.java:1496) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1422) at org.apache.tomcat.util.net.SocketWrapperBase.write(SocketWrapperBase.java:1393) at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:165) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:515) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:307) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:249) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:191) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:36) at org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage(TestClose.java:293) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBase.onMessage(PojoMessageHandlerWholeBase.java:101) at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:390) at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:130) at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:484) at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:284) at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:85) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1295) at org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:339) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:479) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:415) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833) 18-Jan-2024 17:58:43.295 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio2-127.0.0.1-auto-7-35039"] 18-Jan-2024 17:58:43.298 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 18-Jan-2024 17:58:43.299 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio2-127.0.0.1-auto-7-35039"] 18-Jan-2024 17:58:43.300 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio2-127.0.0.1-auto-7-35039"] 18-Jan-2024 17:58:43.303 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpResetInOnMessage] 18-Jan-2024 17:58:43.304 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio2-127.0.0.1-auto-8"] 18-Jan-2024 17:58:43.321 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 18-Jan-2024 17:58:43.321 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.86-dev] 18-Jan-2024 17:58:43.330 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio2-127.0.0.1-auto-8-41043"] 18-Jan-2024 17:58:43.334 INFO [http-nio2-127.0.0.1-auto-8-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 18-Jan-2024 17:58:43.334 INFO [http-nio2-127.0.0.1-auto-8-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onMessage Message received: Test 18-Jan-2024 17:58:43.335 INFO [http-nio2-127.0.0.1-auto-8-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: java.io.IOException: Connection reset at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:320) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:256) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:801) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:670) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:637) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:180) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.io.IOException: Connection reset at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:559) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:276) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297) at org.apache.tomcat.util.net.Nio2Channel.read(Nio2Channel.java:156) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper.fillReadBuffer(Nio2Endpoint.java:1165) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper.fillReadBuffer(Nio2Endpoint.java:1132) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper.read(Nio2Endpoint.java:954) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:74) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1295) at org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:339) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:479) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:415) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) ... 4 more 18-Jan-2024 17:58:43.336 INFO [http-nio2-127.0.0.1-auto-8-exec-1] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [Closing WebSocket connection due to an error] 18-Jan-2024 17:58:43.336 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio2-127.0.0.1-auto-8-41043"] 18-Jan-2024 17:58:43.337 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 18-Jan-2024 17:58:43.339 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio2-127.0.0.1-auto-8-41043"] 18-Jan-2024 17:58:43.340 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio2-127.0.0.1-auto-8-41043"] 18-Jan-2024 17:58:43.343 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpClose] 18-Jan-2024 17:58:43.344 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio2-127.0.0.1-auto-9"] 18-Jan-2024 17:58:43.349 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 18-Jan-2024 17:58:43.349 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.86-dev] 18-Jan-2024 17:58:43.357 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio2-127.0.0.1-auto-9-33287"] 18-Jan-2024 17:58:43.361 INFO [http-nio2-127.0.0.1-auto-9-exec-2] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 18-Jan-2024 17:58:43.362 INFO [http-nio2-127.0.0.1-auto-9-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: java.io.EOFException at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:320) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:256) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:801) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:670) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:637) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:180) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.io.EOFException at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:629) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:619) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker.invokeDirect(Invoker.java:160) at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:573) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:276) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297) at org.apache.tomcat.util.net.Nio2Channel.read(Nio2Channel.java:156) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper.fillReadBuffer(Nio2Endpoint.java:1165) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper.fillReadBuffer(Nio2Endpoint.java:1132) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper.read(Nio2Endpoint.java:954) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:74) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1295) at org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:339) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:479) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:415) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) ... 4 more 18-Jan-2024 17:58:43.362 INFO [http-nio2-127.0.0.1-auto-9-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [Closing WebSocket connection due to an error] 18-Jan-2024 17:58:43.363 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio2-127.0.0.1-auto-9-33287"] 18-Jan-2024 17:58:43.364 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 18-Jan-2024 17:58:43.365 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio2-127.0.0.1-auto-9-33287"] 18-Jan-2024 17:58:43.366 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio2-127.0.0.1-auto-9-33287"] 18-Jan-2024 17:58:43.369 INFO [main] org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case [testTcpReset] 18-Jan-2024 17:58:43.370 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio2-127.0.0.1-auto-10"] 18-Jan-2024 17:58:43.372 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat] 18-Jan-2024 17:58:43.372 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.86-dev] 18-Jan-2024 17:58:43.376 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio2-127.0.0.1-auto-10-45943"] 18-Jan-2024 17:58:43.380 INFO [http-nio2-127.0.0.1-auto-10-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onOpen Session opened 18-Jan-2024 17:58:43.380 INFO [http-nio2-127.0.0.1-auto-10-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onError onError java.io.IOException: java.io.IOException: Connection reset at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:320) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:256) at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:801) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:670) at org.apache.tomcat.websocket.WsSession.doClose(WsSession.java:637) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:180) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.io.IOException: Connection reset at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:559) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:276) at java.base/sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297) at org.apache.tomcat.util.net.Nio2Channel.read(Nio2Channel.java:156) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper.fillReadBuffer(Nio2Endpoint.java:1165) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper.fillReadBuffer(Nio2Endpoint.java:1132) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper.read(Nio2Endpoint.java:954) at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:74) at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:184) at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:164) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:152) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1732) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1295) at org.apache.tomcat.util.net.Nio2Endpoint.setSocketOptions(Nio2Endpoint.java:339) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:479) at org.apache.tomcat.util.net.Nio2Endpoint$Nio2Acceptor.completed(Nio2Endpoint.java:415) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113) ... 4 more 18-Jan-2024 17:58:43.381 INFO [http-nio2-127.0.0.1-auto-10-exec-3] org.apache.tomcat.websocket.server.TestClose$TestEndpoint.onClose onClose: CloseReason: code [1006], reason [Closing WebSocket connection due to an error] 18-Jan-2024 17:58:43.381 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio2-127.0.0.1-auto-10-45943"] 18-Jan-2024 17:58:43.381 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Tomcat] 18-Jan-2024 17:58:43.383 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio2-127.0.0.1-auto-10-45943"] 18-Jan-2024 17:58:43.383 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio2-127.0.0.1-auto-10-45943"] ------------- ---------------- --------------- Testcase: testTcpCloseInOnMessage took 1.19 sec Testcase: testWsCloseThenTcpCloseWhenOnMessageSends took 0.591 sec Testcase: testTcpCloseWhenOnMessageSends took 0.589 sec Testcase: testWsCloseThenTcpClose took 0.081 sec Testcase: testWsCloseThenTcpReset took 0.031 sec Testcase: testWsCloseThenTcpResetWhenOnMessageSends took 0.069 sec Testcase: testTcpResetWhenOnMessageSends took 0.058 sec Testcase: testTcpResetInOnMessage took 0.04 sec Testcase: testTcpClose took 0.027 sec Testcase: testTcpReset took 0.017 sec