简体   繁体   English

BrowserMob代理警告和异常java.io.IOException:对等重置连接

[英]BrowserMob Proxy warning and exception java.io.IOException: Connection reset by peer

I am using the BrowserMob Proxy Interface version 2.1.0-beta-3 (latest) with RemoteWebDriver and am seeing the following Warning/Exceptions regularly when I run it. 我正在将BrowserMob代理接口版本2.1.0-beta-3(最新)与RemoteWebDriver一起使用,并且在运行它时经常看到以下警告/异常。 It seems like the remote end stopped/crashed/closed connection while the driver was trying to navigate to a URL. 在驱动程序尝试导航到URL时,似乎远端已停止/断开/关闭了连接。 However I don't really get what could have caused it to close. 但是我并没有真正了解可能导致它关闭的原因。

LittleProxy-0-ClientToProxyWorker-1é WARN org.littleshoot.proxy.impl.ClientToProxyConnection - (AWAITING_INITIAL) °id: 0x6d0bba70, /162.222.73.15:18708 => /<ip>:13000é: Caught an exception on ClientToProxyConnection
java.io.IOException: Connection reset by peer
    at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
    at sun.nio.ch.IOUtil.read(IOUtil.java:192)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:384)
    at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:447)
    at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:881)
    at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:242)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)
°LittleProxy-0-ClientToProxyWorker-0é WARN org.littleshoot.proxy.impl.ClientToProxyConnection - (NEGOTIATING_CONNECT) °id: 0xead90d4d, /162.222.73.15:19770 => /<ip>:13000é: Caught an exception on ClientToProxyConnection
java.io.IOException: Connection reset by peer
    at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
    at sun.nio.ch.IOUtil.read(IOUtil.java:192)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:384)
    at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:447)
    at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:881)
    at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:242)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)
°LittleProxy-0-ClientToProxyWorker-2é WARN org.littleshoot.proxy.impl.ClientToProxyConnection - (NEGOTIATING_CONNECT) °id: 0x79fa97f4, /162.222.73.15:9147 => /<ip>:13000é: Caught an exception on ClientToProxyConnection
java.io.IOException: Connection reset by peer
    at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
    at sun.nio.ch.IOUtil.read(IOUtil.java:192)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:384)
    at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:447)
    at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:881)
    at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:242)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)
°LittleProxy-0-ClientToProxyWorker-3é WARN org.littleshoot.proxy.impl.ClientToProxyConnection - (AWAITING_INITIAL) °id: 0xaa25c51b, /162.222.73.15:19720 => /<ip>:13000é: Caught an exception on ClientToProxyConnection
java.io.IOException: Connection reset by peer
    at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
    at sun.nio.ch.IOUtil.read(IOUtil.java:192)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:384)
    at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:447)
    at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:881)
    at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:242)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)

Most of the time the execution continues and it actually navigates to the desired URL and captures the HAR but sometimes it just hangs after which I have to kill the process. 大多数情况下,执行会继续进行,并且实际上会导航到所需的URL并捕获HAR,但是有时它只是挂起,之后我必须终止该过程。

Also, keep getting these errors if I keep the process running for some more time. 另外,如果我让进程运行更多时间,请继续获取这些错误。 This seems like an SSL certificate issue but it usually piggybacks off the first one. 这似乎是SSL证书问题,但通常会附带第一个证书。

°LittleProxy-0-ClientToProxyWorker-3é ERROR org.littleshoot.proxy.impl.ClientToProxyConnection - (AWAITING_INITIAL) °id: 0x71209d6c, /162.222.73.15:6210 => /<ip>:13000é: Caught an exception on ClientToProxyConnection
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLException: Received fatal alert: certificate_unknown
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:358)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:230)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)
Caused by: javax.net.ssl.SSLException: Received fatal alert: certificate_unknown
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
    at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1639)
    at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1607)
    at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1776)
    at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1068)
    at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:890)
    at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:764)
    at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
    at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1135)
    at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1025)
    at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:965)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:327)
    ... 11 more

Have been observing these exceptions too, although I do not think they are related to broswermob or could be 我也一直在观察这些例外,尽管我不认为它们与broswermob有关,或者可能与

[LittleProxy-0-ClientToProxyWorker-0] ERROR org.littleshoot.proxy.impl.ClientToProxyConnection - (NEGOTIATING_CONNECT) [id: 0x2ea1eced, /162.222.73.13:7919 => /<ip>:13000]: Caught an exception on ClientToProxyConnection
io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record: 802e0100020015000000100100800700c00300800600400200800400800000ff322036ba42651dc8aa28877107bb772c
    at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:977)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:327)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:230)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)
