Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Daven Du
    @davendu

    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...

    John Howard
    @howardjohn
    Can someone point me to where I can report a potential security vulnerability? The only option I am seeing is a public github issue. Its probably not a major issue, "just" a crash
    3 replies
    Kamal Sharma
    @kmlsharma53

    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 :

    1. which will create channel for all downstream RPC methods on initialization
    2. will expose an invoke method, which will be used by Caller to invoke gRPC service

    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.

    1. Like method use to fetch MethodDescriptor
    2. 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?

    1 reply
    George
    @lilosg
    hi all
    have install google-ads-php that requires grpc. have tried to call api endpoints that worked without grpc enabled and i am not receiving any response. My environment is wsl2 ubuntu and I believe it has something to do with grpc under wsl2
    1 reply
    by saying "not receiving any response" I mean that the function is called but never finishes running unless i force stop the execution
    HelloWood
    @helloworlde
    What event could I listen in a RPC with Java, now I found this:
    Client: ClientCall, ClientCallListener, ClientStreamTracer
    Server: ServerCall, ServerCallListener, ServerStreamTracer, ServerTransportFilter
    does there have any others extendible listener or interceptor or filter in client or server side?
    1 reply
    Eric Smith
    @smeeeth

    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?

    HelloWood
    @helloworlde
    gRPC Request Event.png
    1 reply
    I drawed a picture of gRPC request event in Java, could someone help to make is it right and missed something?
    AKCore
    @AKCore
    Ok i know this isn't a specifically gRPC related question but has to do with protobuf and there is where my searches lead me.
    AKCore
    @AKCore

    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.

    https://hatebin.com/qrlpuqvkjq

    4 replies
    yejianfeng
    @jianfengye
    test
    Dexter Park
    @ddexterpark
    Hello everyone. I use gRPC in the context of cloud hosted microservices. In terms of security controls, what are some patterns for securing publicly facing HTTP/2 endpoints? I am looking for additional security controls that are similar to how REST APIs are secured with Web Application Firewalls. Thanks in advance!
    9 replies
    George Teo
    @georgeteo
    Does gRPC team still maintain https://performance-dot-grpc-testing.appspot.com/explore?dashboard=5636470266134528? Dashboard looks empty to me.
    1 reply
    Zeks
    @Zeks
    guys, I am at my wits end, can anyone help me set up grpc through kubernetes? I've been reading manuals for 1.5 days and nothing helps
    specifically I need to access service in a localhost installation
    basically a singlenode setup
    I just don't understand how to properly route traffic through ingress in this case
    the pod with grpc service itself is working and I can route traffic through port-forward which verifies the service is alive but it's unworkable bc port forward dies with the container, I absolutely need ingress routing and I have no idea how
    HelloWood
    @helloworlde
    Hi, I want output gRPC library log to logback, and I found finally it all logs write by 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.
    1 reply
    Siddharth Kulkarni
    @sidcool1234
    Hello good ppl. A newbie here.
    Where should I post a question related to grpc js node issues?
    Kamal Sharma
    @kmlsharma53
    Hi, is there any way we can distinguish between liveness and readiness in health check service in gRPC-java ?
    1 reply
    AndersGarpebring
    @AndersGarpebring
    Hi I want to use gRPC to steam large arrays from c#. But I run into the issue that the c# code create a lot of temporary buffers that the GC is very slow to clean.
    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.
    }
    Basically this is the core of the server side. da.Data is a repeated float field and if I want to copy into it fast I need to Clear and Add. But this means that a new buffer is allocated for each package causing very large memory use.
    AndersGarpebring
    @AndersGarpebring
    So my main question, is there a better way of doing it?
    Kamal Sharma
    @kmlsharma53

    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) ?

    deveshbajaj59
    @deveshbajaj59
    Hi guys I am new to grpc
    I am trying to build a prediction service with grpc in python,
    when I am making multiple concurrent calls to the server, the effective time to complete is cumulative.
    i.e a single call takes 12 sec
    when 10 parallel calls are made each call is taking about 90-100 sec
    1 reply
    can anyone point me in the right direction to look for, and the Prediction model is of spacy ( which internally uses threads internally )
    HelloWood
    @helloworlde
    Hi, guys, I found document of TLS Authentication, support only security for Server, or security both client and server; For self signed cert, both client and server need configure cert; For cert signed by trusted CA, only server need configure cert, and client need access port 443/8443, does that right?
    1 reply
    HelloWood
    @helloworlde
    How could I call a method by reflection service, I found this service provided description of services and methods, but I didn't found how to execute generic call method in Java or Go.
    2 replies
    raboof
    @raboof:matrix.org
    [m]
    @helloworlde: not sure how hard to read the grpcurl code is, but they do that in go (https://github.com/fullstorydev/grpcurl)
    1 reply
    Egor Borisov
    @ehborisov

    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.

    3 replies
    Roman
    @r0manarmy

    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.

    19 replies
    nehalshah50
    @nehalshah50

    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!!

    Jonathan Zernik
    @yzernik

    What's the best way to get the IP address of the client in a gRPC Python server? I am using context.peer() but it returns something with format: 'ipv4:49.123.106.100:44420'

    Should I just parse the IP address from this string?

    Richard Belleville
    @gnossen
    @yzernik Yes, context.peer() is the only way to get that information. You'll want to parse that string.
    Patrick Rice
    @price2_gitlab
    What are the differences between @grpc/grpc-js and grpc-web? Does @grpc/grpc-js not work in the browser?
    2 replies
    HelloWood
    @helloworlde
    Does anyone known how to call gRPC server in webassemly? I tried call directly in Go, but failed with 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.
    1 reply
    HelloWood
    @helloworlde

    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"
    Patrick Charles Höfer
    @xetra11
    Can I ask questions about google gRPC gradle plugin in here, too?
    1 reply
    nehalshah50
    @nehalshah50

    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!!

    1 reply
    foreverchaos
    @foreverchaos
    hi, team, for grpc python, how can I serialize ServiceDescriptor object, or is there a way to convert from ServiceDescriptorProto obj to ServiceDescriptor?
    deveshbajaj59
    @deveshbajaj59
    Hi guys, I am new to grpc
    Just want to confirm, can we just invoke grpc method and don't wait for it returns.
    like a remote task execution
    Patrick Charles Höfer
    @xetra11
    @deveshbajaj59 well it's an RPC so it should be able to do exactly that
    Remote Procedure Call = Remote Task Execution somewhat :P
    Aleksey
    @wowbios

    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

    Aleksey
    @wowbios
    https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-10/http2-on-iis
    Maybe this is the problem. Windows server 2012 r2 doesn`t support http2