How to configure ipv4 / ipv6 settings

AI-generated summary

The discussion revolves around configuring IPv4/IPv6 settings on a Discourse server. fredrik initially reports an issue after a server update, where only ‘tcp6’ entries are listed for the ports Discourse is supposed to serve, causing problems due to lack of IPv6 support at home and missing AAAA DNS records.

rking suggests a rebuild using ./launcher rebuild app, which fredrik attempts, but encounters a “Could not resolve host: github.com” error. After debugging, fredrik is unsure how to proceed, and rking explains the launcher application’s behavior and suggests a potential DNS setup issue.

fredrik eventually finds a solution by configuring Docker’s DNS settings, as described in a thread on meta.discourse.org. The rebuild is then successful, and the site goes back up. However, fredrik remains confused about why only ‘tcp6’ ports are displayed by netstat.

Hi!
My site suddenly “disappeared” after my web host updated and restarted my server.
After some poking around, I did a ‘netstat’ and only ‘tcp6’ entries were listed for the ports that discourse were supposed to serve (and probably is serving).
This is a problem for a few reasons.

  1. I can’t display ipv6 sites at home
  2. My DNS records didn’t list my domain with an AAAA record.

I can solve 2) easilly, but 1) will have to be solved some time later, when my ISP blesses me with a proper connection.

How do I set up Discourse to host on either both ipv4 and ipv6, or ipv4 only?

Try a rebuild ./launcher rebuild app and see if it works again?

Hmm..

root@host:/var/discourse# ./launcher rebuild app
Ensuring discourse docker is up to date
Fetching origin
Discourse Docker is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 10 app
app
cd /pups && git pull && /pups/bin/pups --stdin
fatal: unable to access 'https://github.com/SamSaffron/pups.git/': Could not resolve host: github.com
0d20b665c7a9ed2b3df8c3f62138577659792168e07e95e4b5cb7a33d453ff84
FAILED TO BOOTSTRAP

This is weird… because I tried this three times, and it failed like this every time… however, if I just try to clone that given repo… it doesn’t have problems with that. It’ doesn’t help me though.

I don’t know how the launcher application works, so how do I debug this issue?
It’s obvious that github.com is actually resolvable from my machine, and that was my only lead.

The launcher application is starting a Docker container and then running the commands in the templates from inside. Do you have some special DNS setup on your VPS that isn’t getting auto-configured?

I found a solution in this thread here.

I looked up my DNS servers in resolv.conf, and put that in the configuration file for docker.
I don’t know why docker doesn’t use the same dns as the rest of the system by default?
What am I not understanding here?

Hmm… the rebuild worked, and the site went back up.
I don’t know why netstat only displays ‘tcp6’ ports… because I don’t think that’s what I’m browsing right now. I’m confused.