Port 80/443 not accessible while installing Discourse

UPDATE: nmap and nc show that ports 80 and 443 are closed. Is that a problem for Discourse setup? I thought that just means that the port are open but there is no service listening on them. I expected Discourse setup to… you know… set up what’s required on those ports. I already have firewall rules to allow traffic on those ports so I don’t know how else to open them. Do I need services listening on those ports already in order to run the discourse setup (and how do I do that)?

< Original Post >

Hi, I’m new to Discourse, trying to run discourse-setup and I get the dreaded “Port 443 of computer does not appear to be accessible” and the “Connection to port 80 also fails” messages.

I know this is common and I’ve read many posts on this topic but none of the suggestions has worked. I have it in /var/discourse, I have curl installed, my DNS is set up, my firewall isn’t blocking, I’m not using Cloudflare etc.

I’m running Ubuntu 22.04 on an IPv6 VPS (no IPv4 address, but I’ve read that’s fine). The VPS has another nginx installed for future use but I have shut it down (along with all non-Discourse services) with auto-start disabled and restarted the server. My goal is to get Discourse running by itself on this server.

I can ping my VPS using my full subdomain (i.e. discourse.myvps.com) from both the VPS itself and my home machine, and my email provider verified my DNS settings for the email service. I’ve also added ufw rules to explicitly open ports 80 and 443 for both IPv4 and v6 traffic, and the rules show up properly with “ufw status”. My hosting company said they don’t block anything. And I don’t think I have to specify anything additional to reach the Discourse Docker container.

However, netstat does not show anything for those ports and NC returns “connection refused.” And telnet also returns “connection refused,” but I assume that’s because I don’t have any HTTP service running yet (doesn’t the Discourse installer take care of that?).

Any help appreciated, thanks!

PS. Happy to send any additional info, screenshots etc.

Maybe you have this sorted out already. If not, can you confirm that you are following this guide for installing Discourse: https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md#3-create-new-cloud-server? Also, make sure your server’s hardware and software meet the requirements that are outlined here: https://github.com/discourse/discourse/blob/main/docs/INSTALL.md.

I’m not the best person to answer your questions. In the past, after following the guide with a fresh Ubuntu 22.04 server, the setup has just worked for me without any additional configuration.

If you’re still having problems, someone from the community can probably help.

Thank you. Yes, I’m following that guide, my server has more grunt than it needs, all the pre-reqs installed cleanly and everything appeared to be going smoothly until I tried to run discourse-setup.

At some point I may just wipe the server clean and start over, but I’d prefer not to do that. And I suspect I’ll end up with the same problem again, seeing as I started this install process with a brand new server (the only thing I did differently was install some of the pre-reqs for something else, but none of that stuff is running now).

1 Like

Sounds like you’re doing the right stuff. You’re sure that your DNS resolves to your server IP and only there?

Oh. I can’t tell at quick glance whether discourse-setup look only at IPv4.

You might try running ./discourse-setup --skip-connection-test to skip the test.

1 Like

Thank you Jay - that worked and enabled me to proceed to the next error.

I’ll post that in a separate thread because it’s strange and not related to the current title: The git clone fails in discourse-setup, but I have a v6 proxy set up and it works if I just enter the same command at the command line.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.