Closed misiukevich-mifort closed 4 years ago
@misiukevich-mifort, grpcurl can make requests to local host just fine. That is almost exclusively how I use it, personally. Something else is going on.
For the first command, I don't quite understand why it failed. That command-line looks correct to me. What shell are you using? It is possible that the '{"id": 1}'
was not correctly intepreted as a single argument and possibly provided to grpcurl as two arguments ('{"id":
and 1}'
)?
Note that the last one works because it does not require a network connection: it is listing the services in the given proto sources.
I think you may need to do more troubleshooting for connectivity to localhost:3001
. Is it possible a firewall was blocking traffic (so instead of a quick "connection refused" error, grpcurl saw it as a black hole, only detecting an error after timeout)? Or maybe there's something wrong with the configuration of the server such that it accepts the socket, but then never actually does anything with it (e.g. fails to process requests and handle HTTP/2 preamble)?
You might try using curl
in HTTP/2 mode. It won't be easy to send a valid RPC (that's the point of grpcurl
after all 😄), but you should at least be able to see if it can even connect. (If it can connect, you'll likely get back a "405 Method Not Allowed", "501 Unimplemented", or "400 Bad Request" error from the server, depending on what command-line flags you used).
Hi, got a problem with sending request to my NestJs server with Transport.GRPC.
While this method is working corerctly