Questions tagged [grpc]

A general RPC (Remote Procedure Call) framework over HTTP/2, initially developed at Google. gRPC is a language neutral and platform neutral framework that allows users to write applications where independent services can work with each other as if they were native. It uses Protocol Buffers as the interface description language.

Links

Related Tags

6316 questions
11
votes
0 answers

gRPC is not working as expected in lamda function

I have grpc server and client implemented in nodejs. Server is running on 0.0.0.0:8080. Client can connect just fine when I test in local. But when I move client to aws-lambda function and invoke locally it does not work. Server does not get any…
mamur
  • 371
  • 4
  • 19
11
votes
3 answers

dial tcp 127.0.0.1:9091: connect: connection refused

I am using gRPC application and building a simple app. Below the files. syntax = "proto3"; option java_multiple_files = true; package com.grpc; message HelloRequest { string firstName = 1; string lastname = 2; } message HelloResponse { …
Sherlocker
  • 185
  • 1
  • 1
  • 12
11
votes
2 answers

Golang gRPC can't keep alive: the client connection is closing

Hi I'm trying to connect a gRPC client to the server but even though the connection is succesful I get the following error when querying it from the graphql resolvers. However if I dial directly from the resolver everything works so it has to do…
martin
  • 338
  • 1
  • 3
  • 5
11
votes
1 answer

How to add global exception handler for gRPC services in ASP.NET Core?

I'm writing gRPC services using ASP.NET Core using GRPC.ASPNETCore. I've tried to add an Exception Filter for gRPC methods like this services.AddMvc(options => { options.Filters.Add(typeof(BaseExceptionFilter)); }); or using the…
Dmitriy
  • 847
  • 17
  • 39
11
votes
1 answer

"The response ended prematurely" when connecting to insecure gRPC channel

I'm trying to establish a connection to an insecure gRPC server. I'm using gRPC for communication between two processes inside of a Docker container, that's why I don't need any encryption or strong authentication. The server behaves as expected and…
Marcus Wichelmann
  • 762
  • 1
  • 6
  • 18
11
votes
3 answers

Problem with gRPC setup. Getting an intermittent RPC unavailable error

I have a grpc server and client that works as expected most of the time, but do get a "transport is closing" error occasionally: rpc error: code = Unavailable desc = transport is closing I'm wondering if it's a problem with my setup. The client is…
harumphfrog
  • 187
  • 1
  • 1
  • 7
11
votes
0 answers

grpc unhandled exception StatusCode=Unknown when invoking a method generated from a proto file

I have a c# client and server and get an unhandled exception of type Grpc.Core.RpcException with Status(StatusCode=Unknown, Detail="Exception was thrown by handler.") when invoking the SendMessage function in client (generated from a proto file).…
julzzzz
  • 223
  • 1
  • 3
  • 9
11
votes
4 answers

How to write unit tests for your GRPC server in Python?

I would like to use Python unittest to write tests for my GRPC server implementation. I have found grpcio-testing package but I could not find any documentation how to use this. Let's say that I have the following server: import…
Mitar
  • 6,756
  • 5
  • 54
  • 86
11
votes
6 answers

Converting Protobuf3 with enum to JSON in Go

How can I convert grpc/protobuf3 message to JSON where the enum is represented as string? For example, the protobuf message: enum Level { WARNING = 0; FATAL = 1; SEVERE = 2; ... } message Http { string message = 1; Level…
michaelbn
  • 7,393
  • 3
  • 33
  • 46
11
votes
2 answers

pyinstaller No module named grpc

My goal is to build an executable using pyinstaller. The python script I am trying to build imports grpc. The following is an example that illustrates the problem called hello.py. import grpc if __name__ == '__main__': print "hello…
Andrew Dawson
  • 145
  • 1
  • 2
  • 8
11
votes
2 answers

How do i handle streaming messages with Python gRPC

I'm following this Route_Guide sample. The sample in question fires off and reads messages without replying to a specific message. The latter is what i'm trying to achieve. Here's what i have so far: import grpc ... channel =…
evilSnobu
  • 24,582
  • 8
  • 41
  • 71
11
votes
4 answers

Intercepting/Logging requests and Responses in GRPC

I'm developing a chat app using GRPC in which the server receives information from the client and sends it back out to all the clients connected to it. For this, I've used Saturnism's chat-example as a reference. I've replicated the code, the code…
Umer Farooq
  • 7,356
  • 7
  • 42
  • 67
11
votes
2 answers

gRPC server error handler golang

I want know about good practices with golang and gRPC and protobuf. I am implementing the following gRPC service service MyService { rpc dosomethink(model.MyModel) returns (model.Model) { option (google.api.http) = { post: "/my/path" body:…
own3dh2so4
  • 391
  • 2
  • 5
  • 17
11
votes
2 answers

gRPC in Java - Blocking/nonblocking stubs

I am attempting to create a java grpc client to communicate with a server in go. I am new to grpc so am following this tutorial gRPC Java Tutorial. In these examples they refer to blocking and nonblocking stubs which they appear to import from…
Dom Fraise
  • 360
  • 1
  • 4
  • 12
11
votes
1 answer

gRPC multiple services in cpp async server

I know there is an example helloworld program in gRPC source. However, being new to this, I don't understand how to write more than one async services in the server. The example here talks about spawning new instances of a class to handle SayHello…
damleak
  • 549
  • 1
  • 5
  • 20