Can't connect - new installation on DO

AI-generated summary

A user, kwest, struggled to connect to a newly installed Discourse on Digital Ocean, experiencing connection issues during two attempts. In the first attempt, using the official GitHub guide, the installer failed due to missing Docker, which was then installed. After a seemingly successful setup, the site couldn’t be accessed via the subdomain or IP, even with DNS propagation. In the second attempt, using a DO one-click install, the setup appeared to complete successfully, but the site remained unreachable. The user was advised by Canapin and pfaffman that the 1-click install is unsupported, and that DNS propagation and proper domain resolution are critical. They suggested starting fresh with a new subdomain, ensuring DNS resolves correctly, and using the official installation guide. The user followed this advice, created a new droplet and subdomain, and successfully got Discourse running. The user also suggested adding troubleshooting tips to the official installation guide, which pfaffman acknowledged could be useful, noting that the current guide lacks such information. kwest, Canapin, pfaffman, kwest, pfaffman

I’ve just made two attempts to install Discourse on Digital Ocean.

Try 1:

The first try, I used the official Github instructions using a DO Ubuntu 22.04 LTS image, 1GB droplet.

I used a subdomain of an existing domain and credentials from an existing Mailjet account that’s been working fine for years.

I didn’t know I needed to install Docker, so when I typed

discourse-setup

the installer said

Failed to find docker or docker.io on your PATH.

and I pressed Enter to go ahead and install Docker.

After that, the install SEEMED to run fine.

It ended with

117:M 25 May 2023 01:14:46.500 * DB saved on disk
117:M 25 May 2023 01:14:46.501 # Redis is now ready to exit, bye bye...

and a few additional lines.

I wasn’t sure how quickly DNS would propagate, so I entered the DO IP in my /etc/hosts file .

I tried pointing my browser at my subdomain URL ; I got “Can’t connect to the server”.

I tried pointing my browser at the IP address; I got “Can’t connect to the server”.

So I tried another attempt.

Try 2:
I followed the instructions at linuxhandbook to use a DO one-click install from the Marketplace tab, which gave me a 2GB Droplet.

After logging in via ssh, the installer ran automatically, and seemed to run with no problems. At the end, it said

Discourse is now installed. Log into your admin account in a browser to continue configuring Discourse.

But again, when I tried pointing my browser to my subdomain URL or to the (new for this second droplet) DO IP address, my browsers can’t connect (I’ve tried Firefox and Safari).

running

./launcher start app

shows

x86_64 arch detected.
cadd91ccd0cd
Nothing to do, your container has already started!

discourse-doctor shows (among other things)

Discourse container app is running

and gives the correct

DISCOURSE_HOSTNAME

What can I try to get this install (either or both of them) to respond to my browser?

(The second IP address is still in my hosts file, but it has ALSO propagated according to DNS checkers, so it seems like it should work from either the subdomain URL or just the IP address.)

Thanks for any help.

I few more details:

As far as I know, I don’t have any kind of control panel for either droplet (no Plesk, no cPanel).

Ordinarily on a typical shared hosting setup, I would go into public_html and create a simple test file like testfile.html to see if I could at least get a flat HTML file to load, but I don’t know where to do that (or if I even can do that) on a DO droplet.

If ./discourse-setup went well, then it means that it have been able to resolve your domain, so there’s nothing to do about that. The propagation has already been done for your server at this point.

Note that the 1-click Digital Ocean Discourse install is an unsupported-install, which mean you’re less likely to find support here. :slight_smile:

I’d suggest starting from scratch and use the standard install.

  1. Create a droplet

  2. Log in via SSH

  3. Run ping yourdomain.com and see if it resolves to your server’s IP (./discourse-setup will show a warning if it doesn’t anyway).

    • If it doesn’t, wait until it does.
  4. When it does, install Discourse using the official guide discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub

Please report back :slight_smile:

Of course, I’m not an expert, and maybe someone will be able to pinpoint your current issue.

There is no need to do that and it won’t help. As said above, discourse-setup will do a test to see that it can talk to itself using the host name. If you edited /etc/hosts before you ran discourse setup then dns didn’t work and you didn’t get a certificate from let’s encrypt and that’s why the web server won’t start up. If you try enough times you’ll get rate limited and need to wait a week or use a different subdomain.

You call look at /var/discourse/shared/logs/var-log/nginx/access.log (or something very much like that) to see the problem.

Easiest thing at this point is to use a new subdomain, set up dns, wait for it to propagate (there are tools that will show you) and then run discourse-setup.

Thanks to both of you for the replies.

I created a new subdomain and a new droplet and used those for a third attempt, and everything’s up and running now.

When I ran ./discourse-setup during my first try, I didn’t see any indication in the output that there was any problem with the domain or SSL; it’s possible there was an error reported and I just missed it, but if so, it might be nice to make that kind of error notification more obvious.

I’m glad to have my new Discourse set up and running. Thanks again for helping out a newbie.

Would it be possible to add a section to discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub with Troubleshooting Tips, and if so, could I help contribute to that?

It stops dead. You’d not have missed it. My guess is that you cleverly solved the problem with /etc/hosts which satisfied the script, but not let’s encrypt when it went to get a certificate. discourse-setup is a shell script, and it’s designed for the most novice of users, so it’s tests are rather naive.

Maybe see the standard install topic?

EDIT: Well, there’s not much there.

What troubleshooting advice do you want to add? I think there are some clues there. Guessing that someone will create an /etc/hosts entry and bypass the DNS check is something that I have never heard of anyone doing. :slight_smile: