-
Notifications
You must be signed in to change notification settings - Fork 284
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
How can I debug a RST_STREAM with code PROTOCOL_ERROR response on an http2 stream? #3422
Comments
cc @jasnell |
Now is a great time to get a response to this before I tear my whole testing environment down. |
I want to add that I suspect that the root cause of the error in question is a bug in Node: I think Node may be rejecting some valid HTTP/2 traffic. But we cannot determine if that is the case or provide any details about that bug until we can determine exactly what it is that Node is rejecting. |
Anyone? Is the correct forum for submitting bug reports? |
Where is the appropriate place to get this filed as a bug so it will actually get looked at? |
Hey @murgatroid99, I'm looking into it, but, I can't reproduce it locally. Could you create a reproductible code? Also, what |
The question here is: if a Node server is closing an http2 session with a protocol error, how can I determine why the server sent it, or in other words, what protocol constraint was violated, so that whatever behavior is incorrect can be corrected? Or, alternatively, to determine that it is returning a protocol error incorrectly? Is |
It may provide that information. Those flags should not be enabled in production environments though. In fact, PROTOCOL_ERROR is used when a more specific code is not available, according to the RFC 7540 - RST_STREAM:
|
That is not what the quoted parts of the spec say. They describe specific situations in which a PROTOCOL_ERROR should be sent. They are also both referring to connection errors, which result in a GOAWAY with that code, not a RST_STREAM. The user who originally filed the issue said
|
I'm now attempting to migrate another project to the purejs grpc code (a
Of particular note, the 'clients' to the grpc service are all written in Also of note, with the
|
Well, I have tested the
Indeed, without a reproducible code, I can't help with this issue. At least, it sounds like a feature request to add a "cause" inside the error event. |
To reproduce the issue requires setting up k8s/csi or envoy in an appropriate fashion to invoke a grpc service backed by nodejs. It's possible but has a fair amount of setup to get to that state. I'll see if I can put a repo together that will simplify that a bit. Does node need to be built with debug symbols or anything of that nature to get the extra output? I tried that env var and didn't seem to see anything addition being spewed out, but I'll try again. |
OK, after some debugging I feel quite stupid (or I lost my mind somewhere along the way). I currently have 2 scenarios resulting in the envoy invoking grpc (this was the original issue)I'm not entirely sure what transpired here, but I have this working currently after realizing that the c-based
and
When I fired up This is very strange as reviewing the notes from last year it appears requests were actually making it to In short, the csi invoking over a udsThis is a new issue I've just bumped into while trying to use the
When using the So:
So, it seems there's something with processing the takeaways
|
As I said previously, without a minimal reproducible code, I'm not able to help. I know that some issues are very hard to reproduce easily, but, regardless of the http2 client, you should be able to reproduce it In any client. |
Sure. I’m going to attempt to address that but there are several other items that can be acted/commented upon in the mean time (catchable error, better descriptions, etc). The stack trace has actionable info as well no? |
OK, it's a bit messy because node v12 (I use
|
Not really, because I can't figure out what was the cause of the above error. The above code throws in v12, but, looks fixed in v16:
|
The trace above was running with v12? What am I doing wrong that makes it abort/exit before getting the rest of the output after the I’ll do further debugging but with v16 I’ve been getting the same behavior as v12 where it hits the error and exits (when the debug env var is set). If I can figure out how to make it not exit while spewing that debugging data I can possibly figure out what the error is from the k8s client. |
@travisghansen maybe some docker images + docker-compose would help here? |
There are docker images for the project, but I think we're pretty well at the bottom of it. It would be nice to have some mechanism to catch these. Looking around it appears to be a client issue and it's unlikely any changes will be made to
I have been able to confirm this is the exact issue hitting my k8s install now:
It's just a giant pain because there are so many clients accessing the same socket so we have to (im)patiently wait for the whole ecosystem to move along (which clearly isn't happening very fast) :( |
I take it we have no intention of surfacing these errors? |
We certainly have. Nonetheless, without a minimal reproducible code, we are not able to help. If you still are having issues, create a new issue as a feature request and ping me if you want. I'd be happy to help! |
Just to make sure we’re clear, I’m referring to the invalid header error being bubbled up (and any others that would sever the connection before hitting higher-level code). Are we referring to the same thing? |
Yes, It looks like a feature request, right? I'm assuming that you would like to get this information in the HTTP2 server somehow. |
I am trying to debug a scenario in which a Node server is responding to an http2 request with an RST_STREAM with the code PROTOCOL_ERROR. This is happening without calling any application code on the server side, so the response seems to be generated by the http2 module itself. Setting
NODE_DEBUG=http2
environment variable on the server just shows the following, which does not seem to show anything relevant:What else can I do to determine what protocol error the server is seeing to cause it to respond that way?
The text was updated successfully, but these errors were encountered: