You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
Hi, sometimes we have Docker configured with ipv6 resolving, but Redis server is only listening on ipv4.
So redis_client would resolve ipv6, try to connect and fail with a pretty non-descriptive eaddrnotavail. After that people would try to do telnet localhost 6379 and it would work. They would try to do gen_tcp:connect("localhost", 6379, []). and it would work. But eredis would not work.
It would be much cleaner solution to just use gen_tcp:connect/3 logic and pass State#state.host as a first argument, without resolving it first.
If people really need to use ipv6, they could pass inet6 inside of SocketOpts.
The text was updated successfully, but these errors were encountered:
Alternatively, we can try both ipv6 and ipv4, like in this commit: arcusfelis@96a3848
But I doubt the code compexity introduced in this case would justify that.
We already have some complex code with not expected behaviour with get_addr/1.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi, sometimes we have Docker configured with ipv6 resolving, but Redis server is only listening on ipv4.
So redis_client would resolve ipv6, try to connect and fail with a pretty non-descriptive
eaddrnotavail
. After that people would try to dotelnet localhost 6379
and it would work. They would try to dogen_tcp:connect("localhost", 6379, []).
and it would work. But eredis would not work.eredis would basically do that behind the scene:
I doubt this code is even needed:
It would be much cleaner solution to just use
gen_tcp:connect/3
logic and passState#state.host
as a first argument, without resolving it first.If people really need to use ipv6, they could pass inet6 inside of SocketOpts.
The text was updated successfully, but these errors were encountered: