zotonic icon indicating copy to clipboard operation
zotonic copied to clipboard

Our ipv6 enabled check returns false on Ubuntu

Open mmzeeman opened this issue 8 years ago • 6 comments

My plain ubuntu dev machine has ipv6 enabled, but zotonic returns false on its ipv6 enabled check. This check tries to get the ipv6 address for localhost. But on Ubuntu it returns::

1> inet:getaddr("localhost", inet6).
{error,nxdomain}
2> inet:getaddr("ip6-localhost", inet6).
{ok,{0,0,0,0,0,0,0,1}}

Is this a ubuntu configuration error and should ::1 localhost be added to the hosts file? Or do we have to make a better ip6 enabled check?

mmzeeman avatar Mar 28 '16 09:03 mmzeeman

I think we can do an extra lookup as fallback. This check is a heuristic anyway.

mworrell avatar Mar 29 '16 07:03 mworrell

Hmm, other things go wrong when I check for ip6-localhost. Binding to any6 goes wrong later on then. Currently zotonic expects localhost to be an ip4 and ip6 name.

BTW Does anybody currently use zotonic in production with ip6?

mmzeeman avatar Mar 29 '16 08:03 mmzeeman

BTW Does anybody currently use zotonic in production with ip6?

That is irrelevant, all software should support IPv6.

Also, since I make a point out of our services being IPv6-enabled: yes, but since I stick everything behind haproxy, zotonic does not itself bind to v6 sockets for me.

CyBeRoni avatar Apr 06 '16 23:04 CyBeRoni

I was busy with the ssl issue, which of course also covers IPv6. I wanted to test this in practice on a real server. Because I don't have a big array of servers available I have to work with what I got. This is a Shuttle XS35V4 sitting behind a fritzbox at home on fiber-optics.

On my internal network it speaks IPv6, but for some reason I can't make it available on IPv6 on the external network. The configuration interface of the fritzbox uses IPv4 NAT and port-mapping terminology, which is a bit strange.

Anyhow, I was just wondering how well zotonic works on IPv6.

mmzeeman avatar Apr 07 '16 07:04 mmzeeman

Anyhow, I was just wondering how well zotonic works on IPv6.

I can set up a vm for you to try it with for a bit if you want.

CyBeRoni avatar Apr 07 '16 09:04 CyBeRoni

This doesn't seem to be a problem anymore on current systems?

@CyBeRoni or @mmzeeman can you confirm this?

mworrell avatar Aug 14 '19 16:08 mworrell