fullstorydev / grpcurl

Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers
MIT License
10.91k stars 507 forks source link

endpoint:80/sub is not recognized in grpcurl #489

Open nptri opened 1 month ago

nptri commented 1 month ago

Hi, I have a service endpoint as endpoint:80/subgrpc when I pass in whole grpcurl as this:

grpcurl -d '{body}' -H 'authorization: Bearer jwtKey'  -plaintext endpoint:80/subgrpc service/serviceName

return log as:

Failed to dial target host "endpoint:80/subgrpc": dial tcp: lookup tcp/80/serviceName: unknown port

Did I wrongly pass anything into the command ?

gunters63 commented 5 days ago

I have the same problem, our grpc service is reversed-proxied behind a path /grpc (port 443). How can I access that?

gunters63 commented 5 days ago

Ah I think the reason is that we use grpc over HTTP/2 here so we can use REST paths. I guess grpcurl only support tcp.

gunters63 commented 5 days ago

This can maybe closed as duplicate of #149

nptri commented 4 days ago

@gunters63 that I'm not sure since I'm a QA, but in some script automation, I got some option to bypass by Node.js: DefaultAuthority Java: OverrideAuthority

Hope this help~