-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Description
What version of gRPC-Java are you using?
1.79.0 (grpc-netty, Netty 4.1.130)
What is your environment?
- OS: Linux x86_64 (Ubuntu 24)
- Server: tonic (Rust gRPC, e.g. Dragonfly dfdaemon)
- Transport: Unix domain socket
What did you expect to see?
Successful gRPC calls over Unix domain socket, same as grpc-go.
What did you see instead?
io.grpc.StatusRuntimeException: INTERNAL: RST_STREAM closed stream. HTTP/2 error code: PROTOCOL_ERROR
Steps to reproduce the bug
- Run a tonic gRPC server on a Unix socket (e.g. Dragonfly dfdaemon at
/var/run/dragonfly/dfdaemon.sock). - Connect with grpc-java:
ManagedChannel ch = NettyChannelBuilder
.forAddress(new DomainSocketAddress("/var/run/dragonfly/dfdaemon.sock"))
.eventLoopGroup(new EpollEventLoopGroup())
.channelType(EpollDomainSocketChannel.class)
.usePlaintext()
.build();
// Any RPC call fails with PROTOCOL_ERROR- Same server works with grpc-go over the same socket.
- Same grpc-java client works if server is reached via TCP (e.g. socat proxy).
Additional context
strace: grpc-java sends :authority = socket path (/var/run/dragonfly/dfdaemon.sock). grpc-go sends localhost or empty for UDS. tonic uses hyperium/h2, which rejects non-RFC authority. See h2#487, tonic#742.
Workaround: socat TCP-LISTEN:50051,fork UNIX-CONNECT:/path/to/sock then connect to 127.0.0.1:50051.
Suggestion: Add overrideAuthority() (or similar) to NettyChannelBuilder for UDS, like grpc-go's WithAuthority("localhost").
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels