Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dl-cdn.alpinelinux.org errors #386

Closed
accursoft opened this issue Mar 4, 2018 · 82 comments
Closed

dl-cdn.alpinelinux.org errors #386

accursoft opened this issue Mar 4, 2018 · 82 comments

Comments

@accursoft
Copy link

$ apk add --no-cache bash
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
(1/6) Installing pkgconf (1.3.10-r0)
(2/6) Installing ncurses-terminfo-base (6.0_p20171125-r0)
(3/6) Installing ncurses-terminfo (6.0_p20171125-r0)
ERROR: ncurses-terminfo-6.0_p20171125-r0: Protocol error
(4/6) Installing ncurses-libs (6.0_p20171125-r0)
(5/6) Installing readline (7.0.003-r0)
(6/6) Installing bash (4.4.19-r1)
ERROR: bash-4.4.19-r1: Protocol error
Executing busybox-1.27.2-r7.trigger
2 errors; 5 MiB in 15 packages

Been getting this for a few days now.

@GaudamThiyagarajan
Copy link

is there any update on this? Im too getting this error

@rouing
Copy link

rouing commented Mar 13, 2018

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
2 errors; 11 distinct packages available
WARNING: Ignoring APKINDEX.167438ca.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.a2e6dac0.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
  curl (missing):
    required by: world[curl]
WARNING: Ignoring APKINDEX.167438ca.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.a2e6dac0.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
  pcre (missing):
    required by: world[pcre]
./mnt/install/install.sh: line 15: curl: not found
grep: unrecognized option: P

@jakubszlendak
Copy link

Also getting these errors.

@alexandermuehle
Copy link

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

CDN seems to be down again

@kbaegis
Copy link

kbaegis commented Mar 27, 2018

+1

Had this issue, but realized that it was a defective docker bridge or something. Restarting the daemon fixed it for me and the troubleshooting process was working back from DNS resolution, routing, etc from the pertinent host.

@GaudamThiyagarajan
Copy link

adding RUN echo -e "http://nl.alpinelinux.org/alpine/v3.5/main\nhttp://nl.alpinelinux.org/alpine/v3.5/community" > /etc/apk/repositories fixed my issue

@JPWKU
Copy link

JPWKU commented Mar 29, 2018

#279 is a similar issue from the past.
I would like to report that we are also seeing timeouts updating against dl-cdn.alpinelinux.org.
I have sidestepped the issue by adding references to one of the mirrors in our Dockerfile.

@prawen
Copy link

prawen commented Apr 10, 2018

Hello,

Is there any fix available for this? I'm getting same error especially in APAC region.

Step 1/14 : FROM openjdk:8u151-jdk-alpine3.7
---> 224765a6bdbe
Step 2/14 : RUN apk add --no-cache bash
---> Running in 9f36177aa798
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
(1/6) Installing pkgconf (1.3.10-r0)
(2/6) Installing ncurses-terminfo-base (6.0_p20171125-r0)
ERROR: ncurses-terminfo-base-6.0_p20171125-r0: Protocol error
(3/6) Installing ncurses-terminfo (6.0_p20171125-r0)
(4/6) Installing ncurses-libs (6.0_p20171125-r0)
(5/6) Installing readline (7.0.003-r0)
(6/6) Installing bash (4.4.19-r1)
ERROR: bash-4.4.19-r1: Protocol error
Executing busybox-1.27.2-r7.trigger
2 errors; 107 MiB in 55 packages
The command '/bin/sh -c apk add --no-cache bash' returned a non-zero code: 2

@GaudamThiyagarajan
Copy link

GaudamThiyagarajan commented Apr 10, 2018

@prawen
RUN echo -e "http://nl.alpinelinux.org/alpine/v3.5/main\nhttp://nl.alpinelinux.org/alpine/v3.5/community" > /etc/apk/repositories

fixed my issue before your $ apk add --no-cache bash

@JoFAM
Copy link

JoFAM commented Apr 11, 2018

Had the same error trying to build an alpine-sdk docker using Docker Windows 10. Checked the status of the server, and the server was fine and reachable outside docker.

Restarting docker did the trick for me. Looking in the Docker log file it's clear that the DNS configuration was set incorrectly. So when seeing this error in a docker context, try to restart docker first.

@prawen
Copy link

prawen commented Apr 12, 2018

After trying both the workarounds I'm still getting below error.

