متى يكون المنفذ 80 متاحًا؟

أنا مرتبك قليلاً بشأن متى يكشف تثبيت Discourse الجديد المعتمد على Docker عن المنفذ 80. دعني أشرح…

عند تشغيل ./discourse-setup، أفترض أن الأسئلة الأولية (اسم المضيف، عنوان البريد الإلكتروني، إلخ) تُطرح جميعها قبل إنشاء الحاوية، وبالتالي قبل أن يبدأ Discourse في كشف المنفذ 80. هل هذا صحيح؟

إذا كان الأمر كذلك، ألا يشكل ذلك نوعًا من المعضلة عند إدخال اسم المضيف؟

لقد أنشأت سجل A الخاص بي (وهو قابل للاستجابة عبر ping باستخدام اسم المضيف). لكن المنفذ 80 غير مفتوح. أعتقد أنني أفهم السبب، أي أن الحاوية لم تُنشأ بعد.

ولكن إذا كان هذا هو الحال، فكيف يمكن أن تعمل تلك المصادقة الأولية لاسم المضيف أبدًا، إذا كانت تتم قبل إنشاء الحاوية؟

من الواضح أن لدي افتراضًا خاطئًا هنا، لذا أرجو من أحدكم أن ينقذني من هذا الارتباك!

شكرًا لكم.

discourse-setup runs nc which opens the port for the test.

If you are running an OS that does not have nc installed that test will fail because of that. You can either confirm whether a missing nc is the problem or just assume that you know what you’re doing and it’ll just work.

Ah, got it.

Assuming I know what I am doing has generally been proven to be a poor choice! But I’m ignoring the warning now and ploughing on.

I’m suspect I am still going to come across an issue, since I assume nc should allow port 80 to be exposed (I have no firewall yet) but I will deal with that later.

Thank you again.

Well, that’s why it does those tests. But they only work for most people most of the time.

If you type nc at the command line and you get a command not found then you can assume that the test is broken (which doesn’t mean that your domain name resolves to your server and that the port is accessible).

I had this issue when I set up my first server and, irritatingly, the issue resolved itself after a few hours. That sort of issue often hints at a DNS replication issue, but I am using CloudFlare DNS (low TTL) and I can ping, through the host name, just fine.

The docker installation completed OK and nc is available.

docker ps suggests that both ports 80 and 443 are directed to the container.

sof -i -P -n reports that docker-pr is listening to both ports too.

I never figured out why this problem occurred with the first installation, but now it’s happened again I will drill down and troubleshoot. Haven’t figured it out yet but suspect it’s some basic plumbing.

Thanks again.

Sounds like a DNS propagation issue.

Is the orange cloud on? If cloudflare is DNS only, you’re fine, but if it’s in the middle you won’t be able to make Let’s Encrypt work, which is the point of the test.

The Orange Cloud is off. I don’t want to bother you further with this, Jay. This is an interesting little troubleshooting challenge and I will figure it out.

Pretty certain it’s not DNS replication since I can access the site from numerous devices by host name (through WiFi, cellular, etc). I will report back here if/when this is resolved.