# Problem upgrading multi-site/multi-containers Discourse instance

**URL:** https://meta.discourse.org/t/problem-upgrading-multi-site-multi-containers-discourse-instance/226929
**Category:** Self-hosting
**Created:** [May 13, 2022, 6:05am UTC](https://meta.discourse.org/t/problem-upgrading-multi-site-multi-containers-discourse-instance/226929 "2022-05-13T06:05:30Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![jtraulle](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtraulle/32/151436_2.png) [@jtraulle](https://meta.discourse.org/u/jtraulle)
#### Post date: [May 13, 2022, 6:05am UTC](https://meta.discourse.org/t/problem-upgrading-multi-site-multi-containers-discourse-instance/226929/1 "2022-05-13T06:05:30Z")

</div>

Hello,

I am trying to upgrade a Discourse instance that is currently in 2.8.0.beta8 ([0ededb1454](https://github.com/discourse/discourse/commits/0ededb14547d6a258cf9c50a9e7f0c995f8aed1b)) to 2.9.0.beta4.

It worked great so far but this time, I have an error when trying to bootstrap my new `web_only` container.

It is a multi-site install and multi container (`web_only` and `data`).

It hangs on this :

```txt
I, [2022-05-13T05:52:47.051709 #1] INFO -- : > cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite: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.13/lib/bundler/runtime.rb:309: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.13/lib/bundler/runtime.rb:25:in `block in setup'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/spec_set.rb:136:in `each'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/spec_set.rb:136:in `each'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/runtime.rb:24:in `map'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/runtime.rb:24:in `setup'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler.rb:151:in `setup'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/setup.rb:20:in `block in <top (required)>'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/ui/shell.rb:136:in `with_level'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/ui/shell.rb:88:in `silence'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/setup.rb:20:in `<top (required)>'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:56:in `require_relative'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:56:in `kernel_load'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:23:in `run'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli.rb:483:in `exec'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/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.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli.rb:31:in `dispatch'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli.rb:25:in `start'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/exe/bundle:48:in `block in <top (required)>'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/exe/bundle:36:in `<top (required)>'
	from /usr/local/bin/bundle:23:in `load'
	from /usr/local/bin/bundle:23:in `<main>'
I, [2022-05-13T05:52:47.425596 #1] INFO -- : 

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate failed with return #<Process::Status: pid 6089 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate"
df18312b372c1b6866b4219c5f8678dbcab50711a643f7ed8d627cae998d59e9
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.

```

Extract of `./discourse-doctor` regarding plugins and containers :

```plaintext
==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 19.03.13, build 4484c46d9d

DOCKER PROCESSES (docker ps -a)

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ef7f5c75b666 local_discourse/web_only "/sbin/boot" 7 months ago Up 2 months 127.0.0.1:8800->80/tcp web_only
418c82bdeb7b local_discourse/data "/sbin/boot" 14 months ago Up 2 months 127.0.0.1:5432->5432/tcp data

ef7f5c75b666 local_discourse/web_only "/sbin/boot" 7 months ago Up 2 months 127.0.0.1:8800->80/tcp web_only

Discourse container web_only is running

==================== PLUGINS ====================
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-solved.git
          - git clone https://github.com/discourse/discourse-bbcode.git
          - git clone https://github.com/discourse/discourse-whos-online.git
          - git clone https://github.com/discoursehosting/discourse-migratepassword.git
          - git clone https://github.com/discourse/discourse-github.git

No non-official plugins detected.

```

Any clue on how to resolve this ?

Thanks !

---

<div class="post-metadata">

### Author: ![jtraulle](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtraulle/32/151436_2.png) [@jtraulle](https://meta.discourse.org/u/jtraulle)
#### Post date: [May 13, 2022, 6:22am UTC](https://meta.discourse.org/t/problem-upgrading-multi-site-multi-containers-discourse-instance/226929/2 "2022-05-13T06:22:02Z")

</div>

May be related to

[https://github.com/rubygems/rubygems/issues/5016#issuecomment-951808558](https://github.com/rubygems/rubygems/issues/5016#issuecomment-951808558)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 13, 2022, 10:44am UTC](https://meta.discourse.org/t/problem-upgrading-multi-site-multi-containers-discourse-instance/226929/3 "2022-05-13T10:44:40Z")

</div>

Are you using pg13?

You can probably remove the migrate password plugin.

But the other issue suggested might be the cause.

---

<div class="post-metadata">

### Author: ![jtraulle](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtraulle/32/151436_2.png) [@jtraulle](https://meta.discourse.org/u/jtraulle)
#### Post date: [May 13, 2022, 11:57am UTC](https://meta.discourse.org/t/problem-upgrading-multi-site-multi-containers-discourse-instance/226929/4 "2022-05-13T11:57:28Z")

</div>

Hey, thanks for your reply @pfaffman

> [@pfaffman](#):
>
> Are you using pg13?

Yes :

```plaintext
psql (13.2 (Debian 13.2-1.pgdg100+1))

```

I tried to comment the plugin `migratepassword` but same error.

Any idea how to get away with this ?

My understanding is that all dependencies stuff are done within the builded container so I do not understand why it hang on this :

```plaintext
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/runtime.rb:309: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)

```

And I do not understand the reference to uri because it is not in the Gemfile

> <https://github.com/discourse/discourse/blob/v2.9.0.beta4/Gemfile.lock>

---

<div class="post-metadata">

### Author: ![jtraulle](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtraulle/32/151436_2.png) [@jtraulle](https://meta.discourse.org/u/jtraulle)
#### Post date: [May 13, 2022, 6:47pm UTC](https://meta.discourse.org/t/problem-upgrading-multi-site-multi-containers-discourse-instance/226929/5 "2022-05-13T18:47:33Z")

</div>

At the begining of the process, we have

```plaintext
I, [2022-05-13T18:22:51.511137 #1] INFO -- : Running `bundle install --deployment --jobs 4 --retry 3 --verbose --without "test" "development"` with bundler 2.3.13
Frozen, using resolution from the lockfile
The definition is missing ["bootsnap-1.11.1", "actionmailer-7.0.3", "actionpack-7.0.3", "actionview-7.0.3", "activemodel-7.0.3", "activerecord-7.0.3", "activesupport-7.0.3", "railties-7.0.3", "sprockets-rails-3.4.2", "json-2.6.1", "mail-2.8.0.rc1", "mini_mime-1.1.2", "mini_suffix-0.3.3", "redis-4.5.1", "redis-namespace-1.8.2", "discourse-fonts-0.0.9", "message_bus-4.2.0", "rails_multisite-4.0.1", "fastimage-2.2.6", "aws-sdk-s3-1.114.0", "aws-sdk-sns-1.53.0", "excon-0.92.3", "image_optim-0.31.1", "nokogiri-1.13.6-x86_64-linux", "loofah-2.17.0", "css_parser-1.11.0", "omniauth-facebook-9.0.0", "omniauth-oauth2-1.7.2", "oj-3.13.11", "pg-1.3.5", "mini_sql-1.4.0", "rake-13.0.6", "thor-1.2.1", "sidekiq-6.4.2", "mini_racer-0.6.2", "rack-protection-2.2.0", "addressable-2.8.0", "json_schemer-0.2.21", "fast_blank-1.0.1", "rack-mini-profiler-3.0.0", "unicorn-6.1.0", "puma-5.6.4", "rss-0.2.9", "stackprof-0.2.19", "cppjieba_rb-0.4.2", "lograge-0.12.0", "logster-2.11.2", "rqrcode-2.1.1", "rubyzip-2.3.2", "sanitize-6.0.0", "rails_failover-0.8.1", "net-http-0.2.2", "msgpack-1.5.1", "activejob-7.0.3", "net-imap-0.2.3", "net-pop-0.1.1", "net-smtp-0.3.1", "rails-html-sanitizer-1.4.2", "concurrent-ruby-1.1.10", "i18n-1.10.0", "minitest-5.15.0", "zeitwerk-2.5.4", "ffi-1.15.5", "aws-sdk-core-3.130.2", "aws-sdk-kms-1.56.0", "aws-sigv4-1.5.0", "unf_ext-0.0.8.1", "image_size-3.0.1", "in_threads-1.6.0", "racc-1.6.0", "hashie-5.0.0", "jwt-2.3.0", "libv8-node-16.10.0.0-x86_64-linux", "public_suffix-4.0.7", "ecma-re-validator-0.4.0", "regexp_parser-2.4.0", "raindrops-0.20.0", "nio4r-2.5.8", "rexml-3.2.5", "request_store-1.5.1", "rqrcode_core-1.2.0", "uri-0.11.0", "globalid-1.0.0", "digest-3.1.0", "net-protocol-0.1.3", "strscan-3.0.3", "timeout-0.2.0", "aws-eventstream-1.2.0", "aws-partitions-1.583.0", "jmespath-1.6.1", "oauth-0.5.10", "faraday-1.10.0", "openssl-2.2.1", "faraday-httpclient-1.0.1", "faraday-multipart-1.0.3", "faraday-net_http_persistent-1.2.0", "faraday-patron-1.0.0", "faraday-rack-1.0.0", "faraday-retry-1.0.3", "ruby2_keywords-0.0.5", "ipaddr-1.2.4"]

```

`"uri-0.11.0"`

Grumpf, it drives me nuts 😤

Could it be a version conflict with `bundler` ?

```plaintext
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13

```

And in the `Gemfile` from `2.9.0.beta4`

```ruby
BUNDLED WITH
   2.3.5

```

---

<div class="post-metadata">

### Author: ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)
#### Post date: [May 13, 2022, 7:21pm UTC](https://meta.discourse.org/t/problem-upgrading-multi-site-multi-containers-discourse-instance/226929/6 "2022-05-13T19:21:31Z")

</div>

Hi Jean,

> [@jtraulle](#):
>
> And I do not understand the reference to uri because it is not in the Gemfile

it was introduced here:  
[https://github.com/discourse/discourse/commit/008b700a3f24fdbb0feb9897321b61a3deabe0e2](https://github.com/discourse/discourse/commit/008b700a3f24fdbb0feb9897321b61a3deabe0e2)

---

<div class="post-metadata">

### Author: ![jtraulle](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtraulle/32/151436_2.png) [@jtraulle](https://meta.discourse.org/u/jtraulle)
#### Post date: [May 13, 2022, 7:40pm UTC](https://meta.discourse.org/t/problem-upgrading-multi-site-multi-containers-discourse-instance/226929/7 "2022-05-13T19:40:10Z")

</div>

Hi @Benjamin_D and thanks for the tip,

I was able to upgrade to `2.8.3` by manually writing commit ref `a9a643bcdc5808802a5a0d73f107cc3a63e2e095` to `params: version:` in my `.yml`

Will try to upgrade by steps.

---

<div class="post-metadata">

### Author: ![swiebe](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@swiebe](https://meta.discourse.org/u/swiebe)
#### Post date: [May 13, 2022, 8:45pm UTC](https://meta.discourse.org/t/problem-upgrading-multi-site-multi-containers-discourse-instance/226929/8 "2022-05-13T20:45:27Z")

</div>

Getting the exact same error when attempting to upgrade (not multi-site) to 2.9.0.beta4.

---

<div class="post-metadata">

### Author: ![jtraulle](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtraulle/32/151436_2.png) [@jtraulle](https://meta.discourse.org/u/jtraulle)
#### Post date: [May 13, 2022, 9:19pm UTC](https://meta.discourse.org/t/problem-upgrading-multi-site-multi-containers-discourse-instance/226929/9 "2022-05-13T21:19:53Z")

</div>

Upgrading to [beta2](https://github.com/discourse/discourse/commits/88a8584348ed93a28286839bfc1c32b06bd50b3f) is OK.

* * *

Upgrading to beta3 is not.

* * *

After investigating, I needeed to rebuild my `data` container to upgrade Redis to 6.2

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [June 12, 2022, 9:20pm UTC](https://meta.discourse.org/t/problem-upgrading-multi-site-multi-containers-discourse-instance/226929/10 "2022-06-12T21:20:20Z")

</div>

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