You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firehose to gRPC sink job failure with error Uncaught exception in the SynchronizationContext. Panic! java.lang.IllegalStateException: Could not find policy 'pick_first'. #202
Closed
Shreyansh228 opened this issue
Nov 16, 2022
· 1 comment
Firehose to gRPC sink job failure with error Uncaught exception in the SynchronizationContext. Panic! java.lang.IllegalStateException: Could not find policy 'pick_first'.
Nov 14, 2022 5:57:37 PM io.grpc.internal.ManagedChannelImpl$2 uncaughtException
SEVERE: [Channel<1>: (127.0.0.1:6565)] Uncaught exception in the SynchronizationContext. Panic!
java.lang.IllegalStateException: Could not find policy 'pick_first'. Make sure its implementation is either registered to LoadBalancerRegistry
or included in META-INF/services/io.grpc.LoadBalancerProvider from your jar files.
at io.grpc.internal.AutoConfiguredLoadBalancerFactory$AutoConfiguredLoadBalancer.<init>(AutoConfiguredLoadBalancerFactory.java:92)
at io.grpc.internal.AutoConfiguredLoadBalancerFactory.newLoadBalancer(AutoConfiguredLoadBalancerFactory.java:63)
at io.grpc.internal.ManagedChannelImpl.exitIdleMode(ManagedChannelImpl.java:406)
at io.grpc.internal.ManagedChannelImpl$RealChannel$2.run(ManagedChannelImpl.java:972)
at io.grpc.SynchronizationContext.drain(SynchronizationContext.java:95)
at io.grpc.SynchronizationContext.execute(SynchronizationContext.java:127)
at io.grpc.internal.ManagedChannelImpl$RealChannel.newCall(ManagedChannelImpl.java:969)
at io.grpc.internal.ManagedChannelImpl.newCall(ManagedChannelImpl.java:911)
at io.grpc.internal.ForwardingManagedChannel.newCall(ForwardingManagedChannel.java:63)
at io.grpc.stub.MetadataUtils$HeaderAttachingClientInterceptor.interceptCall(MetadataUtils.java:74)
at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:156)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:142)
at io.odpf.firehose.sink.grpc.client.GrpcClient.execute(GrpcClient.java:59)
at io.odpf.firehose.sink.grpc.GrpcSink.execute(GrpcSink.java:38)
at io.odpf.firehose.sink.AbstractSink.pushMessage(AbstractSink.java:46)
at io.odpf.firehose.sinkdecorator.SinkDecorator.pushMessage(SinkDecorator.java:28)
at io.odpf.firehose.sinkdecorator.SinkWithFailHandler.pushMessage(SinkWithFailHandler.java:34)
at io.odpf.firehose.sinkdecorator.SinkDecorator.pushMessage(SinkDecorator.java:28)
at io.odpf.firehose.sinkdecorator.SinkWithRetry.pushMessage(SinkWithRetry.java:54)
at io.odpf.firehose.sinkdecorator.SinkDecorator.pushMessage(SinkDecorator.java:28)
at io.odpf.firehose.sinkdecorator.SinkFinal.pushMessage(SinkFinal.java:28)
at io.odpf.firehose.consumer.FirehoseSyncConsumer.process(FirehoseSyncConsumer.java:43)
at io.odpf.firehose.launch.Main.lambda$multiThreadedConsumers$0(Main.java:65)
at io.odpf.firehose.launch.Task.lambda$run$0(Task.java:49)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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:750)
Expected Behavior
A firehose job need to interact with gRPC API for the response.
The job is failing with the above mentioned error.
##Analysis:
In the current implementation, the gRPC client chooses default LoadBalancerProvider ('pick_first') and default NameResolverProvider(DNS). The implementation classes PickFirstLoadBalancerProvider and DnsNameResolverProvider respectively are missing.
We could able to solve the issue with the including implementation classes through service provider like creating META-INF/services folder and creating a file named io.grpc.LoadBalancerProvider with value as io.grpc.internal.PickFirstLoadBalancerProvider and create another file io.grpc.NameResolverProvider with value io.grpc.internal.DnsNameResolverProvider under it.
Also if we provide only one service provider io.grpc.LoadBalancerProvider and miss other, we are getting below error.
Failed to resolve name. status=Status{code=UNAVAILABLE, description=Failed to initialize xDS,
cause=io.grpc.xds.XdsInitializationException: Cannot find bootstrap configuration
Environment variables searched:
- GRPC_XDS_BOOTSTRAP
- GRPC_XDS_BOOTSTRAP_CONFIG
Java System Properties searched:
- io.grpc.xds.bootstrap
- io.grpc.xds.bootstrapConfig
at io.grpc.xds.BootstrapperImpl.bootstrap(BootstrapperImpl.java:101)
at io.grpc.xds.SharedXdsClientPoolProvider.getOrCreate(SharedXdsClientPoolProvider.java:90)
at io.grpc.xds.XdsNameResolver.start(XdsNameResolver.java:155)
at io.grpc.internal.ManagedChannelImpl.exitIdleMode(ManagedChannelImpl.java:412)
at io.grpc.internal.ManagedChannelImpl$RealChannel$2.run(ManagedChannelImpl.java:972)
at io.grpc.SynchronizationContext.drain(SynchronizationContext.java:95)
at io.grpc.SynchronizationContext.execute(SynchronizationContext.java:127)
at io.grpc.internal.ManagedChannelImpl$RealChannel.newCall(ManagedChannelImpl.java:969)
at io.grpc.internal.ManagedChannelImpl.newCall(ManagedChannelImpl.java:911)
at io.grpc.internal.ForwardingManagedChannel.newCall(ForwardingManagedChannel.java:63)
at io.grpc.stub.MetadataUtils$HeaderAttachingClientInterceptor.interceptCall(MetadataUtils.java:74)
at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:156)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:142)
at io.odpf.firehose.sink.grpc.client.GrpcClient.execute(GrpcClient.java:59)
at io.odpf.firehose.sink.grpc.GrpcSink.execute(GrpcSink.java:38)
at io.odpf.firehose.sink.AbstractSink.pushMessage(AbstractSink.java:46)
at io.odpf.firehose.sinkdecorator.SinkDecorator.pushMessage(SinkDecorator.java:28)
at io.odpf.firehose.sinkdecorator.SinkWithFailHandler.pushMessage(SinkWithFailHandler.java:34)
at io.odpf.firehose.sinkdecorator.SinkDecorator.pushMessage(SinkDecorator.java:28)
at io.odpf.firehose.sinkdecorator.SinkWithRetry.pushMessage(SinkWithRetry.java:54)
at io.odpf.firehose.sinkdecorator.SinkDecorator.pushMessage(SinkDecorator.java:28)
at io.odpf.firehose.sinkdecorator.SinkFinal.pushMessage(SinkFinal.java:28)
at io.odpf.firehose.consumer.FirehoseSyncConsumer.process(FirehoseSyncConsumer.java:43)
at io.odpf.firehose.launch.Main.lambda$multiThreadedConsumers$0(Main.java:65)
at io.odpf.firehose.launch.Task.lambda$run$0(Task.java:49)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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:750)
}
The text was updated successfully, but these errors were encountered:
Firehose to gRPC sink job failure with error
Uncaught exception in the SynchronizationContext. Panic! java.lang.IllegalStateException: Could not find policy 'pick_first'.
Expected Behavior
A firehose job need to interact with gRPC API for the response.
Steps to Reproduce
Write a simple gRPC API which expects two fields and gives back response as is.
Run a firehose job in local with below local properties which consumes data from local kafka and uses gRPC as sink.
java -jar build/libs/firehose-0.4.2.jar
The job is failing with the above mentioned error.
##Analysis:
In the current implementation, the gRPC client chooses default LoadBalancerProvider ('pick_first') and default NameResolverProvider(DNS). The implementation classes
PickFirstLoadBalancerProvider
andDnsNameResolverProvider
respectively are missing.We could able to solve the issue with the including implementation classes through service provider like creating META-INF/services folder and creating a file named io.grpc.LoadBalancerProvider with value as
io.grpc.internal.PickFirstLoadBalancerProvider
and create another file io.grpc.NameResolverProvider with valueio.grpc.internal.DnsNameResolverProvider
under it.Also if we provide only one service provider
io.grpc.LoadBalancerProvider
and miss other, we are getting below error.The text was updated successfully, but these errors were encountered: