Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException #285

Open
liuhulu opened this issue Sep 18, 2023 · 2 comments
Open

java.lang.NullPointerException #285

liuhulu opened this issue Sep 18, 2023 · 2 comments

Comments

@liuhulu
Copy link

liuhulu commented Sep 18, 2023

[beforeCatch,31] - Proxy error:Cannot invoke "com.github.monkeywie.proxyee.intercept.HttpProxyInterceptPipeline.beforeRequest(io.netty.channel.Channel, io.netty.handler.codec.http.HttpContent)" because the return value of "com.github.monkeywie.proxyee.handler.HttpProxyServerHandler.getInterceptPipeline()" is null
java.lang.NullPointerException: Cannot invoke "com.github.monkeywie.proxyee.intercept.HttpProxyInterceptPipeline.beforeRequest(io.netty.channel.Channel, io.netty.handler.codec.http.HttpContent)" because the return value of "com.github.monkeywie.proxyee.handler.HttpProxyServerHandler.getInterceptPipeline()" is null
at com.github.monkeywie.proxyee.handler.HttpProxyServerHandler.channelRead(HttpProxyServerHandler.java:195)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:833)

@liuhulu
Copy link
Author

liuhulu commented Sep 18, 2023

本地windows7没有出现过这个问题,jdk17.0.8
服务器CentOS Linux release 7.9.2009 (Core) 上出现了这个问题。jdk17.0.2

proxyee 1.7.6

复现步骤
curl -i -x ip:port -U x:x https://www.baidu.com 第一次可以正常请求

curl -i -x ip:port -U x:x https://www.google.com 第二次 异常
curl: (56) Recv failure: Connection was reset

curl -i -x ip:port -U x:x https://www.google.com 第三次报以上错误
curl: (56) Proxy CONNECT aborted


This problem has not occurred in local windows7, jdk17.0.8
This problem occurs on the server CentOS Linux release 7.9.2009 (Core). jdk17.0.2

proxyee 1.7.6

Reproduction steps
curl -i -x ip:port -U x:x https://www.baidu.com The first request can be made normally

curl -i -x ip:port -U x:x https://www.google.com Second time exception
curl: (56) Recv failure: Connection was reset

curl -i -x ip:port -U x:x https://www.google.com The above error is reported for the third time
curl: (56) Proxy CONNECT aborted

@liuhulu
Copy link
Author

liuhulu commented Sep 18, 2023

补充,局域网内没有问题,使用公网IP代理就有这个问题。


Supplement, there is no problem in the LAN, but there is this problem when using the public IP proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant