monkeyWie / proxyee

HTTP proxy server,support HTTPS&websocket.MITM impl,intercept and tamper HTTPS traffic.
MIT License
1.5k stars 566 forks source link

一直出现很多的ClosedChannelException报错日志,但是能正常运行,这个该如何解决 #297

Open KonstantinBelov008 opened 3 weeks ago

KonstantinBelov008 commented 3 weeks ago

java.nio.channels.ClosedChannelException at io.netty.channel.nio.AbstractNioChannel.doClose(AbstractNioChannel.java:502) at io.netty.channel.socket.nio.NioSocketChannel.doClose(NioSocketChannel.java:342) at io.netty.channel.AbstractChannel$AbstractUnsafe.doClose0(AbstractChannel.java:760) at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:737) at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:608) at io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1352) at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:622) at io.netty.channel.AbstractChannelHandlerContext.access$1200(AbstractChannelHandlerContext.java:61) at io.netty.channel.AbstractChannelHandlerContext$11.run(AbstractChannelHandlerContext.java:611) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:164) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748) java.nio.channels.ClosedChannelException at io.netty.channel.nio.AbstractNioChannel.doClose(AbstractNioChannel.java:502) at io.netty.channel.socket.nio.NioSocketChannel.doClose(NioSocketChannel.java:342) at io.netty.channel.AbstractChannel$AbstractUnsafe.doClose0(AbstractChannel.java:760) at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:737) at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:608) at io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1352) at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:622) at io.netty.channel.AbstractChannelHandlerContext.access$1200(AbstractChannelHandlerContext.java:61) at io.netty.channel.AbstractChannelHandlerContext$11.run(AbstractChannelHandlerContext.java:611) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:164) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748)

KonstantinBelov008 commented 3 weeks ago

如果请求的url比较长,这个值该如何设置呢,或提前进行拦截,不让其报错 太长


If the requested URL is relatively long, how should this value be set, or intercepted in advance to prevent it from reporting an error? Too long

monkeyWie commented 3 weeks ago

@KonstantinBelov008 试试这个配置呢

config.maxInitialLineLength (8192);
KonstantinBelov008 commented 2 weeks ago

@monkeyWie 感谢大佬 config.setMaxInitialLineLength(8192); 已经解决长度问题, 另外那个channel日志报错的问题,java.nio.channels.ClosedChannelException 这个虽然不影响正常使用,但是会一直刷日志,容易把需要的信息错过了,这个大佬有什么思路吗


@monkeyWie thanks man config.setMaxInitialLineLength(8192); The length problem has been solved. In addition, the channel log error problem, java.nio.channels.ClosedChannelException Although this does not affect normal use, it will keep refreshing the logs, and it is easy to miss the required information. Does this boss have any ideas?