يجب أن يعمل، لكن لا تعتمد على كلامي فقط واترك لنفسك خطة بديلة. تذكر أنك على تثبيت غير مدعوم، لذا يمكنني تقديم اقتراحات حول كيفية الانتقال إلى مسار أكثر دعمًا، لكن تثبيتات Bitnami مشكلة — فمن الأفضل الاستعداد للأسوأ.
إذا قمت بالبناء على خادم منفصل، فيمكنك اختبار ذلك قبل إجراء أي تغييرات لا رجعة فيها على تثبيتك الحالي.
لقد حاولنا بناء حزمة التثبيت القياسية على Docker على آلة افتراضية بنظام Ubuntu 18.0.4 LTS، سواء على Google Cloud أو VirtualBox هنا. المشكلة نفسها.
لم نتمكن من بناء نسخة discourse Docker (مع PostgreSQL/Redis المدمج) للإصدار 2.3.5، ولا للإصدار 2.3.10. كلاهما يفشل بسبب مشكلة صلاحيات PostgreSQL، سواء على Google Cloud أو على آلة افتراضية VirtualBox بنظام Ubuntu 18.0.4.
ومع ذلك، فإن الإصدار المستقر (2.4.2) يبني بنجاح، لكن صور Docker للإصدار 2.4.2 سواء على Google Cloud أو على VirtualBox لا تعمل. كلاهما يفشل عند بناء “دوال discourse”.
سنحاول عملية البناء حسب الرابط الذي أرسلته لنا وسنعود بالإبلاغ عن النتائج. هل يجب أن أنشئ موضوعًا منفصلًا لكل محاولة بيئة؟
نعم، لكنها بيئة أكثر تعقيدًا مقارنة بـ DigitalOcean. عملية التثبيت في DigitalOcean تستغرق 30 دقيقة كحد أقصى، ولن تحتاج إلى القلق بشأن قوائم التحكم في الوصول (ACLs) وسياسات الشبكة.
حاولنا بناء نسخة 2.3.5 من discourse على جهاز افتراضي يعمل بنظام Ubuntu 18.0.4. أضفنا الإصدار “v2.3.5” إلى ملف app.yml وفشل التنفيذ هنا:
> FAILED--------------------Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test development' failed with return #<Process::Status: pid 353 exit 1>Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test development'"]}a3cebbd8e5a24b8a2b248886f0fa195f401720a6dc7084ad78af6cee345de9a9** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one../discourse-doctor may help diagnose the problem.
** فشل التهيئة ** يرجى التمرير للأعلى والبحث عن رسائل الخطأ السابقة، فقد يكون هناك أكثر من خطأ. قد يساعدك ../discourse-doctor في تشخيص المشكلة.
يبدو أن تثبيت نسخة v2.3.5 من حاوية Discourse على نظام Google All-in-One 18.0.4 LTS قد توقف هنا:
> [2020-05-01T18:54:20.903566 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test development'/usr/local/lib/ruby/site_ruby/2.6.0/rubygems.rb:275:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /var/www/discourse/Gemfile.lock. (Gem::GemNotFoundException)To update to the latest version installed on your system, run `bundle update --bundler`.To install the missing version, run `gem install bundler:1.17.3` from /usr/local/lib/ruby/site_ruby/2.6.0/rubygems.rb:294:in `activate_bin_path' from /usr/local/bin/bundle:23:in `<main>'I, [2020-05-01T18:54:21.234673 #1] INFO -- : I, [2020-05-01T18:54:21.235321 #1] INFO -- : Terminating async processesI, [2020-05-01T18:54:21.235582 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main pid: 64I, [2020-05-01T18:54:21.235838 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 1812020-05-01 18:54:21.236 UTC [64] LOG: received fast shutdown request181:signal-handler (1588359261) Received SIGTERM scheduling shutdown...2020-05-01 18:54:21.241 UTC [64] LOG: aborting any active transactions2020-05-01 18:54:21.248 UTC [64] LOG: worker process: logical replication launcher (PID 73) exited with exit code 12020-05-01 18:54:21.248 UTC [68] LOG: shutting down181:M 01 May 2020 18:54:21.268 # User requested shutdown...181:M 01 May 2020 18:54:21.269 * Saving the final RDB snapshot before exiting.181:M 01 May 2020 18:54:21.271 * DB saved on disk181:M 01 May 2020 18:54:21.271 # Redis is now ready to exit, bye bye...2020-05-01 18:54:21.288 UTC [64] LOG: database system is shut down
حسنًا، تمكنا من بناء بيئة 2.4.2. ومع ذلك، تم إجراء النسخة الاحتياطية من نشر على أمازون مع تكوين S3. يفشل الاستعادة في بيئة غير تابعة لأمازون عند بعض سكريبتات S3.
> إعادة الاتصال بقاعدة البيانات...
> إعادة تحميل إعدادات الموقع...
> تعطيل الرسائل الصادرة للمستخدمين غير الموظفين...
> تعطيل وضع القراءة فقط...
> مسح ذاكرة التخزين المؤقت للفئات...
> مسح ذاكرة التخزين المؤقت للإيموجي...
> مسح ذاكرة التخزين المؤقت للمظهر
> إعادة تعيين الروابط للمرفقات...
> استعادة المرفقات، قد يستغرق هذا بعض الوقت...
> ترحيل المرفقات إلى S3 لـ 'default'...
> تحميل الملفات إلى S3...
> - سرد الملفات المحلية
> => 3 ملفات
> - سرد ملفات S3
> . => 3 ملفات
> - مزامنة الملفات مع S3
> ...
> تحديث الروابط في قاعدة البيانات...
> إزالة الصور المحسّنة القديمة...
> وضع علامة على جميع المنشورات التي تحتوي على صناديق عرض لإعادة
> تم وضع علامة على 182 منشورًا لإعادة المعالجة
> استثناء: 215 من أصل 295 مرفقًا لم يتم ترحيلها إلى S3. فشل ترحيل S3 لقاعدة البيانات 'default'.
> /var/www/discourse/lib/file_store/to_s3_migration.rb:131:in `raise_or_log'
> /var/www/discourse/lib/file_store/to_s3_migration.rb:78:in `migration_successful?'
> /var/www/discourse/lib/file_store/to_s3_migration.rb:351:in `migrate_to_s3'
> /var/www/discourse/lib/file_store/to_s3_migration.rb:65:in `migrate'
> /var/www/discourse/lib/file_store/s3_store.rb:203:in `copy_from'
> /var/www/discourse/lib/backup_restore/uploads_restorer.rb:48:in `restore_uploads'
> /var/www/discourse/lib/backup_restore/uploads_restorer.rb:30:in `restore'
> /var/www/discourse/lib/backup_restore/restorer.rb:59:in `run'
> script/discourse:143:in `restore'
> /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
> /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
> /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
> /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
> script/discourse:284:in `<top (required)>'
> /usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
> /usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
> /usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
> /usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
> /usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
> /usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invok
> e_command'
> /usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
> /usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
> /usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
> /usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
> /usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
> /usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
> /usr/local/bin/bundle:23:in `load'
> /usr/local/bin/bundle:23:in `<main>'
> محاولة التراجع...
> جاري التراجع...
> تنظيف الأشياء...
> إسقاط الدوال من مخطط discourse_functions...
> إزالة المجلد المؤقت '/var/www/discourse/tmp/restores/default/2020-05-01-230400'...
> إعادة تفعيل sidekiq...
> وضع علامة على أن الاستعادة اكتملت...
> إخطار 'النظام' بنهاية الاستعادة...
> انتهى!
> [فشل]
> اكتملت عملية الاستعادة.