Unable to rebuild app / upgrade to 3.4.0.beta4

Hello
Today I had my first error when rebuilding discourse (wanted to update to the current version). Here is the error from the log:

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

scrolled up, i found these errors:

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 d                                                                               iscourse;
createdb: error: database creation failed: ERROR:  database "discourse" already                                                                                exists
2025-02-16 18:44:33.551 UTC [63] postgres@discourse ERROR:  role "discourse" alr                                                                               eady exists
2025-02-16 18:44:33.551 UTC [63] postgres@discourse STATEMENT:  create user disc                                                                               ourse;
ERROR:  role "discourse" already exists

Sounds like a database problem. discourse-doctor did not help me…
Can someone help me to solve the problem?

Thank you very much!

Edit: thanks to the similar topics suggestions I have seen, it seems to be the same problem as here:

Unfortunately, the problem has not solved itself so far.

Did you see PostgreSQL 15 update?

Those aren’t the errors you’re looking for. Try pasting all of it

ok thanks for letting me keep looking for errors:

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 && 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)

i disabled jonmbake/discourse-ldap-auth and everything works fine… now i must solve the problem with the plugin :confused:

1 Like