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

arm64 build encounters curl: (22) The requested URL returned error: 401 Unauthorized #31435

Closed
AndyYuen opened this issue Feb 28, 2017 · 18 comments

Comments

@AndyYuen
Copy link

While doing a 1.13.x build on arm64 (ODROID-C2) using:
sudo make build
In step 28, after downloading 2 layers (of 5), it encounters:

curl: (22) The requested URL returned error: 401 Unauthorized

and the build failed. See partial output below.


Step 28 : RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2 aarch64/busybox:latest@sha256:b23a6a37cf269dff6e46d2473b6e227afa42b037e6d23435f1d2bc40fc8c2828 aarch64/debian:jessie@sha256:4be74a41a7c70ebe887b634b11ffe516cf4fcd56864a54941e56bb49883c3170 aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda
---> Running in d139f3f0e6b5
warning: 'aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2' uses schemaVersion '1'
this script cannot (currently) recreate the 'image config' to put in a 'manifest.json' (thus any schemaVersion 2+ images will be imported in the old way, and their 'docker history' will suffer)

Downloading 'aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2' (5 layers)...
######################################################################## 100.0%
######################################################################## 100.0%

curl: (22) The requested URL returned error: 401 Unauthorized
The command '/bin/sh -c ./contrib/download-frozen-image-v2.sh /docker-frozen-images aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2 aarch64/busybox:latest@sha256:b23a6a37cf269dff6e46d2473b6e227afa42b037e6d23435f1d2bc40fc8c2828 aarch64/debian:jessie@sha256:4be74a41a7c70ebe887b634b11ffe516cf4fcd56864a54941e56bb49883c3170 aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda' returned a non-zero code: 22
Makefile:96: recipe for target 'build' failed
make: *** [build] Error 22

@justincormack
Copy link
Contributor

I believe 1.13.0 worked, otherwise at present we recommend you build from master for arm64. There are various PRs in process to address this.

@MrDreamBot
Copy link

I tried the master and had the same problem. However building 1.13.1 was a success.

@justincormack
Copy link
Contributor

Ah ok, hopefully this should be resolved in master soon.

@MrDreamBot
Copy link

Thanks Justin.

@MrDreamBot
Copy link

I am building 1.17.x. It gets over the issues that you fixed. But it is now failing with the error below. I shall try the master next and see if there is a difference.


Step 27/33 : COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/
---> 50c752b2a13b
Removing intermediate container d633e7f227d4
Error removing intermediate container eecebade64fe: Driver overlay failed to remove root filesystem eecebade64fe36700d473276d691d032fc3c78ab9a907719ad93703fd7dda66c: remove /media/sata/docker/overlay/119e16cb10fda9b3f74392ef08c0b47c2664baeb0fe374e135840819db15afdd/merged: device or resource busy
Step 28/33 : RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2 aarch64/busybox:latest@sha256:b23a6a37cf269dff6e46d2473b6e227afa42b037e6d23435f1d2bc40fc8c2828 aarch64/debian:jessie@sha256:4be74a41a7c70ebe887b634b11ffe516cf4fcd56864a54941e56bb49883c3170 aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda
---> Running in 5e1f153d18c8
Downloading 'aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2' (5 layers)...
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%

Downloading 'aarch64/busybox:latest@sha256:b23a6a37cf269dff6e46d2473b6e227afa42b037e6d23435f1d2bc40fc8c2828' (2 layers)...
######################################################################## 100.0%
######################################################################## 100.0%

Downloading 'aarch64/debian:jessie@sha256:4be74a41a7c70ebe887b634b11ffe516cf4fcd56864a54941e56bb49883c3170' (2 layers)...
######################################################################## 100.0%
######################################################################## 100.0%

Downloading 'aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda' (2 layers)...
######################################################################## 100.0%
######################################################################## 100.0%

Download of images into '/docker-frozen-images' complete.
Use something like the following to load the result into a Docker daemon:
tar -cC '/docker-frozen-images' . | docker load
---> 30b3d10756f4
Error removing intermediate container eecebade64fe: No such container: eecebade64fe36700d473276d691d032fc3c78ab9a907719ad93703fd7dda66c
Step 29/33 : COPY hack/dockerfile/binaries-commits /tmp/binaries-commits
---> f0f035361b5f
Removing intermediate container bd992c82442f
Removing intermediate container 5e1f153d18c8
Error removing intermediate container eecebade64fe: No such container: eecebade64fe36700d473276d691d032fc3c78ab9a907719ad93703fd7dda66c
Step 30/33 : COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
lstat hack/dockerfile/install-binaries.sh: no such file or directory
Makefile:84: recipe for target 'build' failed
make: *** [build] Error 1

@MrDreamBot
Copy link

Back to the master and the"Unauthorised" error resurfaced:


Step 27/33 : COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/
---> 6e862c0c387b
Removing intermediate container 7d1367979678
Step 28/33 : RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2 aarch64/busybox:latest@sha256:b23a6a37cf269dff6e46d2473b6e227afa42b037e6d23435f1d2bc40fc8c2828 aarch64/debian:jessie@sha256:4be74a41a7c70ebe887b634b11ffe516cf4fcd56864a54941e56bb49883c3170 aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda
---> Running in c2eb5fe3c252
warning: 'aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2' uses schemaVersion '1'
this script cannot (currently) recreate the 'image config' to put in a 'manifest.json' (thus any schemaVersion 2+ images will be imported in the old way, and their 'docker history' will suffer)

