[Решено] Discourse упал во время обновления

I don’t undestand what’s happend and what to do.

My Discourse crashed when I did the last update.

Any help would be very appreciated

Waiting for Unicorn to reload...............
Stopping 1 Unicorn worker(s), to free up memory
$ cd /var/www/discourse && git fetch --tags --prune-tags --prune --force
$ cd /var/www/discourse && git reset --hard
HEAD is now at 44bf7b363ac I18N: Update translations (#37404)
$ cd /var/www/discourse && git -c advice.detachedHead=false checkout beta
Previous HEAD position was 44bf7b363ac I18N: Update translations (#37404)
HEAD is now at f863bbf1553 Revert "FIX: Add server-side trust level check for delete all posts (… [backport 2026.2] (#38095)
$ bundle install --retry 3 --jobs 4
Your Ruby version is 3.3.8, but your Gemfile specified ~> 3.4
Docker Manager: FAILED TO UPGRADE
#<RuntimeError: RuntimeError>
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:205:in `run'
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:94:in `upgrade'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:19:in `block in <main>'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:6:in `fork'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:6:in `<main>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-8.0.4/lib/rails/commands/runner/runner_command.rb:44:in `load'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-8.0.4/lib/rails/commands/runner/runner_command.rb:44:in `block in perform'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-8.0.4/lib/active_support/execution_wrapper.rb:91:in `wrap'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-8.0.4/lib/rails/commands/runner/runner_command.rb:70:in `conditional_executor'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-8.0.4/lib/rails/commands/runner/runner_command.rb:43:in `perform'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/thor-1.4.0/lib/thor/command.rb:28:in `run'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/thor-1.4.0/lib/thor/invocation.rb:127:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-8.0.4/lib/rails/command/base.rb:178:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/thor-1.4.0/lib/thor.rb:538:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-8.0.4/lib/rails/command/base.rb:73:in `perform'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-8.0.4/lib/rails/command.rb:65:in `block in invoke'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-8.0.4/lib/rails/command.rb:143:in `with_argv'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-8.0.4/lib/rails/command.rb:63:in `invoke'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-8.0.4/lib/rails/commands.rb:18:in `<main>'
/usr/local/lib/ruby/3.3.0/bundled_gems.rb:69:in `require'
/usr/local/lib/ruby/3.3.0/bundled_gems.rb:69:in `block (2 levels) in replace_require'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.19.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
bin/rails:18:in `<main>'
Spinning up 1 Unicorn worker(s) that were stopped initially
1 лайк

Perhaps have a look at

Alas…

root@forum:~# sudo git pull
sudo ./launcher rebuild app
fatal: not a git repository (or any of the parent directories): .git
sudo: ./launcher: command not found

You should navigate to the discourse directory first with cd /var/discourse.

3 лайка

Thanks, it’s working now. I’ll get back to you when it’s finished.

4 лайка

Thank you very much, it’s fixed!

For next time and for other users, since it seems more efficient to perform updates via SSH, what commands should be executed when the Admin Panel indicates a Docker update AND a Discourse update? And in what order should we proceed?

3 лайка

A rebuild upgrades both :slight_smile:

2 лайка

Thanks! So in summary

cd /var/discourse
sudo git pull
sudo ./launcher rebuild app
1 лайк

I don’t think git pull is necessary, a rebuild performs it. edit: see ed’s post below

sudo isn’t required if you are logged in as root.

You can also run it as a single command: /var/discourse/launcher rebuild app.

2 лайка

I don’t think this is universally true. See for example
‘rebuild app’ failed. looks like pnpm problem

It’s also very cheap, so I’m not sure it helps to note that it might not be necessary.

1 лайк

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