Issue after Rebuilding Discourse on Digital Ocean Droplet

I’ve successfully deployed Discourse on a Digital Ocean Droplet, but after initiating a rebuild, I encountered problems.

  • Logs: View Here - Notably, there’s an “x86_64 arch detected” message.
  • App.yml Configuration: View Here

Has anyone faced a similar issue? Would appreciate any insights or solutions.

Lines 99 til 101 are in the wrong indentation level, they need one more. See here for a proper example:

3 Likes

Done! I’m stilling getting the same issue, though

You can try passing the whole YAML file through a linter to check for more issues.

3 Likes

I’ve been facing challenges with my Discourse setup:

  1. YAML File and Syntax:

    • I’ve verified my YAML configuration using YamlLint; it didn’t flag any issues.
    • However, a syntax error popped up from a Ruby directory:
      /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/config.rb:148:in `block (2 levels) in run_commands': Invalid run command cd (SyntaxError)
      ...
      from /usr/local/bin/pups:25:in `<main>'
      
  2. Rebuild and Access:

  3. W3M Browser Test:

    • To further diagnose, I installed w3m, a terminal browser, on the droplet.
    • Accessing localhost resulted in a ‘502 bad gateway’ error:
  4. SSL Issues

    • I thought this might be a SSL issue and am now renewing the ssl certs

Any insights or help would be greatly appreciated!

My forum’s down from 2 days.

It might be, if you reached their request limit. How did your review end?

Do you have a backup of your forum, and did you try restoring it on another server? If my forum were down for 2 days, I’d take 30 minutes to try that.

2 Likes

I don’t have a backup of my forum, I’m very new to setting up discourse.

If you’re starting from scratch, you should try installing a fresh instance using a new subdomain. That should sidestep the letsencrypt rate limit if you’ve hit it. :+1:

1 Like

Having cloudflare in front of your site is one way to see that let’s encrypt fails. I’d recommend using DNS-only until you’re sure that let’s encrypt is working correctly.

2 Likes

I already have users and data, I don’t want to lose everything and start from scratch

Thanks for the tip! It’s now on DNS only! :slightly_smiling_face:

Edit: I’m now also getting image error,

It sounds like the easy solution is to move to a different subdomain, or wait a week until let’s encrypt will give you a cert. The harder way is to add a second subdomain that points to your server and modify your app.yml to request a cert for both subdomains. Set up Let’s Encrypt with multiple domains. Since it appears that your problems started because you’re having trouble with YML formatting, this rather complicated solution might not work for you.

1 Like

Then you absolutely need to be sure you have a backup, and have it somewhere safe.

2 Likes

Thanks for the idea, I used a different subdomain now, but I’m having the same issue.

A ‘502’ and a ‘Connection Refused’.

Does your DNS for the subdomain point to that server IP address? And you don’t have any other A or AAAA records for the subdomain?

I recommend that you run ./discourse-setup that will check that incoming connections to your domain are reaching your server.

Can you ssh to your server by hostname with ssh user@subdomain.yoursite.com (or whatever your subdomain?

1 Like

Yes, I’ve ensured the DNS for the subdomain points to the server IP address, and there are no other conflicting A or AAAA records for it.

I’ve executed the command and here’s the output

Latest Update: Post-execution of discourse-setup , navigating to home.techwithanirudh.com results in a “502 Bad Gateway” error. Here’s a snapshot of the error (referring to the attached image).

Absolutely, SSH-ing into the server using the hostname works perfectly.

I worked with @techwithanirudh offline to resolve this … @techwithanirudh wasn’t aware of the chatbot uninstall instructions.

The giveaway here (atm) was the 502 due to the container not starting properly due to the index remaining in the db without supporting code in the postgres library. The uninstall instructions remove the index from the db so you can safely build without building the index library.

@techwithanirudh’s site is now up and running.

7 Likes

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