升级 Discourse:多次失败

我正在尝试进行当前的升级。它已失败,我无法访问我的 discourse。
有多个错误。感谢所有帮助。

# 502 Bad Gateway
---
nginx

日志已附加。

cap.txt (58.3 KB)

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

这是标准安装吗?它只是一个 app.yml 文件(而不是单独的 web_only 和 data 容器)吗?

不知何故,它无法连接到您的数据库。

标准安装。只有一个 app.yml。

也许升级 Docker。是什么

 docker --version

Discourse 要求我先进行 Docker 升级。我做了。\n我现在无法检查版本,因为我不得不将服务器恢复以重新投入生产,所以所有更改都已撤销。

那么你就无法调试了。

我可能会建议你启动一个新的虚拟机,在上面安装 Discourse,然后恢复备份。当它工作正常时,将现有站点置于只读模式,进行备份,恢复,然后切换 DNS(如果你有权访问静态 IP,则切换静态 IP)。

你可以使用 将 Discourse 站点迁移到另一台 VPS(使用 rsync),这样新站点就会有有效的证书,你可以通过修改本地 DNS 指向新 IP 地址来查看。