Problema nell'aggiornamento di un'istanza Discourse multi-sito/multi-container

Ciao,

Sto cercando di aggiornare un’istanza di Discourse da 2.8.0.beta8 (0ededb1454) a 2.9.0.beta4.

Finora ha funzionato benissimo, ma questa volta ho un errore quando provo ad avviare il mio nuovo container web_only.

Si tratta di un’installazione multi-sito e multi-container (web_only e data).

Si blocca su questo:

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 &amp;&amp; sudo -E -u discourse bundle exec rake multisite:migrate failed with return #&lt;Process::Status: pid 6089 exit 1&gt;
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "cd /var/www/discourse &amp;&amp; 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.

Estratto di ./discourse-doctor relativo a plugin e container:

==================== 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.

Qualche idea su come risolvere questo problema?

Grazie!

1 Mi Piace

Potrebbe essere correlato a

1 Mi Piace

Stai usando pg13?
Probabilmente puoi rimuovere il plugin della password di migrazione.
Ma l’altro problema suggerito potrebbe essere la causa.

1 Mi Piace

Ciao, grazie per la tua risposta @pfaffman

Sì:

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

Ho provato a commentare il plugin migratepassword ma stesso errore.

Hai qualche idea su come risolvere questo problema?

La mia comprensione è che tutte le dipendenze siano gestite all’interno del container compilato, quindi non capisco perché si blocchi su questo:

/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/runtime.rb:309:in
`check_for_activated_spec!': Hai già attivato uri 0.10.0, ma il tuo
Gemfile richiede uri 0.11.0. Poiché uri è una gemma predefinita, puoi rimuovere
la tua dipendenza da essa o provare ad aggiornare a una versione più recente di bundler che supporti
uri come gemma predefinita. (Gem::LoadError)

E non capisco il riferimento a uri perché non è nel Gemfile

1 Mi Piace

All’inizio del processo, abbiamo

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, mi fa impazzire :triumph:

Potrebbe essere un conflitto di versione con bundler?

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

E nel Gemfile da 2.9.0.beta4

BUNDLED WITH
   2.3.5
1 Mi Piace

Ciao Jean,

è stato introdotto qui:

1 Mi Piace

Ciao @Benjamin_D e grazie per il suggerimento,

Sono riuscito a eseguire l’aggiornamento a 2.8.3 scrivendo manualmente il commit ref a9a643bcdc5808802a5a0d73f107cc3a63e2e095 a params: version: nel mio .yml

Proverò ad aggiornare per gradi.

2 Mi Piace

Ricevo esattamente lo stesso errore quando tento di eseguire l’aggiornamento (non multi-sito) a 2.9.0.beta4.

1 Mi Piace

L’aggiornamento a beta2 va bene.


L’aggiornamento a beta3 non va bene.


Dopo aver indagato, ho dovuto ricostruire il mio container data per aggiornare Redis a 6.2.

4 Mi Piace

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