我正在运行一个gRPC服务器,并且当客户端只是一个普通的虚拟客户端,但是当客户端运行在从Kafka进行轮询并发布的Kafka消费者应用中时,我能够发出请求并从服务器获得成功响应到gRPC服务器我得到以下异常。我无法在例外方面取得任何进展。任何帮助...
java.lang.AbstractMethodError: io.grpc.netty.NettyChannelBuilder$NettyTransportFactory.newClientTransport(Ljava/net/SocketAddress;Lio/grpc/internal/ClientTransportFactory$ClientTransportOptions;Lio/grpc/ChannelLogger;)Lio/grpc/internal/ConnectionClientTransport;
at io.grpc.internal.CallCredentialsApplyingTransportFactory.newClientTransport(CallCredentialsApplyingTransportFactory.java:49)
at io.grpc.internal.InternalSubchannel.startNewTransport(InternalSubchannel.java:266)
at io.grpc.internal.InternalSubchannel.obtainActiveTransport(InternalSubchannel.java:216)
at io.grpc.internal.ManagedChannelImpl$SubchannelImpl.requestConnection(ManagedChannelImpl.java:1510)
at io.grpc.internal.PickFirstLoadBalancer.handleResolvedAddressGroups(PickFirstLoadBalancer.java:59)
at io.grpc.internal.AutoConfiguredLoadBalancerFactory$AutoConfiguredLoadBalancer.handleResolvedAddressGroups(AutoConfiguredLoadBalancerFactory.java:150)
at io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl$1NamesResolved.run(ManagedChannelImpl.java:1385)
at io.grpc.SynchronizationContext.drain(SynchronizationContext.java:88)
at io.grpc.SynchronizationContext.execute(SynchronizationContext.java:120)
at io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl.onAddresses(ManagedChannelImpl.java:1391)
at io.grpc.internal.DnsNameResolver$Resolve.resolveInternal(DnsNameResolver.java:305)
at io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:214)
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)
2019-06-26T16:03:30.158 [grpc-default-executor-0] ERROR (ExportIocClient.java:178) - Exception while sending the request: INTERNAL: Panic! This is a bug!
2019-06-26T16:03:30.159 [grpc-default-executor-0] ERROR (LogExceptionTrace.java:16) - java.lang.RuntimeException: io.grpc.StatusRuntimeException: INTERNAL: Panic! This is a bug!
at com.panw.indigo.client.ExportIocClient$1.onError(ExportIocClient.java:179)
at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:434)
at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:700)
at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:398)
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:459)
at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:546)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:467)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:584)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at 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)
Caused by: io.grpc.StatusRuntimeException: INTERNAL: Panic! This is a bug!
at io.grpc.Status.asRuntimeException(Status.java:532)
... 19 more
Caused by: java.lang.AbstractMethodError: io.grpc.netty.NettyChannelBuilder$NettyTransportFactory.newClientTransport(Ljava/net/SocketAddress;Lio/grpc/internal/ClientTransportFactory$ClientTransportOptions;Lio/grpc/ChannelLogger;)Lio/grpc/internal/ConnectionClientTransport;
at io.grpc.internal.CallCredentialsApplyingTransportFactory.newClientTransport(CallCredentialsApplyingTransportFactory.java:49)
at io.grpc.internal.InternalSubchannel.startNewTransport(InternalSubchannel.java:266)
at io.grpc.internal.InternalSubchannel.obtainActiveTransport(InternalSubchannel.java:216)
at io.grpc.internal.ManagedChannelImpl$SubchannelImpl.requestConnection(ManagedChannelImpl.java:1510)
at io.grpc.internal.PickFirstLoadBalancer.handleResolvedAddressGroups(PickFirstLoadBalancer.java:59)
at io.grpc.internal.AutoConfiguredLoadBalancerFactory$AutoConfiguredLoadBalancer.handleResolvedAddressGroups(AutoConfiguredLoadBalancerFactory.java:150)
at io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl$1NamesResolved.run(ManagedChannelImpl.java:1385)
at io.grpc.SynchronizationContext.drain(SynchronizationContext.java:88)
at io.grpc.SynchronizationContext.execute(SynchronizationContext.java:120)
at io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl.onAddresses(ManagedChannelImpl.java:1391)
at io.grpc.internal.DnsNameResolver$Resolve.resolveInternal(DnsNameResolver.java:305)
at io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:214)
... 3 more
这是有关如何创建频道和存根的代码段
if (enableSslConnectionFlag) {
LOG.info("Establish HTTPS channel");
managedChannel = NettyChannelBuilder.
forAddress(this.grpcServerHost, this.grpcServerPort).
sslContext(this.sslContext).build();
} else {
LOG.info("Establishing HTTP channel");
managedChannel = ManagedChannelBuilder.
forAddress(this.grpcServerHost, this.grpcServerPort).
usePlaintext().build();
}
return managedChannel;
我目前已禁用ssl连接。