Docker-alpine: Repository down

Created on 23 Mar 2016  ·  49Comments  ·  Source: gliderlabs/docker-alpine

I'm using this image but as soon as I start using the command

RUN apk update && apk upgrade

it throws errors on missing repositories:

`fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz

ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.3/main: IO ERROR

WARNING: Ignoring APKINDEX.5a59b88b.tar.gz: No such file or directory
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz

ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.3/community: IO ERROR

WARNING: Ignoring APKINDEX.7c1f02d6.tar.gz: No such file or directory

2 errors; 11 distinct packages available
`

It looks like the content delivery network is down or it changed

question upstream

Most helpful comment

Use this:

# Use dl-4, as the main repo is down (23.08.2016)
RUN sed -i -e 's/dl-cdn/dl-4/' /etc/apk/repositories && \
    apk add --no-cache \
        bash \
        build-base \
...

All 49 comments

It seems like the domain is expired...

what's going on? 8 hours already

Indexes used by apk in /etc/apk/repositories are unreachable.

Instead of http://dl-cdn.alpinelinux.org/alpine/v3.3/main,
use http://dl-4.alpinelinux.org/alpine/v3.3/main (for now).

See options.

I had the same issue, it seems fixed now.

The alpinelinux.org domain expired and was renewed. It is taking a while for caches to expire and get the correct IP addresses again. It should start working again today.

I am having this problem now

I'm also seeing it all of a sudden today. Can't resolve dl-cdn.alpinelinux.org. The domain couldn't have expired again so quickly. Anyone involved with Alpine Linux know what's going on?

@andyshinn I'm seeing that it's still registered, but there's no nameservers for alpinelinux.org anymore...

should be back now

If I see that correctly, the domain cannot be resolved because the name server hostnames rely on it.
It is not possible to resolve ns1.alpinelinux.org to get the name server of alpinelinux.org to query *.alpinelinux.org.

Name Server: NS2.ALPINELINUX.ORG
Name Server: NS1.ALPINELINUX.ORG

glue records are used to solve that problem.

@ncopa you're right. Is back online 👍

Still getting this

@niktrix exactly what are you getting? IO error? DNS lookup failure? something else?

ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.4/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.167438ca.tar.gz: No such file or directory
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.4/community: temporary error (try again later)

I'm getting this today whenever I try to apk update or apk add. Specifically:

fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.4/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.167438ca.tar.gz: No such file or directory
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.4/community: temporary error (try again later)
WARNING: Ignoring APKINDEX.a2e6dac0.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
  openssh (missing):
    required by: world[openssh]

@nihakue Try restarting Docker, that solved it for me today.

I've been having a similar issue.

Step 6 : RUN apk add --no-cache --update curl mongodb-tools netcat-openbsd
 ---> Running in f01379bab48c
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.4/main: temporary error (try again later)
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz: temporary error (try again later)
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.4/community: temporary error (try again later)
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz: temporary error (try again later)
fetch http://dl-4.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
ERROR: http://dl-4.alpinelinux.org/alpine/edge/testing: temporary error (try again later)
fetch http://dl-4.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-4.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz: temporary error (try again later)
ERROR: unsatisfiable constraints:
  curl (missing):
    required by: world[curl]
  mongodb-tools (missing):
    required by: world[mongodb-tools]
  netcat-openbsd (missing):
    required by: world[netcat-openbsd]
The command '/bin/sh -c apk add --no-cache --update curl mongodb-tools netcat-openbsd' returned a non-zero code: 3

I can access dl-cdn.alpinelinux.org and dl-4.alpinelinux.org. I can use wget on the host to download APKINDEX.tar.gz files. Tried restarting the docker service and restarting the host vm (centos 6), neither of those seemed to help. Not really sure where to go from here.

Use this:

# Use dl-4, as the main repo is down (23.08.2016)
RUN sed -i -e 's/dl-cdn/dl-4/' /etc/apk/repositories && \
    apk add --no-cache \
        bash \
        build-base \
...

The @IlyaSemenov solution works for me. Thanks

@IlyaSemenov Thanks!!
I decided to use only when it fails.

RUN apk add --no-cache nodejs || \
    (sed -i -e 's/dl-cdn/dl-4/g' /etc/apk/repositories && apk add --no-cache nodejs)

Well, I retried and it works like MAZIC.

running into this again.

fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.5/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.c51f8f92.tar.gz: No such file or directory
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.5/community: temporary error (try again later)
WARNING: Ignoring APKINDEX.d09172fd.tar.gz: No such file or directory
2 errors; 49 distinct packages available

repository down?

fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz: temporary error (try again later)
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz: temporary error (try again later)
ERROR: unsatisfiable constraints:
  tzdata (missing):
    required by: world[tzdata]
$ curl -I http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
HTTP/1.1 503 Connection timed out
Server: Varnish
Retry-After: 0
Content-Type: text/html; charset=utf-8
Content-Length: 454
Accept-Ranges: bytes
Date: Thu, 16 Mar 2017 01:57:32 GMT
Via: 1.1 varnish
Connection: close
X-Served-By: cache-nrt6124-NRT
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1489629450.029380,VS0,VE2000

$ curl -I http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
HTTP/1.1 503 backend read error
Server: Varnish
Retry-After: 0
Content-Type: text/html; charset=utf-8
Content-Length: 448
Accept-Ranges: bytes
Date: Thu, 16 Mar 2017 01:57:56 GMT
Via: 1.1 varnish
Connection: close
X-Served-By: cache-nrt6129-NRT
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1489629463.326330,VS0,VE13361

