-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
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
Cannot connect to Server using IPv6 #271
Comments
Have you tried passing {Finch,
name: MyFinch,
pools: %{
default: [conn_opts: [transport_opts: [inet6: true]]]
}} |
Thanks for the info, I did in fact not see this option and it does what i want! I still believe however that this should be default behaviour, as many developers will not enable this option, leading to their applications not being compatible with IPv6-Only Environments. This then makes it a lot more annoying for anyone trying to deploy it. I also see no disadvantage to enabling this by default, as this has been the default in basically any other ecosystem for well over a decade, possibly event more than 20 years. I can also provide a quick PR if you want me to. |
This is a known issue with Erlang/Elixir. If you want a universal solution that attempts IPv6 first if there's an AAAA record you can include this dependency which will hijack |
Expected behaviour
Observed behaviour
{:error, %Mint.TransportError{reason: :nxdomain}}
{:error, %Mint.TransportError{reason: :enetunreach}}
Possible solutions
Try IPv6 first, if the hostname does have an AAAA record. If that fails with some kind of network error, try IPv4. The result of this check should probably be cached for performance reasons. A more complex, but also more robust solution would be to implement happy eyeballs, as specified in RFC 8305.
This issue seems very similar to benoitc/hackney#206, though hackney at least works properly in the first case. The hackney issue also goes into more detail on possible solutions.
The text was updated successfully, but these errors were encountered: