Error after Upgrading

AI-generated summary

Users are reporting a 502 Bad Gateway error after upgrading their self-hosted Discourse instance. HB9GSL encountered a PostgreSQL schema ownership error during rebuild, which persisted despite multiple attempts. Rachelskirts resolved their 502 by running ./launcher rebuild app a second time. Steven suggested reverting to the previous version using ./launcher restart app or, if needed, ./launcher destroy app followed by ./launcher start app. sunjam confirmed this workaround helped them temporarily while investigating a related PostgreSQL 12 update issue linked here. The community recommends checking full logs and running ./discourse-doctor for deeper diagnostics.

Hello

I got the following error after upgrading. THe Webpage gives me 502 Bad Gateway.

FAILED
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 1592 exit 2>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
d722c24aad0b29710de6b6b321113328db3ed1c2c09c0ac74e00f1eac41279f3
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
==================== END REBUILD LOG ====================
Failed to rebuild app.

I also had a 502 error after upgrading. It went away after doing the rebuild a second time.

./launcher rebuild app

Hello

I did the rebuild several times and it didnt work.

You can go back to the previous version by using ./launcher restart app command (one time, ./launcher destroy app then ./launcher start app worked for me when restart didn’t)

But to help you, we need to see everything you can below these lines, we will probably have more info on the issue

@Steven thank you! I just used this to restart our instance until I can sort out what went wrong during the attempted Postgres update in this thread.