Centos 7 で標準の discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub インストール手順を使用していますが、以下の状況です。
ポート 80 および 443 のネットワーク接続は、nc を使用して次のようにテストしています。
echo -e "HTTP/1.1 200 OK\n\n $VERIFY" | nc -w 4 -l -p $PORT >/dev/null 2>&1 &
if curl --proto =http -s $HOST:$PORT --connect-timeout 3 | grep $VERIFY >/dev/null 2>&1; then
:
しかし、nc は次のように失敗します。
nc: cannot use -p and -l
これにより、セットアップスクリプトがそれらのポートで利用不可を報告します。
man nc によると:
-l Listen for an incoming connection rather than initiating a connection to a remote host. Cannot be used together with any of the options -psxz. Additionally, any timeouts specified
with the -w option are ignored.
これは nc のバージョン問題かもしれません。nc linux command man page を見ると、2 つのオプションの競合があるとは書かれていません。私の netcat はリッスンできますが、次のように使用する場合のみです。
nc -w 4 -l <IP address> <port number>
netcat のバージョン番号を取得できません ![]()