@lanodan I know you're definitely an ipv6 user -- what OS are you hosting on and have you confirmed that IPv6 connections are used for outbound federation traffic? I am curious if somehow my required config changes are FreeBSD-specific...
"And now it works?" -- hah, funny! It does not. Very strange. But then I remembered a requirement I always have to do for my Elixir/Phoenix projects is to change the Endpoint config to listen on IPv4 specifically: {0, 0, 0, 0}. The default is {0, 0, 0, 0, 0, 0, 0, 0} which fails.
Now that I have IPv6 enabled for the jail interface, this bind works. I'm not receiving traffic on IPv6, so it shouldn't be required... but it is!
If I bind Phoenix to IPv4 only I make ZERO outbound requests with IPv6 even though it could! How weird is that? It's not like Phoenix should be able to interfere with Gun, but somehow it does. I wonder if Phoenix tickles some internal Erlang/BEAM networking settings that is equivalent to modifying the erl_inetrc at runtime???
Either way, I need all 3 of these settings or it doesn't work.
@feld So now it works? Because it should work fine (as IPv4 used to drop at home and few people I know screwed up their IPv4 config but not their IPv6 one).
@lanodan nope, there's a lower level issue at hand here. The only way to get Erlang/Elixir to automatically prefer IPv6 by doing AAAA lookups for hostnames first is modify every library / HTTP client or hijack functions in the OTP inet module. Otherwise as long as there's an A record it's going to prefer that first because that's just how everything is written right now 😭
Add this to your Pleroma and magic happens. I'm currently using it.
@feld Isn't preferring IPv4 or IPv6 an horrible mess thanks to Unix getaddrinfo(3)?
At least I don't think Erlang is normally doing name resolution by itself (even though imho non-C languages should).
Add comment