When is port 80 available?

I am a little confused about when a new Docker-based install of Discourse exposes port 80. Let me explain…

When I run ./discourse-setup I assume that the initial questions (host name, eMail address, etc) are all presented BEFORE the container is created and therefore before Discourse is exposing port 80. Is that correct?

If so, doesn’t that present a bit of a catch-22 when entering a host name?

I have created my A record (and it’s pingable, via host name). But port 80 is not open. I think I understand why, namely the container is not yet created.

But if that is the case, how can that initial verification of the host name ever work, if it’s verifying it before the container is created.

Obviously I have a bad assumption here so can someone please put me out of my misery?

Thank you.

1 Like

discourse-setup runs nc which opens the port for the test.

If you are running an OS that does not have nc installed that test will fail because of that. You can either confirm whether a missing nc is the problem or just assume that you know what you’re doing and it’ll just work.

3 Likes

Ah, got it.

Assuming I know what I am doing has generally been proven to be a poor choice! But I’m ignoring the warning now and ploughing on.

I’m suspect I am still going to come across an issue, since I assume nc should allow port 80 to be exposed (I have no firewall yet) but I will deal with that later.

Thank you again.

2 Likes

Well, that’s why it does those tests. But they only work for most people most of the time.

If you type nc at the command line and you get a command not found then you can assume that the test is broken (which doesn’t mean that your domain name resolves to your server and that the port is accessible).

2 Likes

I had this issue when I set up my first server and, irritatingly, the issue resolved itself after a few hours. That sort of issue often hints at a DNS replication issue, but I am using CloudFlare DNS (low TTL) and I can ping, through the host name, just fine.

The docker installation completed OK and nc is available.

docker ps suggests that both ports 80 and 443 are directed to the container.

sof -i -P -n reports that docker-pr is listening to both ports too.

I never figured out why this problem occurred with the first installation, but now it’s happened again I will drill down and troubleshoot. Haven’t figured it out yet but suspect it’s some basic plumbing.

Thanks again.

1 Like

Sounds like a DNS propagation issue.

Is the orange cloud on? If cloudflare is DNS only, you’re fine, but if it’s in the middle you won’t be able to make Let’s Encrypt work, which is the point of the test.

3 Likes

The Orange Cloud is off. I don’t want to bother you further with this, Jay. This is an interesting little troubleshooting challenge and I will figure it out.

Pretty certain it’s not DNS replication since I can access the site from numerous devices by host name (through WiFi, cellular, etc). I will report back here if/when this is resolved.

2 Likes