-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 in SessionHandler.checkRequestedSessionId() #9181
Comments
I have encountered the same exception |
Jetty 9 is at End of Community Support. Does this happen to you on Jetty 10 or Jetty 11? |
@halibobo1205 that is a weird looking stacktrace, are some parts missing? Can you describe how you are running jetty (standalone, embedded, etc etc), any particular configuration you have, what kind of request it was handling at the time, any logs around that time etc. Preferably a small project that reproduces the problem. Need more info. |
It looks like shadowserver is doing a scan visit, which happens once a day. |
@halibobo1205 what is the url of these requests? The only thing I can see in the code is that if there's something wrong with the url or maybe the request then we might return |
Hi, here is the log 00:47:32.222 DEBUG [qtp1483281450-50-acceptor-0@113711ef-ServerConnector@2ec59814{HTTP/1.1, (http/1.1)}{0.0.0.0:8090}] o.e.j.s.ConnectionLimit onAccepting (1+3) < 800 java.nio.channels.SocketChannel[connected local=/10.60.101.75:8090 remote=/64.62.197.40:24967] 00:47:32.224 DEBUG [qtp1483281450-1043] o.e.j.s.HttpConnection HttpConnection@66096513::SocketChannelEndPoint@3e956744{l=/10.60.101.75:8090,r=/64.62.197.40:24967,OPEN,fill=-,flush=-,to=0/30000}{io=0/0,kio=0,kro=1}->HttpConnection@66096513[p=HttpParser{s=CONTENT,0 of -1},g=HttpGenerator@a8521be{s=START}]=>HttpChannelOverHttp@7c220844{s=HttpChannelState@2221cc84{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=www.shadowserver.org:443,age=0} parsed true HttpParser{s=CONTENT,0 of -1} |
I have seen the same exception in our logs. Thanks for the log @halibobo1205, using this snippet it's trivial to reproduce the NPE against an embedded Jetty running in Spring Boot locally on port 8080: echo 'CONNECT www.shadowserver.org:443 HTTP/1.1
Host: www.shadowserver.org
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
Connection: keep-alive
Pragma: no-cache
Proxy-Connection: Keep-Alive
' | nc localhost 8080 |
Thanks, the log from @halibobo1205 was very informative. Investigating now. However remember that, if you're using jetty-9.4 that is EOL, so I'll be fixing the NPE in jetty-10 onwards. |
Jetty version(s)
9.4.49.v20220914
Java version/vendor
(use: java -version)
openjdk version "1.8.0_302"
OpenJDK Runtime Environment (build 1.8.0_302-b08)
OpenJDK 64-Bit Server VM (build 25.302-b08, mixed mode)
OS type/version
Linux 3.10.0-1160.36.2.el7.x86_64
Description
How to reproduce?
The text was updated successfully, but these errors were encountered: