-
-
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
Non-existing domain with domain that resolves to IPv6 address #222
Comments
Hey @Rodeoclash, thanks for the report. I think we should support IPv6 out of the box. We are not doing anything in Redix to resolve addresses manually or anything. I don't have an easy way right now to play with IPv6 DNS addresses. Can you try playing around with Alternatively, do you have a minimal reproducing case using Docker or a well-known accessible address that I can use to easily reproduce this locally on my machine? Thanks! 💟 |
Sounds good. I'll dig in the next couple of days and see if I can identify how we might resolve it. If I can't get to the bottom of it I'll put together a test repo with |
@Rodeoclash that sounds great. Redix already has a |
Hmm, I think I have a workaround of sorts but I'm not sure how correct it is. Firstly, I can resolve the domain: :inet_res.resolve('vodon-redis.internal', :in, :aaaa)
{:ok,
{:dns_rec, {:dns_header, 4, true, :query, false, false, true, false, false, 0},
[{:dns_query, 'vodon-redis.internal', :aaaa, :in, false}],
[
{:dns_rr, 'vodon-redis.internal', :aaaa, :in, 0, 5,
{64938, 0, 14628, 2683, 3757, 0, 34021, 2}, :undefined, [], false}
], [], []}} However if I attempt to directly use the hostname with :gen_tcp.connect('vodon-redis.internal', 6379, [:binary, active: false])
{:error, :nxdomain} Likewise, if I use the IPv6 address as a binary with it :gen_tcp.connect('fdaa:0:3924:a7b:232f:54c4:a4a2:2', 6379, [:binary, active: false])
{:error, :nxdomain} However, if I use the IPv6 tuple then the connection is established :gen_tcp.connect({64938, 0, 14628, 2683, 3757, 0, 34021, 2}, 6379, [:binary, active: false])
{:ok, #Port<0.2111>}
So my work around could be to simply lookup the IPv6 address using Either way, not a Redix issue but a |
@Rodeoclash that's a super interesting find though, thanks for taking the time to share it and report back! I'm egoistically glad it's not a Redix issue 😉 |
For anyone else that finds this, my final configuration looked like this:
I couldn't use the URL parsing method but specify the options individually worked with aplomb. |
A quick (likely stupid) question that I couldn't find an answer for in the repo or Elixir community forums Does Redix support IPV6?
I'm attempting to connect to a Redis instance on fly.io and while I seem to be able to resolve the address:
# ping vodon-redis.internal PING vodon-redis.internal(fdaa:0:3924:a7b:ead:0:84e5:2 (fdaa:0:3924:a7b:ead:0:84e5:2)) 56 data bytes 64 bytes from fdaa:0:3924:a7b:ead:0:84e5:2 (fdaa:0:3924:a7b:ead:0:84e5:2): icmp_seq=1 ttl=62 time=39.4 ms 64 bytes from fdaa:0:3924:a7b:ead:0:84e5:2 (fdaa:0:3924:a7b:ead:0:84e5:2): icmp_seq=2 ttl=62 time=34.3 ms
and have connectivity to the Redis instance:
Things don't want to play nicely once I'm attempting to connect from within Elixir:
My naïve assumption would be to configure the connection as follows:
However I seem to be missing some nuance around passing the configuration to the underlying Erlang connection.
If I can get this resolved, happy to update your docs and also feed this back up to the Fly team to add to the page they have on configuring Redis 🙂
The text was updated successfully, but these errors were encountered: