# Error after Upgrading

**URL:** https://meta.discourse.org/t/error-after-upgrading/153907
**Category:** Self-hosting
**Created:** [June 5, 2020, 8:35am UTC](https://meta.discourse.org/t/error-after-upgrading/153907 "2020-06-05T08:35:48Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![HB9GSL](https://avatars.discourse-cdn.com/v4/letter/h/919ad9/32.png) [@HB9GSL](https://meta.discourse.org/u/HB9GSL)
#### Post date: [June 5, 2020, 8:35am UTC](https://meta.discourse.org/t/error-after-upgrading/153907/1 "2020-06-05T08:35:48Z")

</div>

Hello

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

```plaintext
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.

```

---

<div class="post-metadata">

### Author: ![Rachelskirts](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rachelskirts/32/132265_2.png) [@Rachelskirts](https://meta.discourse.org/u/Rachelskirts)
#### Post date: [June 7, 2020, 2:15am UTC](https://meta.discourse.org/t/error-after-upgrading/153907/2 "2020-06-07T02:15:53Z")

</div>

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

`./launcher rebuild app`

---

<div class="post-metadata">

### Author: ![HB9GSL](https://avatars.discourse-cdn.com/v4/letter/h/919ad9/32.png) [@HB9GSL](https://meta.discourse.org/u/HB9GSL)
#### Post date: [June 7, 2020, 9:35am UTC](https://meta.discourse.org/t/error-after-upgrading/153907/3 "2020-06-07T09:35:26Z")

</div>

Hello

I did the rebuild several times and it didnt work.

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [June 7, 2020, 2:06pm UTC](https://meta.discourse.org/t/error-after-upgrading/153907/4 "2020-06-07T14:06:53Z")

</div>

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

---

<div class="post-metadata">

### Author: ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)
#### Post date: [June 7, 2020, 2:49pm UTC](https://meta.discourse.org/t/error-after-upgrading/153907/5 "2020-06-07T14:49:45Z")

</div>

@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](https://meta.discourse.org/t/postgresql-12-update/151236/1).
