amazon-ecs - AWS ECS 任务无法访问出站
问题描述
我创建了基于 ubuntu:18.04 的 docker 镜像
也许我认为 ECS 任务无法访问出站。
当我执行apt-get update
时,它会抛出错误。
root@ip-172-31-14-71:~# apt-get install -y wget
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libpsl5 publicsuffix
The following NEW packages will be installed:
libpsl5 publicsuffix wget
0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.
Need to get 455 kB of archives.
After this operation, 1320 kB of additional disk space will be used.
Err:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpsl5 amd64 0.19.1-5build1
Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.161), connection timed out
Err:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 publicsuffix all 20180223.1310-1
Unable to connect to archive.ubuntu.com:http:
Ign:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 wget amd64 1.19.4-1ubuntu2.2
Err:3 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 wget amd64 1.19.4-1ubuntu2.2
Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libp/libpsl/libpsl5_0.19.1-5build1_amd64.deb Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.161), connection timed out
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/publicsuffix/publicsuffix_20180223.1310-1_all.deb Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/w/wget/wget_1.19.4-1ubuntu2.2_amd64.deb Unable to connect to archive.ubuntu.com:http:
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
root@ip-172-31-14-71:~# apt-get install -y wget
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libpsl5 publicsuffix
The following NEW packages will be installed:
libpsl5 publicsuffix wget
0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.
Need to get 455 kB of archives.
After this operation, 1320 kB of additional disk space will be used.
Err:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpsl5 amd64 0.19.1-5build1
Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.161), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out
Err:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 publicsuffix all 20180223.1310-1
Unable to connect to archive.ubuntu.com:http:
Ign:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 wget amd64 1.19.4-1ubuntu2.2
Err:3 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 wget amd64 1.19.4-1ubuntu2.2
Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libp/libpsl/libpsl5_0.19.1-5build1_amd64.deb Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.161), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/publicsuffix/publicsuffix_20180223.1310-1_all.deb Unable to connect to archive.ubuntu.com:http:
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/w/wget/wget_1.19.4-1ubuntu2.2_amd64.deb Unable to connect to archive.ubuntu.com:http:
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
wget
到 google.com 也失败了。
我没有配置任何防火墙或与之相关的。
ECS任务有配置吗?
解决方案
推荐阅读
- c# - 如何使用 mvvm 管理列表视图行中按钮的可见性?
- php - 如何将数组和变量从 php 发送到 android 应用程序?
- objective-c - 在不同增益的 AVAudioPlayerNode 中调度缓冲区
- reactjs - 无法从后端获取数据
- jquery - 窗口关闭导致错误“未定义”在 jquery 中未定义
- reactjs - 使用 react redux 的简单 Redux 表单
- powershell - 按日期排序PowerShell
- function - 如何在 Haskell 中将枚举列表转换为另一种类型的枚举?
- python - 从控制台启动烧瓶应用程序 - ModuleNotFoundError
- google-cloud-dataflow - 使用 Google Cloud Dataflow 从 Oracle 读取数据