-
Notifications
You must be signed in to change notification settings - Fork 187
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
"cannot send more responses than requests" if connection is reset mid transfer #120
Comments
I'm seeing this as well. It doesn't break anything (apparently), but the console is being flooded by stack traces. |
it will consume a thread though, actually you could easily bring down a webbit server by repeatedly resetting connections. |
I'm currently invesitgating this. I'll issue a pull request when (if) I have a fix ready. |
Any news ? |
If there were any news they would appear right here in this issue :-) |
My apologies for not sharing this sooner, what I changed in wherget/webbit@298b570 doesn't quite catch all cases. It's still something to do with correcly avoiding unsolicited error resonses, but I haven't been quite able to pin down the exact situation where a channel is still writable but accepts no further replies (I'm thinking keep-alive, maybe ). Neither have I found a nice solution, and I keep thinking of using a ChannelLocal that tracks "demand for a response" as a last resort. |
Thanks alot :) I will check both |
I think I just stumbled across something, just jotting it down here until I have a creative Idea for a fix. |
I got the same problem. It looks like an IOException is thrown when the server wants to write the response. The server will then try to write an error response (some 5xx code) to the client, which in turn throws an IllegalStateExeption, which will cause the server to write an error response to the client, which in turn throws ... I have a workaround where I test for |
@chtheis, could you expand on that workaround? Where do you do that? |
Same as mine (298b570) I guess, but instead of |
Yes, the same as yours but with isOpen instead of isWriteable. |
And I think it is just a workaround. Somewhere deeper in the code a write to the channel fails and that write shall not trigger an error message to be sent to the client but drop the connection. But I couldn't pin down where that would happen, not even if it is in Netty or in Webbit. |
I don't think any fixes have been found for that one, but I have the same issue when I try to open a wss on a non-SSL initialized WebServer. It creates an absurd amount of those exceptions:
Those are definitely related, but I can't find a viable solution to this, i.e. catching the connection to the wrong port, and redirecting it, or at least dropping the connection. Edit: Same thing happens the other way around, when I try to connect to a secure WebSocket with a |
That's odd, webbit/webbit's snapshot still had the same issue. It might have been the change in netty's version. Anyway, it's working now, regardless of whomever I should be thankful to. 👍 |
No, those and other https://github.com/webbit/webbit/pulls requests wasn't merged, thus they are not in webbit's master. Apparently this project is abandoned and ignored completely. |
Waiting for fix |
I have the same issue, do you have any solution for this? 10:02:48,122 ERROR stderr org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0xdd66ffce, /192.168.251.35:12019 :> /172.17.4.172:8082] |
It's been over a year since there was a commit to master, webbit seems pretty dead |
This issue is with netty and can easily be fixed in your own fork: https://github.com/webbit/webbit/blob/master/src/main/java/org/webbitserver/netty/NettyHttpChannelHandler.java Webbit is dead, there are no new commits and pull requests are ignored. The source code is there so it's pretty much self-support right now. |
Same problem occurs when sending a few newlines. |
i got it too! |
Still getting this issue, it doesn't seem that anything is breaking though. |
I switched to Undertow (http://undertow.io/) if there are people here still searching an alternative. |
@RedShift1 thanks good to know! |
version 0.4.15
Steps to reproduce:
createWebServer(i)
.add(new StaticFileHandler([path])
.start().get();
curl [url] | dd of=/dev/null bs=[smaller than file size] count=1
The text was updated successfully, but these errors were encountered: