grpc icon indicating copy to clipboard operation
grpc copied to clipboard

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

Open mwcampbell opened this issue 1 year ago • 2 comments
trafficstars

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.

mwcampbell avatar Apr 29 '24 17:04 mwcampbell

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

v0idpwn avatar May 03 '24 12:05 v0idpwn

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.

mwcampbell avatar May 03 '24 14:05 mwcampbell