Unable to install services on my instance. Take Two.

0

What am I doing wrong?

I could have swore I am doing it right.

[ec2-user@localhost ~]$ sudo yum install -y telnet-server

Amazon Linux 2023 repository 0.0 B/s | 0 B 00:00 Errors during downloading metadata for repository 'amazonlinux':

Curl error (6): Couldn't resolve host name for https://al2023-repos-default-de612dc2.s3.dualstack.default.amazonaws.com/core/mirrors/2023.2.20231113/x86_64/mirror.list [Could not resolve host: al2023-repos-default-de612dc2.s3.dualstack.default.amazonaws.com] Error: Failed to download metadata for repo 'amazonlinux': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://al2023-repos-default-de612dc2.s3.dualstack.default.amazonaws.com/core/mirrors/2023.2.20231113/x86_64/mirror.list [Could not resolve host: al2023-repos-default-de612dc2.s3.dualstack.default.amazonaws.com] Amazon Linux 2023 Kernel Livepatch repository 0.0 B/s | 0 B 00:00 Errors during downloading metadata for repository 'kernel-livepatch': Curl error (6): Couldn't resolve host name for https://al2023-repos-default-de612dc2.s3.dualstack.default.amazonaws.com/kernel-livepatch/mirrors/al2023/x86_64/mirror.list [Could not resolve host: al2023-repos-default-de612dc2.s3.dualstack.default.amazonaws.com] Error: Failed to download metadata for repo 'kernel-livepatch': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://al2023-repos-default-de612dc2.s3.dualstack.default.amazonaws.com/kernel-livepatch/mirrors/al2023/x86_64/mirror.list [Could not resolve host: al2023-repos-default-de612dc2.s3.dualstack.default.amazonaws.com] Ignoring repositories: amazonlinux, kernel-livepatch No match for argument: telnet-server Error: Unable to find a match: telnet-server

Please instruct me how to resolve this problem, instead of just linking me to rhetoric.

Filtering through a link's contents will only further confuse me, as I had this working once. AWS just decided to shut down all my instances, and deleted all my saved security groups and keypairs, so I am trying to replicate what i did before from nothing.

Hijak3k
asked 3 months ago376 views
2 Answers
1
Accepted Answer

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?

profile picture
EXPERT
Steve_M
answered 3 months ago
  • 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':

  • So, the fact that I am showing localhost instead of IP may be related to how I setup the incoming permissions?

    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.

    My old saved security groups were somehow deleted by AWS, and all my instances were shut down.

    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?

0

So the region was the problem. However, on the incorrect region, I was still unable to make a successful instance that actually worked.

Hijak3k
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions