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
gRPC client regression in case of non 200 HTTP response #90
Comments
Digging a bit more on the problem I found the following grpc-java pull-request that seem to address that problem grpc/grpc-java#7967 . But also that reported issue seems similar: grpc/grpc-java#7953 . |
grpc-java has backported the fix on 1.35.x branch and has just released a 1.35.1 , so that it is compatible with Netty 4.1.60.Final , that Vert.x 4.0.3 is depending on : https://github.com/grpc/grpc-java/releases/tag/v1.35.1 |
awesome
…On Fri, Mar 26, 2021 at 3:22 PM Laurent Vaills ***@***.***> wrote:
grpc-java has backported the fix on 1.35.x branch and has just released a
1.35.1 , so that it is compatible with Netty 4.1.60.Final , that Vert.x
4.0.3 is depending on :
https://github.com/grpc/grpc-java/releases/tag/v1.35.1
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#90 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABXDCSTT6V4S6FA5OJAVKTTFSKDVANCNFSM4ZK4MJXQ>
.
|
we had a similar issue with Vertx HTTP header implementation |
see #92 |
thanks for the investigation @laurentvaills can you check now it is fine with the snapshots ? |
@vietj In my pet example with Vert.x 4.0.4-SNAPSHOT it is working as before : I get the status UNAUTHENTICATED if the gRPC server answers with a 401. Thanks. |
I noticed that when upgrading my gRPC client from Vert.x 4.0.2 to 4.0.3, then it is not able to handle properly the HTTP responses with a status different than 200 (at least with status 401 and 403).
Indeed gRPC relies on HTTP/2 for its transport and before reaching the gRPC server, the gRPC request can go through multiple intermediaries (HTTP proxies). And such intermediary can check the incoming HTTP request and decide to forward it or to stop it by sending a plain HTTP response. The client then can map the HTTP status code to a gRPC one, as described on
https://grpc.github.io/grpc/core/md_doc_http-grpc-status-mapping.html .
The setup to reproduce is pretty simple:
With Vert.x 4.0.2 that works as expected: a
StatusRuntimeException
is raised and theStatus
attached to thisException
isUNAUTHENTICATED
. Here is the output:With Vert.x 4.0.3 that does not work so well:
StatusRuntimeException
is raised but theStatus
attached to thisException
isUNKNOWN
and we have the following traces:It seems that with Vert.x 4.0.3, the parsing of the HTTP/2 headers fail so the status default to
UNKNOWN
. So of course that has impacts when we have to take decision based on thatException
'sStatus
.After a few tries with forcing different versions of Netty, I found that this regression is coming in Netty 4.1.60.Final.
With Vert.x 4.0.3 but forcing Netty to 4.1.59.Final it is working fine.
Find attached the small test I use to emphasize this regression, it is fully based on the gRPC example you documented on : https://vertx.io/docs/vertx-grpc/java/ . See the class
Client
.vertx-grpc-example.zip
The text was updated successfully, but these errors were encountered: