مشكلة في ترقية مثيل Discourse متعدد المواقع/حاويات متعددة

مرحباً،

أحاول ترقية نسخة Discourse من الإصدار 2.8.0.beta8 (0ededb1454) إلى الإصدار 2.9.0.beta4.

لقد سارت الأمور على ما يرام حتى الآن، ولكن هذه المرة، واجهت خطأ عند محاولة تهيئة حاوية web_only الجديدة الخاصة بي.

إنها تثبيت متعدد المواقع ومتعدد الحاويات (web_only و data).

يتوقف عند هذا الحد:

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.

مقتطف من ./discourse-doctor بخصوص الإضافات والحاويات:

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

أي فكرة عن كيفية حل هذا؟

شكراً!

إعجاب واحد (1)

قد يكون مرتبطًا بـ

إعجاب واحد (1)

هل تستخدم pg13؟
ربما يمكنك إزالة المكون الإضافي لكلمة مرور الترحيل.
ولكن قد يكون السبب في المشكلة الأخرى المقترحة.

إعجاب واحد (1)

مرحباً، شكراً على ردك @pfaffman

نعم:

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

حاولت التعليق على المكون الإضافي migratepassword ولكن نفس الخطأ.

أي فكرة حول كيفية التغلب على هذا؟

فهمي هو أن كل الأشياء التابعة يتم إجراؤها داخل الحاوية المبنية، لذلك لا أفهم لماذا يعلق على هذا:

/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/runtime.rb:309:in
`check_for_activated_spec!': لقد قمت بالفعل بتنشيط uri 0.10.0، ولكن ملف `Gemfile` الخاص بك يتطلب uri 0.11.0. نظرًا لأن uri هو جوهرة افتراضية، يمكنك إما إزالة اعتمادك عليه أو محاولة التحديث إلى إصدار أحدث من bundler يدعم uri كجوهرة افتراضية. (Gem::LoadError)

ولا أفهم الإشارة إلى uri لأنه ليس في Gemfile

إعجاب واحد (1)

في بداية العملية، لدينا

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"

غضب، هذا يزعجني :triumph:

هل يمكن أن يكون هناك تعارض في الإصدار مع bundler؟

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

وفي Gemfile من 2.9.0.beta4

BUNDLED WITH
   2.3.5
إعجاب واحد (1)

مرحباً جان،

تم تقديمه هنا:

إعجاب واحد (1)

مرحباً @Benjamin_D وشكراً على النصيحة،

تمكنت من الترقية إلى 2.8.3 عن طريق كتابة مرجع الالتزام a9a643bcdc5808802a5a0d73f107cc3a63e2e095 يدوياً إلى params: version: في ملف .yml الخاص بي.

سأحاول الترقية على مراحل.

إعجابَين (2)

الحصول على نفس الخطأ بالضبط عند محاولة الترقية (ليست متعددة المواقع) إلى 2.9.0.beta4.

إعجاب واحد (1)

الترقية إلى beta2 لا بأس بها.


الترقية إلى beta3 ليست كذلك.


بعد التحقيق، احتجت إلى إعادة بناء حاوية data الخاصة بي لترقية Redis إلى 6.2.

4 إعجابات

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