Downloading 'aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2' (5 layers)...
######################################################################## 100.0%
######################################################################## 100.0%

curl: (22) The requested URL returned error: 401 Unauthorized
The command '/bin/sh -c ./contrib/download-frozen-image-v2.sh /docker-frozen-images aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2 aarch64/busybox:latest@sha256:b23a6a37cf269dff6e46d2473b6e227afa42b037e6d23435f1d2bc40fc8c2828 aarch64/debian:jessie@sha256:4be74a41a7c70ebe887b634b11ffe516cf4fcd56864a54941e56bb49883c3170 aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda' returned a non-zero code: 22
Makefile:96: recipe for target 'build' failed
make: *** [build] Error 22

@MrDreamBot
Copy link

Posted on the wrong github ;-)

@MrDreamBot
Copy link

Sorry, this is the right one. Ignore my previous comment. I have too many tabs on GitHub!

@thaJeztah
Copy link
Member

What happens if you manually try to pull that image?

docker pull aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda

@MrDreamBot
Copy link

docker pull works. In fact I was able to pull down all the 4 images in step 27.

However, when I do 'make build' it fails again with "Unauthorized"


Step 27/33 : COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/
---> Using cache
---> 6e862c0c387b
Step 28/33 : RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2 aarch64/busybox:latest@sha256:b23a6a37cf269dff6e46d2473b6e227afa42b037e6d23435f1d2bc40fc8c2828 aarch64/debian:jessie@sha256:4be74a41a7c70ebe887b634b11ffe516cf4fcd56864a54941e56bb49883c3170 aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda
---> Running in 8e3429d16900
warning: 'aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2' uses schemaVersion '1'
this script cannot (currently) recreate the 'image config' to put in a 'manifest.json' (thus any schemaVersion 2+ images will be imported in the old way, and their 'docker history' will suffer)

Downloading 'aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2' (5 layers)...
######################################################################## 100.0%
######################################################################## 100.0%

curl: (22) The requested URL returned error: 401 Unauthorized
The command '/bin/sh -c ./contrib/download-frozen-image-v2.sh /docker-frozen-images aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2 aarch64/busybox:latest@sha256:b23a6a37cf269dff6e46d2473b6e227afa42b037e6d23435f1d2bc40fc8c2828 aarch64/debian:jessie@sha256:4be74a41a7c70ebe887b634b11ffe516cf4fcd56864a54941e56bb49883c3170 aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda' returned a non-zero code: 22
Makefile:96: recipe for target 'build' failed
make: *** [build] Error 22

@thaJeztah
Copy link
Member

ping @tianon any suggestions?

@tianon
Copy link
Member

tianon commented Mar 6, 2017

That's odd -- is there any kind of firewall or proxy in place? The only other thing I can think of is that the previous layers took so long to download that the authentication token expired. 😕

@MrDreamBot
Copy link

There is no firewall or proxy involved. I can pull down the images on the same machine on which I did the 'make build'. The internet speed is indeed not very fast. Any suggestion is welcome. However, I cannot try any suggestions until I get home from my current business trip.

@MrDreamBot
Copy link

I am back. Any suggestion is welcome.

@adomenech73
Copy link

Exactly the same for me with make deb or make tgz

  • docker builder version: 1.13.0-dev (API: 1.25)
  • docker target version: v17.03.0-ce
Step 35/40 : RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images 	aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2 	aarch64/busybox:latest@sha256:b23a6a37cf269dff6e46d2473b6e227afa42b037e6d23435f1d2bc40fc8c2828 	aarch64/debian:jessie@sha256:4be74a41a7c70ebe887b634b11ffe516cf4fcd56864a54941e56bb49883c3170 	aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda
 ---> Running in 3a4a29959c13
warning: 'aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2' uses schemaVersion '1'
  this script cannot (currently) recreate the 'image config' to put in a 'manifest.json' (thus any schemaVersion 2+ images will be imported in the old way, and their 'docker history' will suffer)

Downloading 'aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2' (5 layers)...
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%

curl: (22) The requested URL returned error: 401 Unauthorized
The command '/bin/sh -c ./contrib/download-frozen-image-v2.sh /docker-frozen-images 	aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2 	aarch64/busybox:latest@sha256:b23a6a37cf269dff6e46d2473b6e227afa42b037e6d23435f1d2bc40fc8c2828 	aarch64/debian:jessie@sha256:4be74a41a7c70ebe887b634b11ffe516cf4fcd56864a54941e56bb49883c3170 	aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda' returned a non-zero code: 22
Makefile:101: recipe for target 'build' failed
make: *** [build] Error 22

@adomenech73
Copy link

I don't know if it's meaningful but just before the error I get this warning.

warning: 'aarch64/buildpack-deps:jessie@sha256:6aa1d6910791b7ac78265fd0798e5abd6cb3f27ae992f6f960f6c303ec9535f2' uses schemaVersion '1'
  this script cannot (currently) recreate the 'image config' to put in a 'manifest.json' (thus any schemaVersion 2+ images will be imported in the old way, and their 'docker history' will suffer)

@adomenech73
Copy link

Actually I have to say that I repeated the process from the beginning and now just went fine using this sequence:

git clone https://github.com/docker/docker
cd docker
git checkout v17.03.0-ce
make
make tgz

make deb fails but seems to be another problem

@thaJeztah
Copy link
Member

Let me close this ticket for now, as it looks like it went stale.

@thaJeztah thaJeztah closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants