IllegalStateException from SimpleForwardingServerCallListener#onHalfClose

22 views
Skip to first unread message

matt.m...@lucidworks.com

unread,
Jan 8, 2018, 9:46:59 PM1/8/18
to grpc.io
Hi,

We have a pretty straight forward ServerInterceptor implementation that seems to randomly throw an IllegalStateException from its onHalfClose method, which is simply calling the original ServerCall.Listener (from next.startCall(...)) - the server then gets a CANCELLED result from the client, and the connection (long term bidi stream) is then lost.

What could be causing this? Is there a way to get more info from the logs?

Thanks,
- Matt

Btw, this is the exception we get from gRPC in the logs (grpc-netty-shadeddep-4.0.0-SNAPSHOT is just a shaded dep around netty):

io.grpc.StatusRuntimeException: CANCELLED
	at io.grpc.Status.asRuntimeException(Status.java:526) ~[grpc-netty-shadeddep-4.0.0-SNAPSHOT.jar:?]
	at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:385) [grpc-stub-1.6.1.jar:1.6.1]
	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:422) [grpc-netty-shadeddep-4.0.0-SNAPSHOT.jar:?]
	at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:61) [grpc-netty-shadeddep-4.0.0-SNAPSHOT.jar:?]
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:504) [grpc-netty-shadeddep-4.0.0-SNAPSHOT.jar:?]
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:425) [grpc-netty-shadeddep-4.0.0-SNAPSHOT.jar:?]
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:536) [grpc-netty-shadeddep-4.0.0-SNAPSHOT.jar:?]
	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) [grpc-netty-shadeddep-4.0.0-SNAPSHOT.jar:?]
	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:102) [grpc-netty-shadeddep-4.0.0-SNAPSHOT.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_111]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_111]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]

Eric Gribkoff

unread,
Jan 9, 2018, 2:23:47 PM1/9/18
to matt.m...@lucidworks.com, grpc.io
Can you provide the IllegalStateException that you're seeing? Is the exception coming from your ServerInterceptor implementation or from the delegate Listener?

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/7035f731-7766-4e7a-9b4b-f07b9d736303%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages