IPv6 Git clone fails in discourse-setup, but works on the machine?!?

AI-generated summary

The user nottoobright is experiencing an issue with discourse-setup failing to clone a Git repository due to an inability to resolve github.com on a Ubuntu 22.04 VPS with only an IPv6 address. Despite being able to ping and clone the repository manually, the issue persists when running discourse-setup. Initially thinking it was not an IPv6 problem, nottoobright and pfaffman discuss possible causes.

Mcwumbly suggests that Docker may not be configured for IPv6, referencing a known issue with Docker on IPv6-only systems related to the lack of NAT. This issue is described in a GitHub repository.

Nottoobright confirms that adding a v4 address to the VPS resolves the issue. Pfaffman notes that some large Discourse hosting companies use IPv6 extensively and acknowledges that NAT issues with IPv6 may be a common problem.

My discourse-setup is failing on a Ubuntu 22.04 VPS with the following error:

fatal: unable to access https://github.com/discourse/discourse.git/: Could not resolve host: github.com

My VPS has only an IPv6 address, but I’m using Dan Win’s github IPv6 proxy: I can ping github.com, I successfully cloned discourse_docker.git, and I can clone the exact same discourse.git from the command line on the same VPS. But when the same command is executed by discourse-setup, it cannot resolve github.com and fails.

A previous post recommended setting mtu=1400 in my docker.service file, which I did, but it didn’t change anything.

I first assumed this was an IPv6 problem, but the fact that my VPS can access github and clone the package has me confused… I don’t know what the setup is doing differently. I wish there were some way to tell discourse-setup that github.git is already on the server or just to use the server’s default settings that worked.

I’m guessing that docker isn’t configured for IPv6

I’ve hit issues with Docker on IPv6 only systems in the past related to the lack of NAT, since Docker often uses IP addresses that are only accessible from the host but NAT is not automatically configured by Docker for IPv6.

This repo’s readme describes that problem more fully: GitHub - robbertkl/docker-ipv6nat: Extend Docker with IPv6 NAT, similar to IPv4 · GitHub

Yep, you guys nailed it - it was indeed a v6 problem because Docker doesn’t like v6. Added a v4 address to the VPS and everything worked.

Thanks

I heard that there is a Really Big Discourse hosting company that makes extensive use of IPv6 in their infrastructure.

But NAT sounds like a likely issue. I’ll keep that in mind next time I muck about with IPv6.