grpcurl icon indicating copy to clipboard operation
grpcurl copied to clipboard

endpoint:80/sub is not recognized in grpcurl

Open nptri opened this issue 1 year ago • 4 comments

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 ?

nptri avatar Oct 11 '24 02:10 nptri

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

gunters63 avatar Nov 13 '24 14:11 gunters63

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 avatar Nov 13 '24 15:11 gunters63

This can maybe closed as duplicate of #149

gunters63 avatar Nov 13 '24 15:11 gunters63

@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~

nptri avatar Nov 14 '24 05:11 nptri