因此,我使用带有 docker 的 NGIX 服务器 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 -
那么为什么我没有收到任何回复?