[LittleProxy-0-ClientToProxyWorker-2] ERROR org.littleshoot.proxy.impl.ClientToProxyConnection - (NEGOTIATING_CONNECT) [id: 0xcee6232c, /162.222.73.13:31136 :> 0.0.0.0/0.0.0.0:13000]: Caught an exception on ClientToProxyConnection
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: Client requested protocol SSLv3 not enabled or not supported
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:358)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:230)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)
Caused by: javax.net.ssl.SSLHandshakeException: Client requested protocol SSLv3 not enabled or not supported
    at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1348)
    at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:519)
    at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:796)
    at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:764)
    at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
    at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1135)
    at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1025)
    at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:965)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:327)
    ... 11 more
Caused by: javax.net.ssl.SSLHandshakeException: Client requested protocol SSLv3 not enabled or not supported
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1639)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:281)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:269)
    at sun.security.ssl.ServerHandshaker.clientHello(ServerHandshaker.java:431)
    at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:167)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:913)
    at sun.security.ssl.Handshaker$1.run(Handshaker.java:853)
    at sun.security.ssl.Handshaker$1.run(Handshaker.java:851)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1285)
    at io.netty.handler.ssl.SslHandler.runDelegatedTasks(SslHandler.java:1161)
    at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1064)
    ... 13 more

I have tried looking and searching online but don't seem to have a good solution. 我尝试过在线查找和搜索,但似乎没有很好的解决方案。 Any suggestion or direction would be really helpful. 任何建议或指示将非常有帮助。

You have raised several different exceptions that you are seeing in your logs. 您已经提出了几种在日志中看到的异常。 In the case of the Connection reset by peer , that is one that I am also seeing a lot of as well. 由peer重置Connection的情况下,我也看到了很多。 I have not been able to confirm this yet, but I do have a theory on what is causing this. 我还无法确认这一点,但是我确实有造成这种情况的理论。

I am running test suites that load many pages. 我正在运行加载许多页面的测试套件。 And when the first page tests are complete it loads the next page. 当首页测试完成时,它将加载下一页。 However there may still be network requests in progress when it does that. 但是,这样做时可能仍在进行网络请求。 What then happens to the connections that are still open at the moment when the web browser requests a new page? 当网络浏览器请求一个新页面时,仍然打开的连接又会怎样? I suspect that the browser closes those connections before it moves on. 我怀疑浏览器在继续之前会关闭这些连接。 This would cause BrowserMob Proxy to get an unexpected close connection event. 这将导致BrowserMob代理获得意外的关闭连接事件。 When it does it probably throws the Connection reset by peer exception which then gets logged. 在执行此操作时,它可能会引发对等异常重置连接 ,然后将其记录下来。

If this is the case, then this is probably a non-issue. 如果是这种情况,则可能不是问题。 It should be possible to create some test scenarios to prove this out. 应该可以创建一些测试场景来证明这一点。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.io.IOException:由peer重置连接 - java.io.IOException: Connection reset by peer Cassandra-unit:java.io.IOException:由peer重置连接 - Cassandra-unit : java.io.IOException: Connection reset by peer 什么时候抛出“java.io.IOException:Connection reset by peer”? - When is "java.io.IOException:Connection reset by peer" thrown? ElasticSearch RestHighLevelClient 抛出 java.io.IOException: Connection reset by peer - ElasticSearch RestHighLevelClient throws java.io.IOException: Connection reset by peer 什么时候出现java.io.IOException:用Netty抛出的对等重置连接? - When is java.io.IOException: Connection reset by peer thrown with Netty? 异步http客户端中的对等方重置java.io.IOException连接 - java.io.IOException connection reset by peer in asynchronous http client Flume:来自下游的意外异常。 java.io.IOException:对等重置连接 - Flume : Unexpected exception from downstream. java.io.IOException: Connection reset by peer SSTable加载器流式传输失败,给出java.io.IOException:对等体重置连接 - SSTable loader streaming failed giving java.io.IOException: Connection reset by peer java.io.IOException:在Weblogic服务器上使用AsyncRestTemplate时,连接被对等方重置 - java.io.IOException: Connection reset by peer' when using AsyncRestTemplate on weblogic server Spring 应用程序部署在 tomcat - org.apache.catalina.connector.ClientAbortException: java.io.IOException: Connection reset by peer - Spring application deployed on tomcat - org.apache.catalina.connector.ClientAbortException: java.io.IOException: Connection reset by peer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM