You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Lokesh Jain (JIRA)" <ji...@apache.org> on 2018/11/27 08:13:00 UTC
[jira] [Created] (RATIS-434) StatusRuntimeException is thrown while
closing raft client and server
Lokesh Jain created RATIS-434:
---------------------------------
Summary: StatusRuntimeException is thrown while closing raft client and server
Key: RATIS-434
URL: https://issues.apache.org/jira/browse/RATIS-434
Project: Ratis
Issue Type: Bug
Reporter: Lokesh Jain
Assignee: Lokesh Jain
We use ManagedChannel#shutdownNow which cancels all the active streams and throws StatusRuntimeException.
{code:java}
org.apache.ratis.thirdparty.io.grpc.StatusRuntimeException: CANCELLED: cancelled before receiving half close
at org.apache.ratis.thirdparty.io.grpc.Status.asRuntimeException(Status.java:517)
at org.apache.ratis.thirdparty.io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onCancel(ServerCalls.java:272)
at org.apache.ratis.thirdparty.io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.closed(ServerCallImpl.java:293)
at org.apache.ratis.thirdparty.io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1Closed.runInContext(ServerImpl.java:738)
at org.apache.ratis.thirdparty.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at org.apache.ratis.thirdparty.io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
{code}
We should use ManagedChannel#shutdown and ManagedChannel#awaitTermination in order to close the channel properly.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)