أنفاق Cloudflare - إعداد Discourse لا يتعرف على اسم المضيف (المنفذ غير متاح)

لديّ برنامج cloudflared قيد التشغيل بشكل صحيح واستخدمته للكثير من الأشياء (مما يعني أن النفق مثبت بشكل صحيح على الخادم)، ولكني أواجه مشكلة في جعل إعداد Discourse (./discourse-setup) يتعرف على اسم المضيف الخاص بمثيل Discourse الخاص بي.

  • أستخدم biohacking.forum كاسم مضيف للمثيل الخاص بي.
  • هذا هو إعداد نفق Cloudflare الخاص بي لـ biohacking.forum:
  • لقد حاولت أيضًا تعيينه إلى HTTPS لنوع الخدمة.
  • أقوم بإعداد Discourse على خادم Ubuntu، على LTS.
  • قمت بتشغيل الأوامر التالية بهذا الترتيب:
  1. sudo mkdir /var/discourse
  2. sudo git clone GitHub - discourse/discourse_docker: A Docker image for Discourse /var/discourse
  3. cd /var/discourse
  4. sudo ./discourse-setup
  5. يطالبني باسم المضيف، أدخل biohacking.forum
  6. يتم عرض الرسالة التالية:
Hostname for your Discourse? [discourse.example.com]: biohacking.forum

Checking your domain name . . .
WARNING: Port 443 of computer does not appear to be accessible using hostname:  biohacking.forum.
WARNING: Connection to http://biohacking.forum (port 80) also fails.

This suggests that biohacking.forum resolves to some IP address that does not reach this
machine where you are installing discourse.

The first thing to do is confirm that biohacking.forum resolves to the IP address of this server.
You usually do this at the same place you purchased the domain.

If you are sure that the IP address resolves correctly, it could be a firewall issue.
A web search for "open ports YOUR CLOUD SERVICE" might help.

This tool is designed only for the most standard installations. If you cannot resolve
the issue above, you will need to edit containers/app.yml yourself and then type

./launcher rebuild app

ماذا يجب أن أفعل لجعل هذه الخطوة تعمل، يرجى إخباري إذا كنت بحاجة إلى أي معلومات إضافية. شكرًا لك!

مرحباً، هل لديك السحابة الرمادية (dns فقط) لسجل “A” قبل ./discourse-setup؟

أنا لا أستخدم سجل A قياسي، بل أستخدم أنفاق Cloudflare. إليك مثال لخدمة تعمل بشكل مثالي على خادمي (مع أنفاق Cloudflare) والإعداد المرتبط بها:

Ghost CMS هي الخدمة:
PORT: 8085:2368 (8085 هو المضيف و 2368 هي الخدمة)
HOSTNAME: joshuahabka.com
إعداد نفق Cloudflare:

الرمز البرتقالي لـ Cloudflare قيد التشغيل لأنه يستخدم أنفاق Cloudflare، ولكن بالنسبة لـ Discourse، يجب أن يتم الإبلاغ عنه كمنفذ وصول عادي. لدي أكثر من 40 خدمة موزعة ويمكن الوصول إليها عبر الويب، و Discourse هي الأولى التي أواجه فيها بعض الأخطاء.

يرجى إعلامي إذا كنت بحاجة إلى معلومات إضافية!

لذلك بالنسبة لـ Discourse، أفترض أن المنفذ هو:
443:443 (المضيف: الخدمة) وهذا هو سبب إعداد نفق Cloudflare الأصلي الخاص بي كما هو موضح أعلاه

مرحباً @joshhabka :wave:
ربما سيساعد هذا الموضوع، إذا لم تكن قد رأيته بالفعل

4 إعجابات

مرحباً ليلي، الدليل المذكور أعلاه لم ينجح معي، ما زلت أتلقى نفس الخطأ على الرغم من أن تكوين نفق Cloudflare الخاص بي هو http://localhost:80 كما هو مذكور، ما زلت عالقًا في:

starserver@Starserver:/var/discourse$ sudo ./discourse-setup
Ports 80 and 443 are free for use
'samples/standalone.yml' -> 'containers/app.yml'
./discourse-setup: line 261: 4
scaling*                 2: syntax error in expression (error token is "scaling*                 2")

Hostname for your Discourse? [discourse.example.com]: biohacking.forum

Checking your domain name . . .
WARNING: Port 443 of computer does not appear to be accessible using hostname:  biohacking.forum.
WARNING: Connection to http://biohacking.forum (port 80) also fails.

This suggests that biohacking.forum resolves to some IP address that does not reach this
machine where you are installing discourse.

The first thing to do is confirm that biohacking.forum resolves to the IP address of this server.
You usually do this at the same place you purchased the domain.

If you are sure that the IP address resolves correctly, it could be a firewall issue.
A web search for "open ports YOUR CLOUD SERVICE" might help.

This tool is designed only for the most standard installations. If you cannot resolve
the issue above, you will need to edit containers/app.yml yourself and then type

./launcher rebuild app

إيقاف تشغيل “استخدام HTTPS دائمًا”

إعادة توجيه جميع الطلبات ذات المخطط “http” إلى “https”. ينطبق هذا على جميع طلبات http إلى المنطقة. يؤدي هذا إلى نجاح المنفذ 80 ولكن ليس 443

إن تمكين قاعدة صفحة لإعادة التوجيه إلى HTTPS يتسبب أيضًا في فشل كل من 80 و 443، ولكن إذا لم أستخدمها، يفشل 443 وينجح 80.

أنت لا تتبع التعليمات.

لا يمكنك استخدام discourse-setup إلا لإنشاء ملف yml.

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

شكرًا لك، لقد علقت هنا الآن:

FAILED
--------------------
Pups::ExecError: /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end' failed with return #<Process::Status: pid 134 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"tag"=>"precompile", "cmd"=>["/usr/local/bin/ruby -e 'if ENV[\"DISCOURSE_SMTP_ADDRESS\"] == \"smtp.example.com\"; puts \"Aborting! Mail is not configured!\"; exit 1; end'", "/usr/local/bin/ruby -e 'if ENV[\"DISCOURSE_HOSTNAME\"] == \"discourse.example.com\"; puts \"Aborting! Domain is not configured!\"; exit 1; end'", "/usr/local/bin/ruby -e 'if (ENV[\"DISCOURSE_CDN_URL\"] || \"\")[0..1] == \"//\"; puts \"Aborting! CDN must have a protocol specified. Once fixed you should rebake your posts now to correct all posts.\"; exit 1; end'"]}
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.

تحتاج إلى تحرير ملف yml وإدخال بيانات اعتماد smtp

تم الانتهاء من ذلك وكل شيء طبيعي الآن. أود فقط وضع ملاحظة في التثبيت الذاتي لـ cloudflare tunnel post بأن الأشخاص بحاجة إلى تحرير مستند yaml لإضافة smtp الخاص بهم، واسم المضيف، ورسائل البريد الإلكتروني، وما إلى ذلك.

شكرا لك!

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

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