# Upgrading Discourse: Multiple failures

**URL:** https://meta.discourse.org/t/upgrading-discourse-multiple-failures/343370
**Category:** Support
**Created:** [December 19, 2024, 1:22pm UTC](https://meta.discourse.org/t/upgrading-discourse-multiple-failures/343370 "2024-12-19T13:22:45Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![CharlesBarouch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/charlesbarouch/32/48050_2.png) [@CharlesBarouch](https://meta.discourse.org/u/CharlesBarouch)
#### Post date: [December 19, 2024, 1:22pm UTC](https://meta.discourse.org/t/upgrading-discourse-multiple-failures/343370/1 "2024-12-19T13:22:45Z")

</div>

I’m trying to do the current upgrade. It has failed and I can’t access my discourse.  
There’s multiple errors. All help appreciated.

```plaintext
# 502 Bad Gateway
---
nginx

```

Log attached.

[cap.txt](https://meta.discourse.org/uploads/short-url/iD7X9t11p4VT7t04kMnr7WODejJ.txt) (58.3 KB)

```plaintext
I, [2024-12-19T13:12:37.802755 #1] INFO -- : > /usr/local/bin/create_db
createdb: error: could not connect to database template1: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?
.
.
.
1353:C 19 Dec 2024 13:13:56.951 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1353:C 19 Dec 2024 13:13:56.951 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=1353, just started
1353:C 19 Dec 2024 13:13:56.951 # Configuration loaded
1353:M 19 Dec 2024 13:13:56.951 * monotonic clock: POSIX clock_gettime
1353:M 19 Dec 2024 13:13:56.952 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
1353:M 19 Dec 2024 13:13:56.952 # Failed listening on port 6379 (TCP), aborting.
.
.
.
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 1356 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "tag"=>"migrate", "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.
./discourse-doctor may help diagnose the problem.
d7e3c61c9189308cfa984b4f73baf5bece2cdb0ce5ff4034396a0440ae3d7594

```

---

<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: [December 19, 2024, 6:20pm UTC](https://meta.discourse.org/t/upgrading-discourse-multiple-failures/343370/2 "2024-12-19T18:20:19Z")

</div>

Is this a [standard install](https://meta.discourse.org/t/142537?silent=true)? Is it just one `app.yml` file (and not separate web\_only and data containers?)

For some reason it’s unable to connect to your databases.

---

<div class="post-metadata">

### Author: ![CharlesBarouch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/charlesbarouch/32/48050_2.png) [@CharlesBarouch](https://meta.discourse.org/u/CharlesBarouch)
#### Post date: [December 19, 2024, 7:08pm UTC](https://meta.discourse.org/t/upgrading-discourse-multiple-failures/343370/3 "2024-12-19T19:08:16Z")

</div>

[Standard install](https://meta.discourse.org/t/142537?silent=true). Just one app.yml.

---

<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: [December 19, 2024, 7:50pm UTC](https://meta.discourse.org/t/upgrading-discourse-multiple-failures/343370/4 "2024-12-19T19:50:35Z")

</div>

Maybe upgrade docker. What is

```
 docker --version

```

---

<div class="post-metadata">

### Author: ![CharlesBarouch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/charlesbarouch/32/48050_2.png) [@CharlesBarouch](https://meta.discourse.org/u/CharlesBarouch)
#### Post date: [December 19, 2024, 8:12pm UTC](https://meta.discourse.org/t/upgrading-discourse-multiple-failures/343370/5 "2024-12-19T20:12:50Z")

</div>

Discourse asked me to do a Docker upgrade first. I did.  
I can’t check the version now because I had to revert the server to put it back in production, so all changes have been undone.

---

<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: [December 19, 2024, 8:19pm UTC](https://meta.discourse.org/t/upgrading-discourse-multiple-failures/343370/6 "2024-12-19T20:19:00Z")

</div>

> [@CharlesBarouch](#):
>
> so all changes have been undone.

Then you have no way to debug.

What I would likely recommend is to spin up a new VM, install Discourse there, and restore a backup. When it works, put the existing site in read-only mode, backup, restore, and switch the DNS (or a static IP if you have access to such).

You can use [Move a Discourse site to another VPS with rsync](https://meta.discourse.org/t/move-a-discourse-site-to-another-vps-with-rsync/43812) so that the new site has valid certs and you can have a look by hacking your local DNS to point to the new IP address.
