Questions tagged [grpc-python]

Python implementation of gRPC: A high performance, open source, general RPC framework that puts mobile and HTTP/2 first.

gRPC is an open source remote procedure call (RPC) system initially developed at Google. It uses HTTP/2 for transport, Protocol Buffers as the interface description language, and provides features such as authentication, bidirectional streaming and flow control, blocking or nonblocking bindings, and cancellation and timeouts.

gRPC Basics - Python

401 questions
5
votes
0 answers

GRPC Python - Error received from peer ipv4

I am trying to call server method from client using GRPC but getting below error: Error received from peer ipv4 I tried to find a solution for this but its more than a day now and unable to figure out, please someone help. Any help is really…
Wamique
  • 59
  • 2
  • 5
5
votes
1 answer

grpc client dns resolution failed when trying to access grpc server on same network

I'm trying to call a GRPC server running on a .Net Core project from a Python client. When running against localhost:5001 it works fine, but running against the actual IP of the machine from within the same network like 192.168.1.230:5001 it doesn't…
Gurkmeja101
  • 592
  • 2
  • 9
  • 24
5
votes
1 answer

How to shutdown gRPC server from gRPC client in python?

I have a gRPC HelloWorld server running like shown in official getting started guide(https://grpc.io/docs/quickstart/python/). I now want to shutdown/terminate the server from the client, possibly by calling a server method. I know this can be…
Harsh Nagarkar
  • 697
  • 7
  • 23
5
votes
4 answers

maximum field number in protobuf message

The official document for protocol buffers https://developers.google.com/protocol-buffers/docs/proto3 says the maximum field number for fields in protobuf message is 2^29-1. But why is this limit? Please anyone can explain in some detail? I am…
5
votes
2 answers

keep track of the request queue in grpc server

GRPC server does queue the requests and serve them based on the maxWorker configuration which is passed when the sever starts up. How do I print the metric- number of items in the queue .? Essentially, I would like to keep track of the numbers of…
surya
  • 171
  • 2
  • 12
5
votes
1 answer

Rendezvous of RPC that terminated with (StatusCode.UNAVAILABLE, Socket closed)>

tensorflow-gpu 1.10.0 tensorflow-server 1.10.0 I have deployed a tensorflow server which serves several models. The client code is like client.py this and I call the predict function. channel = implementations.insecure_channel(host, port) stub =…
Yao Yingjie
  • 450
  • 1
  • 5
  • 17
5
votes
0 answers

grpc asynchronous bi-directional server (Java/Python)

Here is my scenario. The grpc server is an asynchronous sever which subscribes data from other source. Also it provides a subscribe function to its client, thus it could push the data to the grpc client once it receives data from other source. The…
diaosihuai
  • 151
  • 6
4
votes
1 answer

Reverse engineering .proto files from pb2.py generated with protoc

Is it possible to get proto files from generated pb2.py with protoc? Will be the same reverse engineering possible for gRPC?
4
votes
1 answer

python gRPC error: "error": "13 INTERNAL: Failed to serialize response!" when trying to return a repeated message instead of stream in a List Request

I have django REST API that I am trying to convert into gRPC. I followed the Django grpc framework guide and created the following files: models.py class Organization(models.Model): Org_name = models.CharField(max_length=100, unique=True,…
Hasan Gilani
  • 41
  • 1
  • 2
4
votes
1 answer

grpc import bug on arm linux system - ImportError: cannot import name 'cygrpc' from 'grpc._cython'

I'm trying to get a grpc (grpcio) service to run on an armv7 system running linux (openembedded poky). As our it-dep. doesn't allow us to connect our dev boards to our network/internet I'm ushin wheels to install grpcio (+six as it depends on it).…
Darki
  • 43
  • 1
  • 6
4
votes
1 answer

gRPC Node Js client: "Method not found"

I have a gRPC server implemented in python and I am calling an RPC from NodeJS but it gives an error "Method not found". When I call using the python client, the request is successful. stream_csv.proto syntax = "proto3"; package csv; service…
D14TEN
  • 337
  • 6
  • 15
4
votes
3 answers

Python secure channel gRPC 'ssl_transport_security.cc:1807] No match found for server name' on remote instance

I have a Debian GCP instance that I'm trying to run a Python gRPC server. My instance has a static IP and I'm trying to establish a secure channel between my remote instance (server) and a local client. I have generated self-signed OpenSSL…
Panos Filianos
  • 346
  • 1
  • 2
  • 18
4
votes
0 answers

Occasional gRPC unknown errors when running inside docker container

I am trying to connect with a gRPC server running inside a docker. However, I get the below errors sometimes: File "xxx/grpc/_channel.py", line 826, in __call__ return _end_unary_response_blocking(state, call, False, None) File…
pree
  • 2,297
  • 6
  • 37
  • 55
4
votes
1 answer

How to extend protobuf objects in python

I've defined a protobuf message that I'd like to create a wrapper/proxy/boilerplate/extension/anything for so I can add custom methods. The docs for protobuf say that you are advised not to inherit directly from the protobuf as under the hood, it's…
4
votes
1 answer

how python grpc client manage connections?

When exactly a grpc client create and close connections? I begin the code with: channel = grpc.insecure_channel('localhost:8888') stub = myservice_pb2_grpc.MyServiceStub(channel) Does declaring a channel creates a single socket for the entire…
user3599803
  • 6,435
  • 17
  • 69
  • 130
1 2
3
26 27