grpc-spring-boot-starter icon indicating copy to clipboard operation
grpc-spring-boot-starter copied to clipboard

Shutdown Error

Open chsi13 opened this issue 7 years ago • 2 comments

I faced with this error :

[io-8080-exec-16] i.g.i.ManagedChannelOrphanWrapper : ~~~ Channel ManagedChannelImpl{logId=84545, target=172.30.44.194:6565} was not terminated properly!!! ~~~

  | Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.

Here the client-side code :

                   final Function<AbstractStub, T> runner) {
 ManagedChannel channel = ManagedChannelBuilder.forAddress(this.host, this.port).usePlaintext().intercept(interceptors).build();
 T t = runner.apply(stubSupplier.apply(channel).withDeadlineAfter(timeout, TimeUnit.MILLISECONDS));
 try {
    channel.shutdown().awaitTermination(5, TimeUnit.SECONDS);
    return t;
  } catch (InterruptedException e) {
     throw new IllegalStateException("Error happened during shutdown of validator gRPC channel", e);
  }
  }

is it the recommended way to close a channel ?

What about this issue ? : https://github.com/googleapis/gax-java/pull/628 any relation ?

Environment:

Spring boot : 2.1 Java 8 Runtime : Openshift

chsi13 avatar Jan 25 '19 08:01 chsi13

No remarks about this ?

I saw that I receive this error each time (as the client) I receive a statusruntimeexception

chsi13 avatar Feb 01 '19 18:02 chsi13

I have the same error. Have you solved it yet?

ducquyen2509 avatar Jul 03 '19 03:07 ducquyen2509