Build fails on hub.docker.com too.

fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz

ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.5/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.c51f8f92.tar.gz: No such file or directory
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz

ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.5/community: temporary error (try again later)
WARNING: Ignoring APKINDEX.d09172fd.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
  openvpn (missing):
    required by: world[openvpn]

This fixed it for me...

docker exec -it $ID sed -i -e 's/dl-cdn/dl-4/' /etc/apk/repositories
then
docker exec -it $ID apk add --update drill

I'm following Victor Farcic's DevOps 2.1 tutorial / book.

Seems to be resolved.

I got the error again today. Has anyone encountered this again ?

@danielmihai Try restarting Docker, that solved it for me today.

I did that 3 times already, even replaced the dl-cdn with dl-4.. doesn't
work.. any other recommendations ?

Important detail: i'm behind a proxy. i've set the docker proxy options as
recommended in the docker docs.

On Mon, Apr 24, 2017 at 5:10 PM, alamzeeshan notifications@github.com
wrote:

@danielmihai https://github.com/danielmihai Try restarting Docker, that
solved it for me today.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/gliderlabs/docker-alpine/issues/155#issuecomment-296680347,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABzKA2qXAO_KeHeU8JPJOeAYWSDr5kkpks5rzK1bgaJpZM4H2yQE
.

@danielmihai Did you check that the packages you're trying to install are actually in those repositories?

I've just had an issue where one of the packages moved to /edge/community repository and another one moved to /v3.5/main

@danielmihai were you able to resolve this issue?

Haven't tried again, had to finish the task, so I found a workaround,
didn't need those images for the task.. will try again after I finish with
all.

Thanks for supporting me!

On Wed, Apr 26, 2017 at 12:27 PM, Katiyman notifications@github.com wrote:

@danielmihai https://github.com/danielmihai were you able to resolve
this issue?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/gliderlabs/docker-alpine/issues/155#issuecomment-297316344,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABzKA32lVU4KsVGuLxlyTbhJn2peVRB_ks5rzw3sgaJpZM4H2yQE
.

Add Google's DNS to your nameservers list

docker-machine ssh <host>
sudo su
echo 'nameserver 8.8.8.8' >> /etc/resolv.conf
exit

Domain alpinelinux.org is down again. Anyone else?

Yes it down for me as well

I'm facing the same problem, any idea?

for me as well:

curl http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>503 Connection timed out</title>
  </head>
  <body>
    <h1>Error 503 Connection timed out</h1>
    <p>Connection timed out</p>
    <h3>Guru Mediation:</h3>
    <p>Details: cache-XXXXXXXX</p>
    <hr>
    <p>Varnish cache server</p>
  </body>
</html>

So kinda hacky, but if you want to be unblocked, figure out the version you need and add the mirror like so (Dockerfile):
RUN echo "http://dl-5.alpinelinux.org/alpine/v3.4/main/" >> /etc/apk/repositories

Then you can run your apk commands:
RUN apk add --update python make g++

There are other mirror sites, 1-5:
http://dl-1.alpinelinux.org
http://dl-2.alpinelinux.org
http://dl-3.alpinelinux.org
http://dl-4.alpinelinux.org
http://dl-5.alpinelinux.org

But at this moment I am only able to get dl-5 working.

Hope this helps anyone! @stephanlindauer

Or alternatively, you can pass as argument:
RUN apk add python make g++ --repository http://dl-5.alpinelinux.org/alpine/v3.4/main/

This has been down for me a lot since Friday (5/12). When I am seeing the issue, adding the dl-1, dl-2, etc mirrors does not help.

dl-1 looks to be down atm. http://dl-cdn.alpinelinux.org/ is up and there has been less than .01% error rate since the 11th.

Looks like they gave up on using tls on the dl-[1-5].alpinelinux.org servers?
https://bugs.alpinelinux.org/issues/4982
dl-cdn redirects to dl-[1-5]? Pulling packages without tls is unacceptable for production.

Looks like https://dl-3.alpinelinux.org/ is working currently, combine that with @camsjams suggestion and you can properly get TLS for production. Worked in my case

Oh wow, thanks. I didn't think to try all of them. dl-3 and only dl-3 has a legit cert. Thanks! I'm doing this for good measure:

ADD https://gist.github.com/erkolson/e9f27061a29953aa23341cb392abd39f/raw /retry.sh
RUN chmod +x /retry.sh && \
    /retry.sh 10 \
    apk add --no-cache \
    tini

@erkolson seems your solution didn't help me.
Also, I tried dl-3 and dl-5.

After some debugging and googling I found that problem was inside the container and based on DNS, so the best way in my case was:
create/edit file/etc/docker/daemon.json
And add in it text:
{"dns": ["8.8.8.8", "8.8.8.4"] }

Link to - http://stackoverflow.com/a/42332682

This specific issue "Repository down" with IO ERROR form March 2016 was resolved in March 2016.

Please open new issue if you have new issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gliptak picture gliptak  ·  4Comments

oarmstrong picture oarmstrong  ·  4Comments

michaelshobbs picture michaelshobbs  ·  3Comments

filiptodoric picture filiptodoric  ·  3Comments

rmNyro picture rmNyro  ·  3Comments