无法重建应用程序/升级到3.4.0.beta4

你好
今天在重建 Discourse 时遇到了第一个错误(想更新到当前版本)。这是日志中的错误:

Pups::ExecError: cd /var/www/discourse & su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 788 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

向上滚动,我发现了这些错误:

I, [2025-02-16T18:44:33.377980 #1]  INFO -- : > /usr/local/bin/create_db
2025-02-16 18:44:33.470 UTC [60] postgres@postgres ERROR:  database "discourse" already exists
2025-02-16 18:44:33.470 UTC [60] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR:  database "discourse" already exists
2025-02-16 18:44:33.551 UTC [63] postgres@discourse ERROR:  role "discourse" already exists
2025-02-16 18:44:33.551 UTC [63] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists

听起来像是数据库问题。discourse-doctor 并没有帮到我……
有人能帮我解决这个问题吗?

非常感谢!

编辑:感谢相似主题的建议,我发现这与这里的问题相同:

不幸的是,问题至今仍未解决。

您看到了PostgreSQL 15 更新吗?

这些不是您要找的错误。尝试粘贴全部内容

好的,感谢您让我继续查找错误:

I, [2025-02-16T19:33:36.269613 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2025-02-16T19:33:36.272496 #1]  INFO -- : > sleep 10
784:C 16 Feb 2025 19:33:36.289 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
784:C 16 Feb 2025 19:33:36.289 # Redis version=7.0.15, bits=64, commit=00000000, modified=0, pid=784, just started
784:C 16 Feb 2025 19:33:36.289 # Configuration loaded
784:M 16 Feb 2025 19:33:36.290 * monotonic clock: POSIX clock_gettime
784:M 16 Feb 2025 19:33:36.291 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
784:M 16 Feb 2025 19:33:36.291 # Failed listening on port 6379 (TCP), aborting.
I, [2025-02-16T19:33:46.277285 #1]  INFO -- :
I, [2025-02-16T19:33:46.277786 #1]  INFO -- : > cd /var/www/discourse &amp;&amp; su discourse -c 'bundle exec rake db:migrate'
rake aborted!
Gem::ConflictError: Unable to activate omniauth-ldap-1.0.5, because omniauth-2.1.2 conflicts with omniauth (~> 1.0) (Gem::ConflictError)

我禁用了 jonmbake/discourse-ldap-auth,一切都正常了……现在我必须解决这个插件的问题:/

1 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.