沒有收到機器本機伺服器的任何回應

沒有收到機器本機伺服器的任何回應

所以我使用 NGIX 和 docker 來伺服器 Linux,並使用 UWSGI 來使用許多應用程式 django。

所以我需要建立一個作業在 docker 容器內執行。該作業將向應用程式 django 的某個 url 發出請求。

然而,當我嘗試提出請求時,我沒有收到任何回應。

命令

wget localhost:3031 --bind-address=127.0.0.1

回覆:

--2015-09-23 14:20:15--  http://localhost:3031/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:3031... failed: Invalid argument.
Connecting to localhost (localhost)|127.0.0.1|:3031... connected.
HTTP request sent, awaiting response... No data received.
Retrying.

--2015-09-23 14:20:16--  (try: 2)  http://localhost:3031/
Connecting to localhost (localhost)|127.0.0.1|:3031... connected.
HTTP request sent, awaiting response... No data received.
Retrying.

--2015-09-23 14:20:18--  (try: 3)  http://localhost:3031/
Connecting to localhost (localhost)|127.0.0.1|:3031... connected.
HTTP request sent, awaiting response... No data received.
Retrying.

網路統計

我執行了一個命令來檢查應用程式是否列出了連接埠。

root@6c9e1bcb238d:/# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:3031            0.0.0.0:*               LISTEN      -      

那為什麼我沒有收到任何回覆?

相關內容