0

New to grpc, I just spent half an hour debugging an UNIMPLEMENTED error that seems to be a missing implementation of a method on the server-side.

But it turned out to be that the port specified (50051 as the example said) was unavailable. Switching to a different port on both server and client sides solves the problem.

However, this begs a better solution because we can't ask every rpc call to hardcode a port number. What would be the best practice?

I've consulted this question but couldn't get a sure answer for a bulletproof solution.

Thanks in advance!

kakyo
  • 10,460
  • 14
  • 76
  • 140
  • What here do you see as being specific to gRPC? Any client-server interaction over any TCP-based protocol requires that the server serve on a port, and that the client knows what port that is so that it can make the request. The only particular consideration here is that there is no standardized gRPC port, but that is true of other protocols too. – murgatroid99 Jun 07 '21 at 21:34
  • Good point about the universal problem. But with gRPC, underlying TCP/UDP is transparent, so I'm wondering if gRPC framework already has a pain-free pattern for this. @murgatroid99 – kakyo Jun 08 '21 at 02:14
  • It's still the same basic issue. The server needs to bind a port, and the client needs to connect to that same port, and since the port already needs to be known in order to establish communication within that protocol, the method for ensuring that the client knows what port to use is necessarily outside of that protocol. – murgatroid99 Jun 08 '21 at 02:17

0 Answers0