- 최신
- 최다 투표
- 가장 많은 댓글
The DNS name al2023-repos-default-de612dc2.s3.dualstack.default.amazonaws.com can't be resolved, because it's invalid.
As to how this has happened .... the YUM repos are defined in files in the files in /etc/yum.repos.d/, the key bits are the rows of the form:
mirrorlist=https://al2023-repos-$awsregion-de612dc2.s3.dualstack.$awsregion.$awsdomain/core/mirrors/....
The shell variables should be expanded when the yum
command is run, $awsregion should become the region the EC2 is provisioned in, and $awsdomain should become amazonaws.com.
The second one is happening on your EC2, the first one isn't (so it's being expanded to default instead).
In which region is the EC2 provisioned? And what are the contents of these files (they are ASCII text files so it's safe to cat
them)?
/etc/dnf/vars/awsregion
/etc/dnf/vars/awsdomain
/etc/cloud/cloud.cfg.d/10_aws_dnfvars.cfg
/etc/yum.repos.d/amazonlinux.repo
Also (and this may not be related, but just in case) the shell prompt has changed from the expected ec2-user@ip-172-31-0-10 to ec2-user@localhost. What change was made on the system to effect this?
So the region was the problem. However, on the incorrect region, I was still unable to make a successful instance that actually worked.
관련 콘텐츠
- AWS 공식업데이트됨 일 년 전
- AWS 공식업데이트됨 4달 전
- AWS 공식업데이트됨 2년 전
So, the fact that I am showing localhost instead of IP may be related to how I setup the incoming permissions?
My old saved security groups were somehow deleted by AWS, and all my instances were shut down.
I am trying to start over from scratch.
Edit: I modified my permissions to Have SSH to MYIP and ALL Traffic for TCP, now the shall prompt shows my ip instead of localhost. Now I am seeing this:
Errors during downloading metadata for repository 'amazonlinux':
No, I don't believe so. Fact is it may well not be anything to do with the issue at hand (errors running
yum
), but it's out-of-the-ordinary and it would be worth understanding why it's happening, in case it turns out there is a link.That's unusual, and shouldn't normally have happened. Are you sure you are looking in the right region?
Your yum problem remains, what are the contents those four text files requested in the original answer?