自定义 VPC 中的错误
Error in Custom VPC
有什么解决办法??我尝试从头开始设置新的 VPC。
我在孟买地区创建了一个 CIDR 10.0.0.0/16 的 VPC。
并创建了一个 Internet Gate 方式并附加到这些 VPC。
创建了两个子网
1)10.0.1.0/24,使用 Public IP,在可用区 US-East-1a
2)10.0.2.0/24 没有 public Ip,在可用区 US-East-1b
两个子网都在不同的区域
创建两个路由表
1.Route 具有 Public 子网 (10.0.1.0/24) 的表 1 并添加了 Internet 网关。
2.Route 带有私有子网 (10.0.2.0/24) 没有互联网网关的表 2
修改了默认网络 ACL 以仅允许 HTTP、HTTPS、TELNET、SSH 的入站流量
对于出站流量 -ALLOW ALL
我用 PUBLIC SUBNET(10.0.1.0/24) 启动了一个 EC2 实例
这些 EC2 实例具有 Public IP 和私有 IP。
和 EC2 安全组
INBOUND- 0.0.0.0/0 的 HTTP、HTTPS、SSH
出站 -ALL for 0.0.0.0/0
我能够登录到 ec2 控制台和 sudo -i 成为 sudo 用户
确认我可以正常连接到互联网
ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=56 time=1.27 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=56 time=1.39 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=56 time=1.43 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 1.270/1.366/1.438/0.082 ms
然后当我尝试执行 yum update -y 或尝试执行 yum install httpd
我遇到以下错误
"# yum update -y
Loaded plugins: priorities, update-motd, upgrade-helper
Could not retrieve mirrorlist http://repo.ap-south-1.amazonaws.com/latest/main/mirror.list error was
12: Timeout on http://repo.ap-south-1.amazonaws.com/latest/main/mirror.list: (28,
'Resolving timed out after 5515 milliseconds')
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Disable the repository, so yum won't use it by default. Yum will then
just ignore the repository until you permanently enable it again or use
--enablerepo for temporary usage:
yum-config-manager --disable <repoid>
4. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
当我使用 Public Ip 启动实例并拥有 Internet 网关和
为 ec2 实例级别打开 HTTP、HTTPS、SSH 端口和
对于 VPC 级别 -HTTP、HTTPS、SSH、TELENET 已为入站打开,仍然出现上述错误。?
尝试执行yum repolist看看repos是否可用,也可以提供"/etc/yum.repos.d/*"的配置文件看看repo有没有错误文件。
我认为您必须为您的自定义 VPC 启用 DNS 解析,这可能会解决您的问题。
有什么解决办法??我尝试从头开始设置新的 VPC。 我在孟买地区创建了一个 CIDR 10.0.0.0/16 的 VPC。 并创建了一个 Internet Gate 方式并附加到这些 VPC。 创建了两个子网 1)10.0.1.0/24,使用 Public IP,在可用区 US-East-1a 2)10.0.2.0/24 没有 public Ip,在可用区 US-East-1b 两个子网都在不同的区域
创建两个路由表 1.Route 具有 Public 子网 (10.0.1.0/24) 的表 1 并添加了 Internet 网关。 2.Route 带有私有子网 (10.0.2.0/24) 没有互联网网关的表 2
修改了默认网络 ACL 以仅允许 HTTP、HTTPS、TELNET、SSH 的入站流量 对于出站流量 -ALLOW ALL
我用 PUBLIC SUBNET(10.0.1.0/24) 启动了一个 EC2 实例 这些 EC2 实例具有 Public IP 和私有 IP。 和 EC2 安全组 INBOUND- 0.0.0.0/0 的 HTTP、HTTPS、SSH 出站 -ALL for 0.0.0.0/0
我能够登录到 ec2 控制台和 sudo -i 成为 sudo 用户
确认我可以正常连接到互联网
ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=56 time=1.27 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=56 time=1.39 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=56 time=1.43 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 1.270/1.366/1.438/0.082 ms
然后当我尝试执行 yum update -y 或尝试执行 yum install httpd
我遇到以下错误
"# yum update -y
Loaded plugins: priorities, update-motd, upgrade-helper
Could not retrieve mirrorlist http://repo.ap-south-1.amazonaws.com/latest/main/mirror.list error was
12: Timeout on http://repo.ap-south-1.amazonaws.com/latest/main/mirror.list: (28,
'Resolving timed out after 5515 milliseconds')
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Disable the repository, so yum won't use it by default. Yum will then
just ignore the repository until you permanently enable it again or use
--enablerepo for temporary usage:
yum-config-manager --disable <repoid>
4. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
当我使用 Public Ip 启动实例并拥有 Internet 网关和 为 ec2 实例级别打开 HTTP、HTTPS、SSH 端口和 对于 VPC 级别 -HTTP、HTTPS、SSH、TELENET 已为入站打开,仍然出现上述错误。?
尝试执行yum repolist看看repos是否可用,也可以提供"/etc/yum.repos.d/*"的配置文件看看repo有没有错误文件。
我认为您必须为您的自定义 VPC 启用 DNS 解析,这可能会解决您的问题。