我有一段时间没有升级我的 Discourse 了,但终于完成了。我尝试从 Web 应用程序升级,但它出错了,然后我进入服务器尝试重建容器,遇到了几个空间问题。
我扩展了我的 VM 并尝试重建应用程序,现在我收到了错误并且无法启动容器。
我按照指示运行了 discourse-doctor,这似乎是我看到的主要错误:
2022-10-12 12:12:37.418 UTC [1669] LOG: database system was shut down at 2022-10-12 12:09:46 UTC
2022-10-12 12:12:37.452 UTC [1666] LOG: database system is ready to accept connections
I, [2022-10-12T12:12:42.229967 #1] INFO -- :
I, [2022-10-12T12:12:42.230254 #1] INFO -- : > su postgres -c 'createdb discourse' || true
Error: PostgreSQL version 13 is not installed
I, [2022-10-12T12:12:42.270949 #1] INFO -- :
I, [2022-10-12T12:12:42.271177 #1] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
psql: 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?
I, [2022-10-12T12:12:42.323520 #1] INFO -- :
I, [2022-10-12T12:12:42.323738 #1] INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
psql: 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?
I, [2022-10-12T12:12:42.375939 #1] INFO -- :
I, [2022-10-12T12:12:42.376152 #1] INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
psql: 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?
I, [2022-10-12T12:12:42.429960 #1] INFO -- :
I, [2022-10-12T12:12:42.430282 #1] INFO -- : Terminating async processes
I, [2022-10-12T12:12:42.430313 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgr es:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main pid: 1666
2022-10-12 12:12:42.430 UTC [1666] LOG: received fast shutdown request
2022-10-12 12:12:42.445 UTC [1666] LOG: aborting any active transactions
2022-10-12 12:12:42.446 UTC [1666] LOG: worker process: logical replication launcher (PID 1675) exited with exit code 1
2022-10-12 12:12:42.447 UTC [1670] LOG: shutting down
2022-10-12 12:12:42.562 UTC [1666] LOG: database system is shut down
FAILED
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 1699 exit 2>
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 "su postgres -c 'psql $db_name -c \\\"alter schema public owner to $db_user;\\\"'"
bootstrap failed with exit code 2
** 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.
4f664b8bc922e1b17fb754c66f5f729d1a78d609d10fe228677248e3cace99bb
==================== END REBUILD LOG ====================
Failed to rebuild app.