GoogleContainerTools / kaniko

Build Container Images In Kubernetes
Apache License 2.0
14.88k stars 1.44k forks source link

Error on Pushing image #1754

Open ghost opened 3 years ago

ghost commented 3 years ago

Actual behavior After the build using Kaniko is succeeded it it trying to push the image to Artifactory in our case. But on some of our docker images we get an http2 error:

INFO[0109] Pushing image to artifacts.example.com/docker-local/grafana:test
error pushing image: failed to push to destination artifacts.example.com/docker-local/grafana:test: Patch "https://artifacts.example.com/v2/docker-local/grafana/blobs/uploads/feebf657-20df-40f6-939f-b733100efb62": http2: Transport: cannot retry err [http2: Transport received Server's graceful shutdown GOAWAY] after Request.Body was written; define Request.GetBody to avoid this error

When using --cache the problem seems to be resolved!

Expected behavior Pushing the image succesfully to artifactory.

To Reproduce Steps to reproduce the behavior:

docker run -ti --rm -v `pwd`:/workspace -v `pwd`/config.json:/kaniko/.docker/config.json:ro gcr.io/kaniko-project/executor:latest --dockerfile=Dockerfile --destination=artifacts.example.com/docker-local/grafana:test
Description Yes/No
Please check if this a new feature you are proposing
  • - [ ]
Please check if the build works in docker but not in kaniko
  • - [X]
Please check if this error is seen when you use --cache flag
  • - [ ]
Please check if your dockerfile is a multistage dockerfile
  • - [ ]
livelace commented 2 years ago

2 net citizens. Got such an error after upgrading ingress-nginx helm chart/nginx version (http2 was enabled by default). I disabled http2 with use-http2: false and the error has gone.

Momotoculteur commented 2 years ago

Hi,

got the same issue for me. Any news about that ?

Br, Bastien

dave08 commented 2 years ago

Hi, I got the same error, WITH and without the cache option. AND I double checked that istio wasn't configured to serve http2 on the docker registry's service. It worked before and suddenly stopped working (maybe because this is a bigger build?), there's enough memory allocated to kaniko and the docker registry and we're running on v1.8.1.

zandolsi-psee commented 2 years ago

Hi, I got the same error. Switching to the 1.9.1 version fix the problem.

ywang-psee commented 1 year ago

got same error with version v1.9.1-debug