Skip to content

Cannot connect to Server using IPv6 #271

@Kilobyte22

Description

@Kilobyte22

Expected behaviour

  • When connecting to a hostname with AAAA record, but no A record, from i host with IPv6-connectivity I would expect a connection via IPv6 to succeed, without needing additional configuration
  • When connecting to a hostname with both AAAA record and A record from a host without any IPv4 connectivity i would expect a connection via IPv6 to be established, without needing additional configuration

Observed behaviour

  • In first case: {:error, %Mint.TransportError{reason: :nxdomain}}
  • In second case: {: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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions