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

error building image: dial tcp i/o timeout occurs with v0.10.0 #711

Closed
drpmma opened this issue Jul 9, 2019 · 4 comments
Closed

error building image: dial tcp i/o timeout occurs with v0.10.0 #711

drpmma opened this issue Jul 9, 2019 · 4 comments

Comments

@drpmma
Copy link

drpmma commented Jul 9, 2019

Actual behavior
The error: error building image: Get https://xxx/v2/xxx: dial tcp xx:443: i/o timeout occurs when running build process with v0.10.0. However, the same build process works totally fine in v0.9.0.
And the flags --skip-tls-verify-pull and --insecure-pull have no effect on this problem.

Expected behavior
Build and push success.

To Reproduce

sudo docker  run --rm -v /root/.docker/config.json:/kaniko/.docker/config.json -v `pwd`:/build-test gcr.io/kaniko-project/executor:latest --dockerfile=Dockerfile --context=dir:///build-test --destination=x:destination --verbosity=debug 

Additional Information

  • Kaniko Image (fully qualified with digest)
    gcr.io/kaniko-project/executor:latest (v0.10.0)
    Digest: sha256:78d44ec4e9cb5545d7f85c1924695c89503ded86a59f92c7ae658afa3cff5400

  • log

DEBU[0000] Getting source context from dir:///build-test
DEBU[0000] Build context located at /build-test
DEBU[0000] Copying file /build-test/Dockerfile to /kaniko/Dockerfile
INFO[0000] Resolved base name x:y to x:y
INFO[0000] Resolved base name x:y to x:y
INFO[0000] Downloading base image x:y
INFO[0000] Error while retrieving image from cache: getting file info: stat /cache/sha256:xx: no such file or directory
INFO[0000] Downloading base image x:y
error building image: Get https://xxx/v2/xxx: dial tcp x:443: i/o timeout
@drpmma drpmma changed the title error building image: dial tcp i/o time occurs with v0.10.0 error building image: dial tcp i/o timeout occurs with v0.10.0 Jul 9, 2019
@drpmma
Copy link
Author

drpmma commented Jul 10, 2019

I checked the relevant code about retrieving a remote image. And I doubt the error occurs in v0.10.0 because of the changes in vendor "github.com/google/go-containerregistry/pkg/v1/remote" between v0.9.0 and v0.10.0.
Not all the images get i/o timeout error. Retrieving the images in docker hub works fine while the images in my case, downloaded from the company private registry, get the i/o timeout error.

@OliverNocon
Copy link

Might even be related to #645.
We had similar issues and the solution from #648 resolved the DNS timeout issues for us ...

@drpmma
Copy link
Author

drpmma commented Jul 23, 2019

Might even be related to #645.
We had similar issues and the solution from #648 resolved the DNS timeout issues for us ...

Thanks for your reply. The problem has no relationship with golang image version. In fact, it occurs due to the commit dbc4da of go-containerregistry/pkg/v1/remote/transport/bearer.go. It overwrote the redirect scheme, causing failure when requesting an https registry but redirecting to another http downloading URL.

And it is now fixed by commit ec69c4, so it should be fine when updating to the new version of go-containerregistry.

@drpmma drpmma closed this as completed Jul 23, 2019
@willinwu
Copy link

@drpmma , I get the same error while i use the private registry.
It's strange that I only get error if the vm ( which the kaniko is running on )can't access the internet.
I upgrade the golang to 1.12 and upgrade the kaniko to 0.14.0.
But it doesn't help.
Can you give me some advise?

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

3 participants