Hi all. I'm using @grpc/grpc-js
with TypeScript (target set to ES2017) and got errors like this:
node_modules/@grpc/grpc-js/src/server-call.ts:511:13 - error TS2794: Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'?
511 resolve();
I went to find the source code and seems the resolve()
is not correctly called here. Am I not using it properly, or this is just a bug? The last modification of this line is 7 months ago so I doubt if I am right...
I intend to create generic gRPC client in JAVA. The idea is to develop this gRPC client is to abstract out Caller from Callee Service.
gRPC client will have below Role :
gRPC client interface:
AbstractResponseObject invoke(AbstractStub abstractStub,AbstractResponseObject absRespObj , String methodName, Object[] args );
But I am facing lot of problem, as Stub underline uses other method as well.
and also proto does not support inheritance
All these things making hard to write a generic gRPC client, which takes abstract Stub / method name / arguments as an input and will call gRPC service internally.
Can someone please provide some guidance, how to proceed?
Could someone take a look at my question here? https://stackoverflow.com/questions/65433642/linking-imported-proto-file-in-cmakelists-txt
Basically, I am trying to write my CMake or Makefile so that it compiles all the headers for proto files, including imported ones. How can I modify the compile or build step to do this?
Im trying to use reflection but protobuf hates me currently. While using it, apparently i can't get the nested_type value of any kind?
I'm sure im trying to use the library incorrectly, but i am at a loss currently.
This is the function i wrote that works fine to get all the field names using reflection.
But i am unable to get any data.
The file i am working with is a protobuf serialized file.
io.grpc.internal.ChannelTracer#logger
, but even I add configuration of logback, it still have some logs not write by logback, like 一月 03, 2021 8:59:42 下午 io.grpc.netty.NettyClientHandler$FrameListener onPingAckRead
. How could I write all logs of grpc-java to logback.
public override async Task StreamRead(StreamRequest request, IServerStreamWriter<global::DataArrayPart> responseStream, ServerCallContext context)
{
// Note that the variable data contains the data to be sent.
int max_size = 1000_000;
int n = data.Length;
float[] arr = new float[max_size];
var da = new DataArrayPart();
da.TotalSize = n;
for (int i = 0; i < n - max_size; i += max_size)
{
System.Buffer.BlockCopy(data, 4 * i, arr, 0, 4 * max_size);
// Copy into the buffer fast
da.Data.Clear();
da.Data.Add(arr);
// Slow copy - but prevents extensive memory use.
//for (int k = 0; k < arr.Length; k++)
// da.Data[k] = arr[k];
await responseStream.WriteAsync(da);
}
// Send the last n - max_size elements. Not implemented.
}
Hi, is there any way we can distinguish between liveness and readiness in health check service in gRPC-java ?
Do we need to implement rpc check method to write custom logic in health check ,like if we need to check some external dependencies (DB connection / cache warm up) ?
Hello folks, would be happy if someone will advise
I'm trying to setup round-robin client-side load balancing for grpc-js. There is no documentation and I'm just cutting though the code trying to understand things. They seem to have it implemented but I can't understand how to enable it.
I also have a list of hosts to connect to instead of a single dns name the client expects. And as I see it does not work with ipv4://.. connection strings like I expected. So this is an another thing I'm in search of a workaround for.
What's the best starting point for troubleshooting dns resolution issues? I have a pretty tiny ruby script that instantiates a stub and tries to call a method on it. When I run it I get
C-ares status is not ARES_SUCCESS qtype=AAAA name=<my.dns.entry> is_balancer=0: Domain name not found
I can ping <my.dns.entry>
, if I use the IP address it resolves to when creating the stub, everything works as expected. I'm also able to make the same call using bloomrpc and everything works as expected.
Hi, I have a requirement of sending up to 100 concurrent requests, each request containing a payload size of 500KB. What are the tweaks I could do for best performance on server side , as well as client side. Our service is going to be load balanced by Kubernetes and there are at least 3 instances running. Client can choose to send multiple requests using Future Stub or it can do bi-directional streaming.
Any help would be appreciated!!
rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:9090: Connection refused
; How could I use Go to call gRPC directly.
And I used grpc-web to have a try, in sample the log like this, but not worked after write by myself , all dependencies is same, I want to known what printed the log pickfirstBalancer: HandleSubConnStateChange: 0xc01d1d0, CONNECTING
;
success log is:
INFO: 2021/01/12 21:45:56 parsed scheme: ""
INFO: 2021/01/12 21:45:56 scheme "" not registered, fallback to default scheme
INFO: 2021/01/12 21:45:56 ccResolverWrapper: sending new addresses to cc: [{ 0 }]
INFO: 2021/01/12 21:45:56 ClientConn switching balancer to "pick_first"
INFO: 2021/01/12 21:45:56 pickfirstBalancer: HandleSubConnStateChange: 0xc01d1d0, CONNECTING
INFO: 2021/01/12 21:45:56 pickfirstBalancer: HandleSubConnStateChange: 0xc01d1d0, READY
INFO: 2021/01/12 21:45:56 id:"1234"
INFO: 2021/01/12 21:45:56 NotFound invalid id [field_violations: ]
INFO: 2021/01/12 21:45:56 id:"0"
INFO: 2021/01/12 21:45:57 id:"1"
INFO: 2021/01/12 21:45:58 id:"2"
INFO: 2021/01/12 21:45:59 finished
fail log is :
INFO: 2021/01/12 21:35:21 [core] parsed scheme: ""
INFO: 2021/01/12 21:35:21 [core] scheme "" not registered, fallback to default scheme
INFO: 2021/01/12 21:35:21 [core] ccResolverWrapper: sending update to cc: {[{ 0 }] }
INFO: 2021/01/12 21:35:21 [core] ClientConn switching balancer to "pick_first"
INFO: 2021/01/12 21:35:21 [core] Channel switches to new LB policy "pick_first"
INFO: 2021/01/12 21:35:21 [core] Subchannel Connectivity change to CONNECTING
INFO: 2021/01/12 21:35:21 [core] Subchannel picks a new address "" to connect
WARNING: 2021/01/12 21:35:21 [core] grpc: addrConn.createTransport failed to connect to { 0 }. Err: connection error: desc = "transport: Error while dialing dial tcp: missing address". Reconnecting...
INFO: 2021/01/12 21:35:21 [core] Subchannel Connectivity change to TRANSIENT_FAILURE
INFO: 2021/01/12 21:35:21 [core] Channel Connectivity change to CONNECTING
INFO: 2021/01/12 21:35:21 [core] Channel Connectivity change to TRANSIENT_FAILURE
INFO: 2021/01/12 21:35:21 rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: missing address"
Hi, I have a requirement of sending up to 100 concurrent requests, each request containing a payload size of 500KB. What are the tweaks I could do for best performance on server side , as well as client side. Our service is going to be load balanced by Kubernetes and there are at least 3 instances running. Client can choose to send multiple requests using Future Stub or it can do bi-directional streaming.
Any help would be appreciated!!
Hello everyone. I am new to grpc ) Iam trying to build client-server apps on .net with gRPC Nuget. When i am trying to send requests locally everything is OK. But when i deployed server app on remote server i started recieving this error: StatusCode="Internal", Detail="Received RST_STREAM with error code 0". Can`t find anything on stackoverflow/git or anywhere else. Maybe i should check some network settings .. ?
Full error text:
Grpc.Core.RpcException: Status(StatusCode="Internal", Detail="Received RST_STREAM with error code 0", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {"created":"@1610633047.363000000","description":"Error received from peer ipv4:10.15.8.11:55655","file":"......\src\core\lib\surface\call.cc","file_line":1063,"grpc_message":"Received RST_STREAM with error code 0","grpc_status":13}
Grpc nuget version 2.34