Skip to content
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 channel not shutdown properly when error occurs #1698

Open
rkrishnan2012 opened this issue Jun 26, 2023 · 1 comment
Open

gRPC channel not shutdown properly when error occurs #1698

rkrishnan2012 opened this issue Jun 26, 2023 · 1 comment

Comments

@rkrishnan2012
Copy link

Hello,

DefaultPluginManager currently creates a ManagedChannel inside tryInitPlugin, however if the call to initPlugin fails inside it, we don't ever call shutdown() on the created channel, so there's an error logged. It would be great if the channel is shutdown prior to the exception propagating up.

EVERE: *~*~*~ Previous channel ManagedChannelImpl{logId=1, target=[::1]:51216} was not shutdown properly!!! ~*~*~*
    Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
java.lang.RuntimeException: ManagedChannel allocation site
	at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.<init>(ManagedChannelOrphanWrapper.java:100)
	at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:60)
	at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:51)
	at io.grpc.internal.ManagedChannelImplBuilder.build(ManagedChannelImplBuilder.java:631)
	at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:297)
	at io.pact.plugins.jvm.core.DefaultPluginManager$tryInitPlugin$1.invoke(PluginManager.kt:887)

I'm on Pact JVM Core library 0.4.0

@Subhojit-Dey1234
Copy link

Yes I am also getting this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants