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.