Step 1/15 : FROM openjdk:8u151-jdk-alpine3.7
---> 224765a6bdbe
Step 2/15 : RUN echo -e "http://nl.alpinelinux.org/alpine/v3.5/main\nhttp://nl.alpinelinux.org/alpine/v3.5/community" > /etc/apk/repositories
---> Using cache
---> 62d6f04e3f75
Step 3/15 : RUN apk add --no-cache bash
---> Running in 316074569bd7
fetch http://nl.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
(1/5) Installing ncurses-terminfo-base (6.0_p20171125-r0)
(2/5) Installing ncurses-terminfo (6.0_p20171125-r0)
(3/5) Installing ncurses-libs (6.0_p20171125-r0)
ERROR: ncurses-terminfo-6.0_p20171125-r0: BAD signature
(4/5) Installing readline (6.3.008-r4)
(5/5) Installing bash (4.3.46-r5)

@azyata
Copy link

azyata commented Apr 26, 2018

If you do not know what the reason is, then it is probably DNS

  • 8.8.8.8 cannot resolve dl-cdn.alpinelinux.org
  • ns1.alpinelinux.org can resolve dl-cdn.alpinelinux.org
  • dl-cdn.alpinelinux.org is CNAME for global.prod.fastly.net
  • ns1.alpinelinux.org cannot resolve global.prod.fastly.net
  • 8.8.8.8 can resolve global.prod.fastly.net
dig http://dl-cdn.alpinelinux.org

; <<>> DiG 9.10.3-P4-Ubuntu <<>> http://dl-cdn.alpinelinux.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 11102
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;http://dl-cdn.alpinelinux.org.	IN	A

;; AUTHORITY SECTION:
alpinelinux.org.	899	IN	SOA	ns1.alpinelinux.org. webmaster.alpinelinux.org. 20180406 1800 1800 3600 3600

;; Query time: 95 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Thu Apr 26 11:28:52 CEST 2018
;; MSG SIZE  rcvd: 108
dig @ns1.alpinelinux.org dl-cdn.alpinelinux.org

; <<>> DiG 9.10.3-P4-Ubuntu <<>> @ns1.alpinelinux.org dl-cdn.alpinelinux.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29219
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;dl-cdn.alpinelinux.org.		IN	A

;; ANSWER SECTION:
dl-cdn.alpinelinux.org.	3600	IN	CNAME	global.prod.fastly.net.

;; Query time: 150 msec
;; SERVER: 74.117.189.114#53(74.117.189.114)
;; WHEN: Thu Apr 26 11:29:27 CEST 2018
;; MSG SIZE  rcvd: 87

dig @ns1.alpinelinux.org global.prod.fastly.net

; <<>> DiG 9.10.3-P4-Ubuntu <<>> @ns1.alpinelinux.org global.prod.fastly.net
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 45878
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;global.prod.fastly.net.		IN	A

;; Query time: 151 msec
;; SERVER: 74.117.189.114#53(74.117.189.114)
;; WHEN: Thu Apr 26 11:29:40 CEST 2018
;; MSG SIZE  rcvd: 51
dig @8.8.8.8 global.prod.fastly.net

; <<>> DiG 9.10.3-P4-Ubuntu <<>> @8.8.8.8 global.prod.fastly.net
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24521
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;global.prod.fastly.net.		IN	A

;; ANSWER SECTION:
global.prod.fastly.net.	29	IN	A	151.101.0.249
global.prod.fastly.net.	29	IN	A	151.101.64.249
global.prod.fastly.net.	29	IN	A	151.101.128.249
global.prod.fastly.net.	29	IN	A	151.101.192.249

;; Query time: 41 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Apr 26 11:29:52 CEST 2018
;; MSG SIZE  rcvd: 115

@helgeolav
Copy link

It seems to be an issue with wget (or any other tool fetching data) not sending host header when requesting resources.

@neclimdul
Copy link

not sure what you mean. Here's the wireshark of apk requesting the APKINDEX.tar.gz
selection_128

@jingax10
Copy link

I hit the same error. Any more update?

