【发布时间】:2021-12-01 19:16:42
【问题描述】:
在 aws ec2 上创建了一个实例,并且在初始设置之后一切正常。但过了一段时间(大约第二天),服务器似乎失去了与互联网的连接。我可以连接到它,但我无法下载任何数据包。我也无法执行任何 curl 请求。只有创建服务器映像然后创建新配置才能解决问题,但第二天问题又出现了。知道如何解决这个问题吗?
创建实例时,网络设置被选为标准。 Ubuntu 18.04
示例输出:
apt update
Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out
Err:2 http://eu-west-2.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Could not connect to eu-west-2.ec2.archive.ubuntu.com:80 (54.229.225.193), connection timed out Could not connect to eu-west-2.ec2.archive.ubuntu.com:80 (54.246.214.20), connection timed out Could not connect to eu-west-2.ec2.archive.ubuntu.com:80 (34.253.229.19), connection timed out Could not connect to eu-west-2.ec2.archive.ubuntu.com:80 (34.241.117.189), connection timed out Could not connect to eu-west-2.ec2.archive.ubuntu.com:80 (54.229.116.227), connection timed out Could not connect to eu-west-2.ec2.archive.ubuntu.com:80 (34.253.189.82), connection timed out
Err:3 http://eu-west-2.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease
Unable to connect to eu-west-2.ec2.archive.ubuntu.com:http:
Err:4 http://eu-west-2.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease
Unable to connect to eu-west-2.ec2.archive.ubuntu.com:http:
Reading package lists... Done
Building dependency tree
Reading state information... Done
35 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://eu-west-2.ec2.archive.ubuntu.com/ubuntu/dists/bionic/InRelease Could not connect to eu-west-2.ec2.archive.ubuntu.com:80 (54.229.225.193), connection timed out Could not connect to eu-west-2.ec2.archive.ubuntu.com:80 (54.246.214.20), connection timed out Could not connect to eu-west-2.ec2.archive.ubuntu.com:80 (34.253.229.19), connection timed out Could not connect to eu-west-2.ec2.archive.ubuntu.com:80 (34.241.117.189), connection timed out Could not connect to eu-west-2.ec2.archive.ubuntu.com:80 (54.229.116.227), connection timed out Could not connect to eu-west-2.ec2.archive.ubuntu.com:80 (34.253.189.82), connection timed out
W: Failed to fetch http://eu-west-2.ec2.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Unable to connect to eu-west-2.ec2.archive.ubuntu.com:http:
W: Failed to fetch http://eu-west-2.ec2.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Unable to connect to eu-west-2.ec2.archive.ubuntu.com:http:
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.
【问题讨论】:
标签: amazon-web-services ubuntu amazon-ec2 server instance