aws-samples / aws-glue-samples

AWS Glue code samples
MIT No Attribution
1.44k stars 820 forks source link

Couldn't resolve host name for Spark UI #151

Open mwa28 opened 1 year ago

mwa28 commented 1 year ago

While running on the latest Dockerfile from 3204a42, the following occurs on the public.ecr.aws/amazonlinux/amazonlinux:2023 :

$ docker build -t glue/sparkui:latest .
Sending build context to Docker daemon  13.82kB
Step 1/12 : FROM public.ecr.aws/amazonlinux/amazonlinux:2023
 ---> 53f71e804509
Step 2/12 : RUN dnf --setopt=install_weak_deps=False install -y java-1.8.0-amazon-corretto maven-amazon-corretto8 procps tar gzip && dnf clean all
 ---> Running in c8967c7d0f9e
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://cdn.amazonlinux.com/al2023/core/mirrors/2023.2.20231030/x86_64/mirror.list [getaddrinfo() thread failed to start]
Error: Failed to download metadata for repo 'amazonlinux': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://cdn.amazonlinux.com/al2023/core/mirrors/2023.2.20231030/x86_64/mirror.list [getaddrinfo() thread failed to start]
Ignoring repositories: amazonlinux
No match for argument: java-1.8.0-amazon-corretto
No match for argument: maven-amazon-corretto8
No match for argument: procps
No match for argument: tar
No match for argument: gzip
Error: Unable to find a match: java-1.8.0-amazon-corretto maven-amazon-corretto8 procps tar gzip
The command '/bin/sh -c dnf --setopt=install_weak_deps=False install -y java-1.8.0-amazon-corretto maven-amazon-corretto8 procps tar gzip && dnf clean all' returned a non-zero code: 1
[malhalabi@qa/ids-nonreg1] (~/docker_spark_ui)$ docker build -t glue/sparkui:latest .
Sending build context to Docker daemon  13.82kB
Step 1/12 : FROM public.ecr.aws/amazonlinux/amazonlinux:latest
latest: Pulling from amazonlinux/amazonlinux
Digest: sha256:4dea3e7f050c8946b29a40f759da06eb2a2046821e66facd7df1bb0e1ce87914
Status: Downloaded newer image for public.ecr.aws/amazonlinux/amazonlinux:latest
 ---> 53f71e804509
Step 2/12 : RUN dnf --setopt=install_weak_deps=False install -y java-1.8.0-amazon-corretto maven-amazon-corretto8 procps tar gzip && dnf clean all
 ---> Running in c6573ca33150
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://cdn.amazonlinux.com/al2023/core/mirrors/2023.2.20231030/x86_64/mirror.list [getaddrinfo() thread failed to start]
Error: Failed to download metadata for repo 'amazonlinux': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://cdn.amazonlinux.com/al2023/core/mirrors/2023.2.20231030/x86_64/mirror.list [getaddrinfo() thread failed to start]
Ignoring repositories: amazonlinux
No match for argument: java-1.8.0-amazon-corretto
No match for argument: maven-amazon-corretto8
No match for argument: procps
No match for argument: tar
No match for argument: gzip
Error: Unable to find a match: java-1.8.0-amazon-corretto maven-amazon-corretto8 procps tar gzip
The command '/bin/sh -c dnf --setopt=install_weak_deps=False install -y java-1.8.0-amazon-corretto maven-amazon-corretto8 procps tar gzip && dnf clean all' returned a non-zero code: 1
mwa28 commented 1 year ago

@stewartsmith can you please advise on what might be causing this issue ?

stewartsmith commented 1 year ago

If using an older version of Docker, it may not have the full set of seccomp rules in order to not error out some syscalls that AL2023 relies upon. If it works when running Docker with --security-opt seccomp=unconfined then this would be the case - and you'll need to get an update for the version of Docker you're running in order to continue to use seccomp with containers.

mwa28 commented 1 year ago

@stewartsmith this seems to still work well for me. It resembles what the old code was like (amazonlinux:2).

FROM amazonlinux:2023
FROM amazoncorretto:8
FROM maven:3.6-amazoncorretto-8

RUN yum install -y procps

Beyond this, dnf replacing yum is causing issues as well, this may stem from using a different linux version but for what it is worth, yum is still more flexible.

stewartsmith commented 1 year ago

What issues are you finding with dnf over yum? It does tend to cover all the use cases of yum.