We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
localhost
The grpcurl client fails to work with the Rust tonic-based server on a Unix domain socket because the server expects an authority header.
grpcurl
tonic
% grpcurl -vv -d @ -plaintext -unix -protoset REDACTED/descriptor.bin REDACTED/service.socket REDACTED/Reverse <<EOM { "text": "Hello, world!" } EOM Resolved method descriptor: rpc Reverse ( .REDACTED.ReverseRequest ) returns ( .REDACTED.ReverseResponse ); Request metadata to send: (empty) Response headers received: (empty) Response trailers received: (empty) Sent 1 request and received 0 responses ERROR: Code: Internal Message: stream terminated by RST_STREAM with error code: PROTOCOL_ERROR
For example, I'm able to use the Swift gRPC client fine since it sets authority.
authority
Both tonic/h2 and kubernetes use localhost as the authority when using Unix domain sockets. The grpcurl client should as well.
h2
kubernetes
The workaround, however inconvenient, is to manually specify the authority as localhost:
% grpcurl -vv -d @ -plaintext -unix -protoset REDACTED/descriptor.bin -authority "localhost" REDACTED/service.socket REDACTED/Reverse <<EOM { "text": "Hello, world!" } EOM Resolved method descriptor: rpc Reverse ( .REDACTED.ReverseRequest ) returns ( .REDACTED.ReverseResponse ); Request metadata to send: (empty) Response headers received: content-type: application/grpc date: Fri, 26 Jan 2024 02:46:38 GMT Estimated response size: 15 bytes Response contents: { "text": "!dlrow ,olleH" } Response trailers received: (empty) Sent 1 request and received 1 response
The text was updated successfully, but these errors were encountered:
Seems reasonable. Maybe a patch to default authority to localhost for unix sockets if not otherwise specified?
Sorry, something went wrong.
Yes, something simple like that. I can take a look at doing that tomorrow.
Successfully merging a pull request may close this issue.
The
grpcurl
client fails to work with the Rusttonic
-based server on a Unix domain socket because the server expects an authority header.For example, I'm able to use the Swift gRPC client fine since it sets
authority
.Both
tonic
/h2
andkubernetes
uselocalhost
as the authority when using Unix domain sockets. Thegrpcurl
client should as well.The workaround, however inconvenient, is to manually specify the authority as localhost:
The text was updated successfully, but these errors were encountered: