هذا على جهاز اختبار. كنت أقوم بتشغيل discourse هناك سابقًا - لقد أفسدت التثبيت ولم أتمكن من التحديث إلى أحدث إصدار والذي اعتقدت أنه خطئي. بعد إزالة دليل discourse بالكامل وتنظيف docker، حاولت إجراء تثبيت جديد تمامًا قبل استيراد نسخة احتياطية من قاعدة البيانات الحية.
من الغريب أنني ما زلت أواجه نفس المشكلات التي لم أتمكن من حلها.
هذا هو ناتج الفشل. حاولت discourse-doctor بالفعل ولكنه لم يقدم أي شيء مفيد.
...
I, [2022-06-04T18:42:29.087446 #1] INFO -- : Terminating async processes
I, [2022-06-04T18:42:29.087672 #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/13/bin/postmaster -D /etc/postgresql/13/main pid: 42
I, [2022-06-04T18:42:29.087881 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 103
2022-06-04 18:42:29.088 UTC [42] LOG: received fast shutdown request
103:signal-handler (1654368149) Received SIGTERM scheduling shutdown...
2022-06-04 18:42:29.118 UTC [42] LOG: aborting any active transactions
2022-06-04 18:42:29.123 UTC [42] LOG: background worker "logical replication launcher" (PID 51) exited with exit code 1
2022-06-04 18:42:29.123 UTC [46] LOG: shutting down
103:M 04 Jun 2022 18:42:29.154 # User requested shutdown...
103:M 04 Jun 2022 18:42:29.154 * Saving the final RDB snapshot before exiting.
103:M 04 Jun 2022 18:42:29.159 * DB saved on disk
103:M 04 Jun 2022 18:42:29.159 # Redis is now ready to exit, bye bye...
2022-06-04 18:42:29.201 UTC [42] LOG: database system is shut down
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse & bundle exec rake db:migrate' failed with return #<Process::Status: pid 1102 exit 1>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
** 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.
69cb25658efb6f16e4479bb98a2d0278d72e56028865730841ac1efacc5b8d9d
==================== END REBUILD LOG ====================
الخادم نفسه يجب أن يكون بخير - مساحة قرص وفيرة، موارد كافية بخلاف ذلك. أي فكرة؟
103:M 04 Jun 2022 18:40:07.369 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
هممم… 16 جيجابايت من ذاكرة الوصول العشوائي (RAM) هي كمية كبيرة جدًا، لذلك قد تعتقد أنك لا تحتاج إلى مساحة تبديل (swap). ولكنني أقول إنه قد لا يضر إضافة بعض المساحة. بدون رؤية سجلاتك، لا يمكنني القول إن المشكلة هي ندرة الذاكرة. ولكن إذا كانت كذلك، فقد يساعد ضبط وضع التجاوز (overcommit mode)، سواء كان لديك مساحة تبديل أم لا.
اكتشاف جيد يا إد. شكراً. يبدو أن s3_bucket قد تغير في وقت ما إلى s3_upload_bucket ولدي هذه في containers/app.yml مما يبدو أنه سبب المشكلة. على الأقل تم البناء بنجاح الآن بعد أن قمت بتغيير DISCOURSE_S3_BUCKET هناك إلى DISCOURSE_S3_UPLOAD_BUCKET.
أتمنى لو كانت مثل هذه التغييرات تقدم أيضاً فحصاً في عملية البناء لتجنب الوقوع في هذا - وحظاً موفقاً، فنحن دائماً نختبر تحديثاتنا على جهاز اختبار.