grpc / grpc/grpc-java

SafeMethodCachingInterceptor Half-closed without a request

Open
#9,310 5 comments 0 reactions 0 assignees View on GitHub
docs
Dominant language
Java
Stars
12.1k
Forks
4k
Avg merge
2d 17h
Merged PRs (30d)
37

Description

[SafeMethodCachingInterceptor.java](https://github.com/grpc/grpc-java/blob/master/examples/android/clientcache/app/src/main/java/io/grpc/clientcacheexample/SafeMethodCachingInterceptor.java)

16:42:31.306 [grpc-nio-worker-ELG-1-2] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0xa5392116, L:/10.173.96.176:59727 - R:/100.95.188.184:8090] INBOUND HEADERS: streamId=5 headers=GrpcHttp2ResponseHeaders[:status: 200, content-type: application/grpc, grpc-status: 13, grpc-message: Half-closed without a request, x-envoy-upstream-service-time: 5, date: Thu, 23 Jun 2022 08:42:31 GMT, server: istio-envoy] padding=0 endStream=true

My issue is that for every cached response I use, instead of reporting a grpc_client_status=OK I'm instead getting grpc_client_status=Internal with a message Half-closed without a request. I am assuming that this is coming from the server telling us that we started a call but then closed it early.

Is there a correct way to close out this request so that the server doesn't send us this error message? Right now my grpc client statistics make it look like an overwhelming number of our client requests are failing with an internal error, rather than succeeding.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.