مرحباً، هذا هو موضوعي الأول! أنا نيلا إغزسي، وأقوم ببناء موقع باستخدام Ghost و Discourse.
عادةً ما أراقب المنتديات وأقرأ المواضيع من الخفاء. إذا علقت، أبحث في المنتديات عن إجابة، وعادةً ما تنجح هذه الطريقة. لكنني علقت الآن وأحتاج إلى مساعدة.
بعد ترقية Discourse عبر واجهة المستخدم الإدارية، ظهرت لي رسالة:
أنت تشغل إصداراً قديماً من صورة Discourse.
تم تعطيل الترقيات عبر واجهة الويب حتى تقوم بتشغيل أحدث صورة.
لذلك، سجل الدخول إلى خادمك عبر SSH وقم بتشغيل الأوامر التالية:
cd /var/discourse
git pull
./launcher rebuild app
اتبعت الدليل حول كيفية ترقية Discourse وصورة Docker إلى أحدث إصدار باستخدام أوامر وحدة التحكم. ومع ذلك، لم أتمكن من إكمال الترقية بنجاح بسبب خطأ.
إليك رسالة الخطأ التي تظهر عند تشغيل أمر ./launcher rebuild app.
> FAILED
> --------------------
> Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 671 exit 1>
> Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
> exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}
> 9c3a1b4a72818216aaafa5de742f7d1a325aa61497ea49f5b4f1660c6e503fd0
> ** 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.
خادم Digital Ocean الخاص بي يحتوي على 2 جيجابايت من الذاكرة / 50 جيجابايت من القرص + 50 جيجابايت / SFO2 - Discourse على Ubuntu 20.04.
شكراً لك على وقتك لقراءة منشوري! أتطلع إلى قراءة رسالتك.
إليك المخرجات. قمت بقص جزء كبير منها حتى يسمح لي المنتدى بنشرها.
2021-05-03 00:32:20.635 UTC [63] postgres@postgres ERROR: database "discourse" already exists
2021-05-03 00:32:20.635 UTC [63] postgres@postgres STATEMENT: CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR: database "discourse" already exists
I, [2021-05-03T00:32:20.639714 #1] INFO -- :
I, [2021-05-03T00:32:20.640335 #1] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2021-05-03 00:32:20.760 UTC [74] postgres@discourse ERROR: role "discourse" already exists
2021-05-03 00:32:20.760 UTC [74] postgres@discourse STATEMENT: create user discourse;
ERROR: role "discourse" already exists
I, [2021-05-03T00:32:21.634456 #1] INFO -- : File > /etc/service/redis/run chmod: +x chown:
I, [2021-05-03T00:32:21.640838 #1] INFO -- : File > /etc/service/redis/log/run chmod: +x chown:
I, [2021-05-03T00:32:21.646998 #1] INFO -- : File > /etc/runit/3.d/10-redis chmod: +x chown:
I, [2021-05-03T00:32:21.648588 #1] INFO -- : Replacing daemonize yes with in /etc/redis/redis.conf
I, [2021-05-03T00:32:21.650175 #1] INFO -- : Replacing (?-mix:^pidfile.*$) with in /etc/redis/redis.conf
I, [2021-05-03T00:32:21.651303 #1] INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2021-05-03T00:32:21.656597 #1] INFO -- :
I, [2021-05-03T00:32:21.657900 #1] INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2021-05-03T00:32:21.659157 #1] INFO -- : Replacing (?-mix:^bind .*$) with in /etc/redis/redis.conf
I, [2021-05-03T00:32:21.660353 #1] INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2021-05-03T00:32:21.661652 #1] INFO -- : Replacing (?-mix:^protected-mode yes) with protected-mode no in /etc/redis/redis.conf
I, [2021-05-03T00:32:21.662825 #1] INFO -- : Replacing # io-threads 4 with io-threads $redis_io_threads in /etc/redis/redis.conf
I, [2021-05-03T00:32:21.663908 #1] INFO -- : > echo redis installed
I, [2021-05-03T00:32:21.668192 #1] INFO -- : redis installed
I, [2021-05-03T00:32:21.669144 #1] INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2021-05-03T00:32:21.679111 #1] INFO -- : logfile ""
I, [2021-05-03T00:32:21.680077 #1] INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2021-05-03T00:32:21.683045 #1] INFO -- : > sleep 10
167:C 03 May 2021 00:32:21.698 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
167:C 03 May 2021 00:32:21.698 # Redis version=6.2.1, bits=64, commit=00000000, modified=0, pid=167, just started
167:C 03 May 2021 00:32:21.699 # Configuration loaded
167:M 03 May 2021 00:32:21.700 * monotonic clock: POSIX clock_gettime
167:M 03 May 2021 00:32:21.702 * Running mode=standalone, port=6379.
167:M 03 May 2021 00:32:21.702 # Server initialized
167:M 03 May 2021 00:32:21.703 # 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.
I, [2021-05-03T00:32:41.096190 #1] INFO -- : > cd /var/www/discourse && bash -c "touch -a /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log"
terser '/var/www/discourse/public/assets/_vendor-892d5a1f7dfb58e3f80950989c67133fd6062344153d17e67db8ba3d126c7a1a.js' -m -c -o '/var/www/discourse/public/assets/vendor-892d5a1f7dfb58e3f80950989c67133fd6062344153d17e67db8ba3d126c7a1a.js' --source-map "base='/var/www/discourse/public/assets',root='/assets',url='/assets/vendor-892d5a1f7dfb58e3f80950989c67133fd6062344153d17e67db8ba3d126c7a1a.js.map'"
****************************************************************************************************
#<Thread:0x000055a7feb17780 /var/www/discourse/lib/tasks/assets.rake:239 run> terminated with exception (report_on_exception is true):
/var/www/discourse/lib/tasks/assets.rake:251:in `rescue in block (2 levels) in <main>': undefined local variable or method `name' for main:Object (NameError)
from /var/www/discourse/lib/tasks/assets.rake:240:in `block (2 levels) in <main>'
/var/www/discourse/lib/file_helper.rb:63:in `block in download': 401 Error: Invalid license key (OpenURI::HTTPError)
شكرًا لك! يبدو أن ذلك حل المشكلة، إلى حد ما. عندما أزور الصفحة الرئيسية للمنتدى، يتم توجيهي إلى صفحة “تهانينا، لقد قمت بتثبيت Discourse!”. إليك أسئلتي:
هل يجب أن أعيد تثبيت المنتدى؟ هل ستبقى محتوياتي الحالية، أم تم حذف كل شيء؟
يبدو أن كل شيء قد حُذف، لكنه على الأرجح لا يزال موجودًا. هل كانت هذه أول تحديث لك منذ فترة؟ هل تم تحديث PostgreSQL لديك؟ أفضل تخميني هو أن شيئًا ما قد انهار في تحديث PostgreSQL، وتحتاج إلى إعادة تسمية postgres_old والبدء من جديد. هناك بعض التفاصيل في تحديث PostgreSQL 13.
جاي، تذكرت للتو أنني حاولت نقل ملفات التحميل والنسخ الاحتياطي إلى DigitalOcean Block Storage. قبل لحظات، حاولت القيام بذلك مرة أخرى وتلقيت رسالة خطأ “أوبس” أثناء زيارة الصفحة الرئيسية:
أوبس
واجه البرنامج الذي يشغل منتدى المناقشة هذا مشكلة غير متوقعة. نعتذر عن الإزعاج.
تم تسجيل معلومات مفصلة حول الخطأ، وتم إنشاء إشعار تلقائي. سنقوم بمراجعته.
لا حاجة لاتخاذ أي إجراء إضافي. ومع ذلك، إذا استمرت حالة الخطأ، يمكنك تقديم تفاصيل إضافية، بما في ذلك الخطوات اللازمة لتكرار الخطأ، عن طريق نشر موضوع مناقشة في فئة التعليقات في الموقع.