RUN echo -e "http://nl.alpinelinux.org/alpine/v3.5/main\nhttp://nl.alpinelinux.org/alpine/v3.5/community" > /etc/apk/repositoriesdoes not work for me :-(

@neuralsandwich
Copy link

neuralsandwich commented Jul 30, 2018

Running the echo command and it didn't seem to help. I ended up just restarting my laptop and that seemed to work.

@amarjeet27
Copy link

Any others suggestions on working around this issue?

@us108y
Copy link

us108y commented Aug 9, 2018

Not working for me any updates on this ,,

This is annoying

@azalio
Copy link

azalio commented Oct 20, 2018

In my situation was wrong /etc/resolv.conf file.
Just check in a container
ping dl-cdn.alpinelinux.org

@syedsaadqamar
Copy link

It's DNS issue you can solve it by using the following steps:

  1. Find your DNS ip using below command
    nmcli dev show | grep 'IP4.DNS'

IP4.DNS[1]: 192.168.0.1

  1. Create a file in the desktop which name is deamon.json and file has below data:
    {
    "dns": ["192.168.0.1", "8.8.8.8"]
    }

note: replace that ip "192.168.0.1" to your dns ip

  1. Go that directory /etc/docker/ in your system and paste file deamon.json that you just created

  2. Then restart your docker/your system, it will solve your issue.

@drpreag
Copy link

drpreag commented Jan 22, 2019

Seems your docker can not go out of host machine. Maybe this can help:

iptables -t nat -A POSTROUTING ! -o docker0 -s 172.17.0.0/16 -j MASQUERADE

@deepsnitk
Copy link

Please use docker run -e OR docker build --build-arg to pass http_proxy env variable required for apk package manager

@adigunhammedolalekan
Copy link

@GaudamThiyagarajan solution worked for me

@s8sg
Copy link

s8sg commented May 8, 2019

as pointed out by @azyata its can be a problem with the DNS settings

If you are performing apk add inside the container, below might be helpful

From docs.docker.com:

By default, a container inherits the DNS settings of the Docker daemon
including the /etc/hosts and /etc/resolv.conf

  1. Try to ping
ping dl-cdn.alpinelinux.org

if it doesn't work

  1. Check DNS configuration in /etc/resolve.conf in host machine, try adding
nameserver 8.8.8.8

then perform ping

ping dl-cdn.alpinelinux.org

if it works for you, then

  1. Restart the docker daemon
sudo systemctl restart docker

^ This solved the problem for me.

@QACodeDev
Copy link

I am also getting below error:

fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz: IO ERROR
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz: IO ERROR

@hspens
Copy link

hspens commented Sep 27, 2019

I'm behind a proxy and I experienced a similar error:

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

I solved it by creating a daemon.json file in /etc/docker/

sudo nano /etc/docker/daemon.json

and inserting:

{
  "bip": "192.168.1.5/24"
}

Restart docker and try again:

sudo systemctl daemon-reload
sudo systemctl restart docker

If I were to guess I'd say that docker bridge0 clash with the proxy in some way?

@DanCharousek
Copy link

DanCharousek commented May 7, 2021

update my server DNS to Google DNS 8.8.8.8 8.8.4.4 solve this for me

Had the same problem with php 7.4 alpine image in Ubuntu inside Windows (WSL2). I was trying to install the imagick extension via pecl and kept getting "No releases available for package pecl.php.net/imagick" error. Changing the nameserver to google's 8.8.8.8 solved it for me. Thank you.

$ sudo vi /etc/resolv.conf # change nameserver to 8.8.8.8

@hinorashi
Copy link

same issue here, updating DNS resolver fixs it, but I used systemd config instead of directly modify /etc/resolv.conf (you might forget this line: This file is managed by man:systemd-resolved(8). Do not edit. 🦀)

update your /etc/systemd/resolved.conf

add something like this:

[Resolve]
DNS=1.1.1.1 8.8.8.8
FallbackDNS=8.8.4.4

restart the service:

sudo service systemd-resolved restart

verify the dns revolver:

systemd-resolve --status | grep 'DNS Servers' -A2

Now try to run your commands again 🐧

@BlackHades
Copy link

all Package on bintray has been moved

see Bintray Package Repository down #131

@wuzhefang
Copy link

also also get this error for many years

@MattFellows
Copy link

In my case installing the latest libseccomp on my host fixed it. I had to download it manually on my latest raspbian as the latest version is not yet in the apt repos.
The accepted answer in this "askubuntu" thread helped me: https://askubuntu.com/questions/1263284/apt-update-throws-signature-error-in-ubuntu-20-04-container-on-arm

Packages for debian(-based): https://packages.debian.org/sid/libseccomp2

Just download the one that fits your architecture and install with dpkg (again: only debian based).
Example for raspbian:
wget http://ftp.de.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb
sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb

This worked for me on raspberry pi. Many thanks

@wuzhefang
Copy link

In my case installing the latest libseccomp on my host fixed it. I had to download it manually on my latest raspbian as the latest version is not yet in the apt repos.
The accepted answer in this "askubuntu" thread helped me: https://askubuntu.com/questions/1263284/apt-update-throws-signature-error-in-ubuntu-20-04-container-on-arm
Packages for debian(-based): https://packages.debian.org/sid/libseccomp2
Just download the one that fits your architecture and install with dpkg (again: only debian based).
Example for raspbian:
wget http://ftp.de.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb
sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb

This worked for me on raspberry pi. Many thanks

This is works for my Raspberry Pi 4B 1.4 version. Many Thanks!

@llwwbb
Copy link

llwwbb commented Jun 11, 2021

Downgrading from alpine3.13 to alpine3.12 solved it for me.

had the same problem and with alpine 3.12 it works.

same with me, 3.13 DNS lookup error, 3.12 everything fine

@imikiani
Copy link

imikiani commented Jul 3, 2021

I am using vagrant to provision my virtual machines containing docker.
I aslo faced up with this issue. After that I ran vagrant reboot, everything worked fine.

@techvlad
Copy link

Replacing http to https in /etc/apk/repositories fix this issue for me

sed -i -e 's/http:/https:/' /etc/apk/repositories

@shahramjamshidi
Copy link

Here are lots of smart solutions to test.
But, as an initial try, please just restart the daemon first. It worked for me.
sudo systemctl restart docker.service

@lukaszkowalskifd
Copy link

same issue on alpine:3.14 and alpine:3.13
Downgrading to alpine:3.12 is working back again for me.
Using macOS, tried restarting Daemon and all other solutions here, only downgrading is working for me

@BR0kEN-
Copy link

BR0kEN- commented Nov 29, 2021

Got it working only after downgrading to alpine3.12 as @lukaszkowalskifd did.

@reeversedev
Copy link

Have been using just alpine and obviously it picks the latest version, in my case, it was v3.15.

Downgrading to alpine:3.12 worked.

@Arun221196
Copy link

how to downgrade the alpine version

@Arun221196
Copy link

alpine

how to downgrade the alpine version from 3.15 to 3.12

@KEINOS
Copy link

KEINOS commented Apr 4, 2022

@Arun221196

how to downgrade the alpine version

Just specify the tag. For example, "alpine:3.12".

$ # Latest Alpine
$ docker run --rm alpine:latest grep '^VERSION' /etc/os-release
VERSION_ID=3.15.3
$ # Alpine 3.15
$ docker run --rm alpine:3.15 grep '^VERSION' /etc/os-release
VERSION_ID=3.15.3
$ # Alpine 3.12
$ docker run --rm alpine:3.12 grep '^VERSION' /etc/os-release
VERSION_ID=3.12.11

To be honest, I don't think the Alpine base image is suitable for beginners; until you are familiar with the basics of Docker, such as the docker command and the Dockerfile, I would recommend using a Debian or Ubuntu base image instead of Alpine to begin. Trust me. I've been there.
I agree that the documentation on how to start and write a Dockerfile is, frankly, complex. But this is not the place to ask. Good luck though 👍

@adv4000
Copy link

adv4000 commented Mar 23, 2023

Just rebooted my Ubuntu and it solved this issue.

@Will4096
Copy link

Will4096 commented Jul 10, 2023

I had a similar issue, but I have solved it by using args --network=host
eg.
docker build --network=host -t myimage .

@ncopa
Copy link
Collaborator

ncopa commented Jul 11, 2023

Had this issue, but realized that it was a defective docker bridge or something. Restarting the daemon fixed it for me

So a local issue.

Replacing http to https in /etc/apk/repositories fix this issue for me

We do this in the official alpine images nowadays.

Just rebooted my Ubuntu and it solved this issue.

So a local issue.

I'm closing this.

@ncopa ncopa closed this as completed Jul 11, 2023
@devzom
Copy link

devzom commented Jul 18, 2023

this worked best for me, setting it in Dockerfile, importantly with /g flag

RUN sed -ie "s/https/http/g" /etc/apk/repositories

@WGrape
Copy link

WGrape commented Oct 17, 2023

Replacing http to https in /etc/apk/repositories fix this issue for me

sed -i -e 's/http:/https:/' /etc/apk/repositories

wesome, you are the most correct answer! Thank you very much. I applaud you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests