elixir-grpc / grpc

An Elixir implementation of gRPC
https://hex.pm/packages/grpc
Apache License 2.0
1.36k stars 210 forks source link

GRPC.Stub.connect doesn't work with an IPV6-only address #361

Open mwcampbell opened 2 months ago

mwcampbell commented 2 months ago

With grpc 0.8.1, if I pass an IPv6-only hostname to GRPC.Stub.connect, I get a timeout error. I know that the server is responding immediately to connections from other clients, so it looks like GRPC.Stub doesn't support IPv6.

v0idpwn commented 2 months ago

Does the alternative function where you can pass host and port separately works? I think the current logic that splits host/port from an address isn't capable of handling ipv6 addresses. But if you can't call connect(host, port, opts), the problem is worse because it means there are problems in other parts of the library too

mwcampbell commented 2 months ago

Unfortunately, that didn't work either.

To solve this, I switched to the Mint adapter, then added the following adapter options:

adapter_opts: [transport_opts: [inet6: true]]

In my testing so far, this works perfectly.