Rebuild fails, running 2.8.9

Hello,

for a while now our instance can not upgrade, the rebuild fails. Running Discourse 2.8.9 in Docker. Tried to Upgrade to 2.8.10 and 2.8.13 now.

./launcher rebuild app
...
I, [2022-12-01T12:10:27.197669 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake plugin:pull_compatible_all'
bundler: failed to load command: rake (/var/www/discourse/vendor/bundle/ruby/2.7.0/bin/rake)
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/runtime.rb:308:in `check_for_activated_spec!': You have already activated uri 0.10.0, but your Gemfile requires uri 0.11.0. Since uri is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports uri as a default gem. (Gem::LoadError)
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/runtime.rb:25:in `block in setup'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/spec_set.rb:155:in `each'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/spec_set.rb:155:in `each'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/runtime.rb:24:in `map'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/runtime.rb:24:in `setup'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler.rb:162:in `setup'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/setup.rb:20:in `block in <top (required)>'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/ui/shell.rb:136:in `with_level'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/ui/shell.rb:88:in `silence'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/setup.rb:20:in `<top (required)>'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:56:in `require_relative'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:56:in `kernel_load'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:23:in `run'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli.rb:486:in `exec'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli.rb:31:in `dispatch'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli.rb:25:in `start'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/exe/bundle:48:in `block in <top (required)>'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/exe/bundle:36:in `<top (required)>'
	from /usr/local/bin/bundle:23:in `load'
	from /usr/local/bin/bundle:23:in `<main>'
I, [2022-12-01T12:10:27.537797 #1]  INFO -- : 
I, [2022-12-01T12:10:27.538882 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
bundler: failed to load command: rake (/var/www/discourse/vendor/bundle/ruby/2.7.0/bin/rake)
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/runtime.rb:308:in `check_for_activated_spec!': You have already activated uri 0.10.0, but your Gemfile requires uri 0.11.0. Since uri is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports uri as a default gem. (Gem::LoadError)
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/runtime.rb:25:in `block in setup'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/spec_set.rb:155:in `each'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/spec_set.rb:155:in `each'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/runtime.rb:24:in `map'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/runtime.rb:24:in `setup'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler.rb:162:in `setup'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/setup.rb:20:in `block in <top (required)>'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/ui/shell.rb:136:in `with_level'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/ui/shell.rb:88:in `silence'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/setup.rb:20:in `<top (required)>'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:56:in `require_relative'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:56:in `kernel_load'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:23:in `run'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli.rb:486:in `exec'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli.rb:31:in `dispatch'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli.rb:25:in `start'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/exe/bundle:48:in `block in <top (required)>'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/exe/bundle:36:in `<top (required)>'
	from /usr/local/bin/bundle:23:in `load'
	from /usr/local/bin/bundle:23:in `<main>'
I, [2022-12-01T12:10:27.859901 #1]  INFO -- : 
I, [2022-12-01T12:10:27.861085 #1]  INFO -- : Terminating async processes
I, [2022-12-01T12:10:27.861874 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 31
31:signal-handler (1669896627) Received SIGTERM scheduling shutdown...
31:M 01 Dec 2022 12:10:27.961 # User requested shutdown...
31:M 01 Dec 2022 12:10:27.963 * Saving the final RDB snapshot before exiting.
31:M 01 Dec 2022 12:10:28.025 * DB saved on disk
31:M 01 Dec 2022 12:10:28.027 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 4804 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
fde0a026f0cd2470f6fa579009db125a783db4115eab6d151389446042e22119
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.

Upgrades prior to 2.8.10 were no problem. Some further information here:

System:
Debian 11 Bullseye
8GB Ram
Sufficient free Disk space
Postgres is installed via PGDG repo, not running in Container.
Plugins: only preinstalled docker_manager, styleguide
Components: Custom Header Links

app.yml


templates:
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"

version: stable

standalone.yml template was used for app.yml

This means you have an incompatible plugin. Can you share your plugin list?

from app.yml

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git

So I can just remove this line and try again?

1 Like

Never seen this error without any non-bundled plugins, that weird. Can you share the complete log of the rebuild?

Are you running separate web and data containers?

I saw a similar error earlier this year with a 2.8 build when the data container was outdated and redis required an upgrade.

Which version? We definitely need more information on your install.

1 Like

As a new user I can not upload attachements and the log is longer than a allowed for a post. Can you give the permission for uploading attachements?

Are you running separate web and data containers?

No, only one app container.

Which version? We definitely need more information on your install.

Sure. We use PostgreSQL 13.

Thanks for the quick response.

This error happens when the versions of bundler or rubygems are out of date.

Is this a standard install?
Did you perform a command line rebuild?
Did git pull a new version?
Is git pulling main and not master?

2 Likes

Is this a standard install?

mostly yes. We use Nginx as reverse proxy.

Did you perform a command line rebuild?

yes

Did git pull a new version?

yes

Is git pulling main and not master?

It pulled from master. I changed it to main but the build error is the same.

UPDATE: I had a mistake. Changing the remote branch fixed it. Thanks a lot!

4 Likes

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