1

I'm trying to use docker on my raspberry pi 2B running archlinux arm, but the docker daemon cannot contact the docker registry.

docker pull hello-world results in docker daemon output:

DEBU[2020-07-02T16:47:21.391929909Z] Calling HEAD /_ping
DEBU[2020-07-02T16:47:21.394012289Z] Calling GET /v1.40/info
DEBU[2020-07-02T16:47:21.444644977Z] Calling POST /v1.40/images/create?fromImage=hello-world&tag=latest
DEBU[2020-07-02T16:47:21.445747989Z] Trying to pull hello-world from https://registry-1.docker.io v2
WARN[2020-07-02T16:47:36.446771393Z] Error getting v2 registry: Get "https://registry-1.docker.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
INFO[2020-07-02T16:47:36.447023996Z] Attempting next endpoint for pull after error: Get "https://registry-1.docker.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
ERRO[2020-07-02T16:47:36.447505346Z] Handler for POST /v1.40/images/create returned error: Get "https://registry-1.docker.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

I can however curl that address, curl https://registry-1.docker.io/v2/ gives:

{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}

I can also dig it, dig registry-1.docker.io

; <<>> DiG 9.16.4 <<>> registry-1.docker.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54200
;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;registry-1.docker.io.          IN      A

;; ANSWER SECTION:
registry-1.docker.io.   53      IN      A       52.5.11.128
registry-1.docker.io.   53      IN      A       35.174.73.84
registry-1.docker.io.   53      IN      A       52.72.232.213
registry-1.docker.io.   53      IN      A       52.1.121.53
registry-1.docker.io.   53      IN      A       52.54.232.21
registry-1.docker.io.   53      IN      A       52.4.20.24
registry-1.docker.io.   53      IN      A       54.236.131.166
registry-1.docker.io.   53      IN      A       54.85.107.53

;; Query time: 0 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Jul 02 16:54:59 UTC 2020
;; MSG SIZE  rcvd: 177

My daemon.json is:

{
    "dns": ["8.8.8.8", "8.8.4.4"],
    "debug": true
}

/etc/resolv.conf

# Generated by resolvconf
nameserver 8.8.8.8
nameserver 8.8.4.4

output of ip link:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether b8:27:eb:e1:df:6c brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether b8:27:eb:b4:8a:39 brd ff:ff:ff:ff:ff:ff
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 02:42:2b:be:08:ee brd ff:ff:ff:ff:ff:ff
5: br-35ff30d41af9: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 02:42:01:4c:7e:30 brd ff:ff:ff:ff:ff:ff

Any ideas?

Marcus Grass
  • 1,043
  • 2
  • 17
  • 38
  • Is your current kernel the same as installed one ? (`pacman -Q linux-armv7; uname --kernel-release`). If not try to reboot. – gileri Jul 02 '20 at 18:13
  • 1
    It's essentially the same: ```pacman -Q linux; uname --kernel-release``` outputs: ```linux-raspberrypi 5.4.45-1 5.4.45-1-ARCH ``` – Marcus Grass Jul 02 '20 at 18:52
  • Do you have IPv6 configured on the RPI (`ip -6 addr show eth0 scope global`) ? A dodgy IPv6 configuration and different handling of it between curl and docker may explain that ? – gileri Jul 02 '20 at 19:19
  • 1
    I should have mentioned that, i disabled the ipv6 stack with ```ipv6.disable=1``` in /boot/cmdline.txt – Marcus Grass Jul 02 '20 at 19:23

0 Answers0