Discourse in Docker not listening on IPV4

I am taking a look at Discourse to see if it suits my needs. I’ve followed the instructions on the following and the installation seems to have gone OK, with one important exception.
https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md

After missing this initially (and spending too long noticing!), I observe that Discourse is listening on port 80 only on IPv6, not IPV4. I have no idea why. Here are the ports on which my droplet is listening.
https://www.screencast.com/t/Z0TLmd3mac

As far as I know, this indicates all that is open on this server, so it doesn’t look like Discourse is failing to listen on IPv4 due to a conflict.

Any idea what might be happening here?

Does your server have an ipv4 address? Who is the host?

Hello Steven. Yes, both* servers have IP addresses.

I say both because I originally tried this on DigitalOcean but, when investigating this has really poor support (they just told me to make sure I had the A record set up, even though I’d explicitly sent them a screenshot). So, I thought I would give this a shot on Vultr. Both installations appeared to go fine, have IP addresses (which I can ping OK) but Discourse isn’t listening for some reason.

It’s certainly stumped me.

Thanks again.

By the way, in case it’s relevant, the second link I included shows that other IPv4 ports are open.

Discourse definitely works on ipv4 via digitalocean.

What is your definition of not working over ipv4? Are you trying to access your site via the IP address? If that’s the case please note that this isn’t supported, a valid DNS entry is a prerequisite.

I am trying over the name I set up via the A record. Vultr support has told me that, for some reason, Discourse isn’t listening over IpV4 and the lsof command does seem to back that up, at least with my limited knowledge of that command.

Should I expect lsof to show IPv4 for port 80 (to Discourse)?

Strange one.

I can’t imagine what the problem might be.

I just created a droplet on DigitalOcean that includes ipv6. I ran discourse-setup (which now installs docker for you! I didn’t know that someone had made that change).

I created A and AAAA records. It works via the domain name (probably via ipv6). It’s also accessible via the IPv4 address (which redirects to the https domain name url) because Let’s Encrypt is enabled.

Well, I can’t explain this (which is always uncomfortable) but, on a him, I decided to just rebuild (discourse-setup)…and the issue is now resolved. I have no idea why/how that helped, particularly since I had this problem on both DigitalOcean and Vultr. But resolved it is.

Thank you both for your help.

3 Likes

I had an nginx error Expecting: TRUSTED CERTIFICATE

I did this and it worked

/var/discourse/launcher rebuild app

This thread can help also maybe ?

2 Likes