I am creating a new discourse instance from scratch for development purposes and see this bootstrap error again:
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 1002 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
Container setup is with two containers for webonly and dataonly (redis) and with an external postgresql database. Commenting the maxmind settings does not change anything.
Hmmm, nope, we have 4 GB RAM and plenty of harddisk space (2 x 32 GB), the overall environment is the same as the other docker machine where builds run without problems.
OK, I fixed the separation of web_only and redis. Error msg now is
FAILED -------------------- Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 981 e xit 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:migra te'"]} 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. 801049b69a89d38b1ae5c299d356fc5f8dc6a8f518b1260c2dde05e0b6081556
But maybe its a misunderstanding / lack of knowledge on my side:
The database should be external on another lxc container which has a postgresql database. The database user and database exists, but the database is empty before the first bootstrap of web_only. Does the script create the database itself on the remote system upon first build? Or do I first have to create the database container and then export its default scheme and the data manually to the external postgresql daemon?
Thanks for the diagram. That’s quite a sophisticated setup - you’d do that if you had a good reason and knew the territory.
If you’re still seeing the following, I think that’s the indication of what’s wrong. Redis can’t open the port it needs to be listening on.
So the questions are about whether redis should be doing that, in this container, and if so, where else on the machine is another redis running. lsof might be a useful tool here.
Hi @Ed_S
thanks for the hint about the missing port. I first want to wait for the reply from Falco concerning my questions about the general setup of discourse with an external postgres database.
Yes, the setup is a bit sophisticated compared to the standard with just one app container. I run everything in a dedicated root machine with Proxmox (https://proxmox.com) as virtualization environment at hetzner.de
You still need to share the full logs, including the part where the migration failed. My guess (and it’s a guess since you haven’t shared the error) is that you’re using the AI plugin and your database doesn’t have the add-on that is required.