# Update problem : Broken Forum

**URL:** https://meta.discourse.org/t/update-problem-broken-forum/222055
**Category:** Self-hosting
**Tags:** server-resources
**Created:** [March 26, 2022, 8:20pm UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055 "2022-03-26T20:20:17Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![dragan](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@dragan](https://meta.discourse.org/u/dragan)
#### Post date: [March 26, 2022, 8:20pm UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/1 "2022-03-26T20:20:17Z")

</div>

Hi,

I have a problem with last update. My forum is broken  
I have this message on SSH.

```plaintext
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 2472 exit 1>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
3d52a3f170f714bf580dcd30effbf9306fbf6e0ef1f786cf9dd4e326b066e6a4
**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.

```

Do you have idea where is the problem and how fixed ?

Thanks you very much

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [March 26, 2022, 8:28pm UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/2 "2022-03-26T20:28:01Z")

</div>

> [@dragan](#):
>
> ```plaintext
> **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.
> 
> ```

Could you scroll up and check for more specific errors, and see what it says?

---

<div class="post-metadata">

### Author: ![dragan](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@dragan](https://meta.discourse.org/u/dragan)
#### Post date: [March 26, 2022, 8:37pm UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/3 "2022-03-26T20:37:01Z")

</div>

Hi,

here is a pastebin of the whole process. There are obviously some errors with postgresql even if I am not sure that the problem comes from there

[https://pastebin.com/nqLWDRAC](https://pastebin.com/nqLWDRAC)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 26, 2022, 9:03pm UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/4 "2022-03-26T21:03:07Z")

</div>

How did you install? What postgres are you using?

```plaintext
Caused by:
PG::InsufficientPrivilege: ERROR: permission denied to create extension "unaccent"
HINT: Must be superuser to create this extension.

```

---

<div class="post-metadata">

### Author: ![dragan](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@dragan](https://meta.discourse.org/u/dragan)
#### Post date: [March 26, 2022, 9:15pm UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/5 "2022-03-26T21:15:09Z")

</div>

I logged with root.  
I can’t have better privileges 🙂

I don’t know for postgres  
“The program ‘pg\_config’ can be found in the following packages:”

---

<div class="post-metadata">

### Author: ![dragan](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@dragan](https://meta.discourse.org/u/dragan)
#### Post date: [March 26, 2022, 9:30pm UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/6 "2022-03-26T21:30:09Z")

</div>

The forum is online.  
I restart the server.

The first problem is fixed but i have a second.

I have this error “500 Internal Server Error” when i create or respond post

Do you have idea how fixed ?

---

<div class="post-metadata">

### Author: ![dragan](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@dragan](https://meta.discourse.org/u/dragan)
#### Post date: [March 26, 2022, 10:06pm UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/7 "2022-03-26T22:06:41Z")

</div>

Hi,

I found this error on the log file

```plaintext
 ActiveRecord::StatementInvalid (PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block ) app/models/post.rb:973:in `block in link_post_uplo 

```

```plaintext
ActiveRecord::StatementInvalid (PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block
)
app/models/post.rb:973:in `block in link_post_uploads'
app/models/post.rb:972:in `link_post_uploads'
lib/post_creator.rb:217:in `block in create'
lib/post_creator.rb:409:in `block (2 levels) in transaction'
lib/post_creator.rb:408:in `block in transaction'
lib/distributed_mutex.rb:33:in `block in synchronize'
lib/distributed_mutex.rb:29:in `synchronize'
lib/distributed_mutex.rb:29:in `synchronize'
lib/distributed_mutex.rb:14:in `synchronize'
lib/post_creator.rb:407:in `transaction'
lib/post_creator.rb:205:in `create'
lib/new_post_manager.rb:285:in `perform_create_post'
lib/new_post_manager.rb:223:in `perform'
app/controllers/posts_controller.rb:193:in `create'
app/controllers/application_controller.rb:400:in `block in with_resolved_locale'
app/controllers/application_controller.rb:400:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:358:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/request_tracker.rb:202:in `call'

```

Do you have idea what is the problem ?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 26, 2022, 10:25pm UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/8 "2022-03-26T22:25:46Z")

</div>

Is this a [standard install](https://meta.discourse.org/t/142537?silent=true)?

---

<div class="post-metadata">

### Author: ![dragan](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@dragan](https://meta.discourse.org/u/dragan)
#### Post date: [March 26, 2022, 10:28pm UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/9 "2022-03-26T22:28:16Z")

</div>

yes,

i use the forum since 6 years.

The last version installed is 2.9.0.beta3

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 26, 2022, 10:58pm UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/10 "2022-03-26T22:58:21Z")

</div>

Do you have any plugins installed? Maybe post your app.yml?

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [March 27, 2022, 6:06am UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/11 "2022-03-27T06:06:35Z")

</div>

What is your postgres version? Just do `launcher enter app` and then type `psql -V`

---

<div class="post-metadata">

### Author: ![dragan](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@dragan](https://meta.discourse.org/u/dragan)
#### Post date: [March 27, 2022, 6:49am UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/12 "2022-03-27T06:49:23Z")

</div>

Hi,

I test but the original problem is back

```plaintext
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 2458 exit 1>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
45d3621c802f025ef80ad34e77ec3318a48677b0de0134210120ef7690b6e6f4
**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.

```

I think there was a problem when updating it because there was not enough space on the hard disk. I freed up some space and now I have 67% elibre. However, there is an existing problem, but which one?

> [@RGJ](#):
>
> What is your postgres version? Just do `launcher enter app` and then type `psql -V`

The program ‘psql’ is currently not installed.  
do i have to install it?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 27, 2022, 9:01am UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/13 "2022-03-27T09:01:30Z")

</div>

Did you do

```
  launcher enter app

```

Before the `psql` command?

---

<div class="post-metadata">

### Author: ![dragan](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@dragan](https://meta.discourse.org/u/dragan)
#### Post date: [March 27, 2022, 11:34am UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/14 "2022-03-27T11:34:27Z")

</div>

> [@RGJ](#):
>
> psql -V

It’s same,  
I try install but i have this message

```plaintext
E: The package libperl5.22 needs to be reinstalled, but I can't find an archive for it.

```

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [March 27, 2022, 11:39am UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/15 "2022-03-27T11:39:29Z")

</div>

I have taken another look at your pastebin logfile. It says Postgres 10.  
Are you **sure** this is a standard setup which has been installed according to [discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md) ?

---

<div class="post-metadata">

### Author: ![dragan](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@dragan](https://meta.discourse.org/u/dragan)
#### Post date: [March 28, 2022, 7:59am UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/16 "2022-03-28T07:59:47Z")

</div>

I’ve said it before, the forum has been around for many years and I’ve never had any major problems. Generally, a rebuild or update was enough to get everything going again.  
Yes, it’s normal installation

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [March 28, 2022, 8:40am UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/17 "2022-03-28T08:40:42Z")

</div>

My last attempt.

Can you please do

```plaintext
cd /var/discourse
./launcher enter app
psql -V

```

and copy this entirely into a reply, including the commands and output?

---

<div class="post-metadata">

### Author: ![dragan](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@dragan](https://meta.discourse.org/u/dragan)
#### Post date: [March 28, 2022, 8:45am UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/18 "2022-03-28T08:45:48Z")

</div>

```plaintext
psql (PostgreSQL) 10.19 (Debian 10.19-1.pgdg110+1)

```

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [March 28, 2022, 9:17am UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/19 "2022-03-28T09:17:13Z")

</div>

Ok, great. That’s a different result than last time.  
So now please do the following

```plaintext
cd /var/discourse
git pull
./launcher rebuild app

```

and if you get errors please post the ENTIRE output, including your commands, in a reply (or on Pastebin)

---

<div class="post-metadata">

### Author: ![mreach](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@mreach](https://meta.discourse.org/u/mreach)
#### Post date: [April 1, 2022, 4:53am UTC](https://meta.discourse.org/t/update-problem-broken-forum/222055/20 "2022-04-01T04:53:36Z")

</div>

Interestingly I’ve experienced either the same or similar error. Running on Discourse 2.9.0.beta2 and tried to update to ß3. I’ve disabled all plugins except `docker_manager` for `./launcher rebuild app`. Running on an external PGSQL db at version:

```plaintext
$ psql --version
psql (PostgreSQL) 14.1 (Ubuntu 14.1-1.pgdg18.04+1)

```

I can restart the container via `./launcher restart app` following the failure, but when replies return a 500 error.

The end error during rebuild/upgrade is:

```plaintext
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 658 exit 1>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.

```

The actual meaningful errors above may be found here: [https://p153.p0.n0.cdn.getcloudapp.com/items/jkuvPekN/feb38236-3b84-410e-8fac-d1864d02ba69.txt?v=eb1d15e029cb07a73300d8ec07318876](https://p153.p0.n0.cdn.getcloudapp.com/items/jkuvPekN/feb38236-3b84-410e-8fac-d1864d02ba69.txt?v=eb1d15e029cb07a73300d8ec07318876)

I’m having a hard time believing that this is an actual permission issue and I’m hesitant to give the Discourse DB use super user/root permission to pgsql.

Any further thoughts on what could be going on here with such a recent breakage?

[Next page](https://meta.discourse.org/t/update-problem-broken-forum/222055.md?page=2)
