这是我在configuration类中创建一个gRPC ManagedChannel的Spring:
@Configuration
public class CockroachDbConfig {
@Bean
public ManagedChannel getManagedChannel() {
return ManagedChannelBuilder.forTarget(CR_GRPC_SERVER)
.usePlaintext()
.build();
}
}
控制器方法如下:
@RestController
public class
我正在使用GRPC连接到一个服务。有时调用是成功的,有时是异常的Received unexpected EOS on DATA frame from server.失败。
我找不到原因。以下是打电话的代码:
public class LmServiceClientImpl implements LmServiceClient {
LMAttributeServiceGatewayGrpc.LMAttributeServiceGatewayBlockingStub lmAttributeServiceGatewayBlockingStub;
@Autowired
@Q
为什么不能在JMeter的BeanShell采样器之外运行这个原生Java gRPC客户端:
package at.fhj.swd.grpc.client;
import at.fhj.swd.grpc.CalcRequest;
import at.fhj.swd.grpc.CalcResponse;
import at.fhj.swd.grpc.CalcServiceGrpc;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
public class GrpcClient {
public sta
我正试图在Java中创建grpc服务客户端,其中服务器位于goLang中,并与https一起部署。当我试图实现非安全连接时,我不想通过证书。
public class testgrpc {
ManagedChannel channel ;
ServiceGrpc.ServiceBlockingStub blockingStub;
String host = "remotesecuredhost";
int port ="XXX";
@Test
public void testgrpc()
{
c
我们的通信超过了消息大小的默认限制:
Caused by: io.grpc.StatusRuntimeException: INTERNAL:
Frame size 4555602 exceeds maximum: 4194304.
If this is normal, increase the maxMessageSize
in the channel/server builder
这个限制可以增加,参见
在通道/服务器构建器上设置maxMessageSize()。
但是,在我们的代码库中实现修复时,我不清楚如何实现,因为并不是所有的Channel实现都有maxMessageSize
我正在尝试在OSGi包中使用JAVA gRPC。我使用的是maven和org.apache.servicsemx.bundles.grpc-1.30.2_1,它是从1.30.2_1的发布标签本地构建的。 OSGi包启动得很好,没有任何问题,但是在运行时,当创建了一个ManageChannel时,我得到一个java.lang.IllegalArgumentException: cannot find a NameResolver for localhost:4435异常。 堆栈跟踪的相关部分 java.lang.IllegalArgumentException: cannot find a N
当我使用来自和protoc的插件来为我的gRPC Greeter服务生成mypy存根时,我会得到一个关于泛型的错误。
下面是生成greeter_pb2_grpc.pyi文件的命令:
python -m grpc_tools.protoc --plugin=protoc-gen-mypy=`which protoc-gen-mypy` -Iprotos --mypy_grpc_out=grpc protos/greeter.proto
以下是greeter_pb2_grpc.pyi的内容
"""
@generated by mypy-protobuf. Do not e
我按照https://cloud.google.com/tasks/docs/creating-appengine-tasks中的描述创建任务 它在99%的情况下都有效,但有时我会得到以下异常: java.lang.RuntimeException: ManagedChannel allocation site
at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.<init> (ManagedChannelOrphanWrapper.java:103)
at io.grpc.interna