Bootstrap Error when trying to rebuild

AI-generated summary

A user, fidelio, is experiencing issues with their Discourse install on Digital Ocean. They are unable to rebuild due to a Bootstrap error. pfaffman suggests that the issue might be caused by another container running Postgres. After further investigation, fidelio discovers that they accidentally created a second container while importing mbox files.

To resolve the issue, pfaffman recommends destroying the import container. However, fidelio considers keeping both containers, but pfaffman advises against it to avoid confusion. Instead, pfaffman provides the following steps to resolve the issue:

  • Stop the import container: ./launcher stop import
  • Rebuild the app container: ./launcher rebuild app
  • Verify the site is working
  • Destroy the import container: ./launcher destroy import
  • Remove the import container configuration file: rm containers/import.yml

My Discourse install at Digital Ocean is behaving very oddly. While it is still running fine I can’t do anything via SSH anymore. When I try to enter the container I get the error that the container is not running.

And when I try to rebuild I get:

FAILED

--------------------

Pups::ExecError: socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1 failed with return #<Process::Status: pid 45 exit 1>

Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'

exec failed with the params "socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1"

4f10d0a44bb29a2710b46c2ec2ea7dc2d7b10b8588a1317f0fcac79e32fd95ca

** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

What can I do?

Thanks.

Did you add some other container running postgres? Did you rename your app.yml?

Not really. I added another Droplet but that’s on a different IP.
And I can still enter the app.yml with nano.

Actually, I might have created a second container when I was importing some mbox files. I seem to have an app.yml and an import.yml

You probably need to

cd /var/discourse
./launcher destroy import

So it seems like the Import container is the one I am now using. Any harm in keeping both containers?

If there isn’t, why are we having this conversation?

What you (probably) want to do is

./launcher stop import
./launcher rebuild app
# make sure that the site is working
./launcher destroy import # so that it doesn't start up when you reboot
# and to be sure that you're not confused in the future
rm containers/import.yml