GoogleContainerTools / kaniko

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

Fail pushing image to Nexus with v1.9.2-debug, ok with v1.9.1-debug #2463

Open mguillem opened 1 year ago

mguillem commented 1 year ago

Actual behavior

With v1.9.2-debug pushing a (quite large) image to Nexus fails with following message:

09:57:26.594  error pushing image: failed to push to destination svr-nexus01.#masked#:8128/#masked#: PATCH https://svr-nexus01.#masked#:8128/v2/#masked#/blobs/uploads/e92e4712-9a8b-4624-9bf2-22bb84d72065: UNKNOWN: unknown 

Additional Information

EivanRazgriz commented 1 year ago

Same issue on pushing to gitlab registry: error pushing image: failed to push to destination [dest]: Patch "[...]: use of closed network connection. Reverting back to v1.9.1-debug also solved the issue in this case

Silentstrike46 commented 1 year ago

Same situation for me, pushing a large image to DigitalOcean via GitLab CI/CD:

error pushing image: failed to push to destination registry.digitalocean.com/[dest]: Post "[...]: GET [...]: unexpected status code 400 Bad Request". Reverted back to v1.9.1-debug and it pushed successfully.

On v1.9.2, it would successfully push a small image to the same registry, but failed on a larger image. v1.9.1 pushes both successfully.

Edit: clarification.

ywang-psee commented 1 year ago

same issue when pushing image to private repository.

error pushing image: failed to push to destination rg.fr-par.scw.cloud/xxxxx: Post "https://rg.fr-par.scw.cloud/v2/xxxxx/blobs/uploads/?from=library%2Fubuntu&mount=sha256%3Axxxxx&origin=index.docker.io": GET https://api.scaleway.com/registry-internal/v1/regions/fr-par/tokens?scope=repository%3Afxxxxx%3Apull%2Cpush+repository%3Alibrary%2Fubuntu%3Apull&scope=repository%3Axxxxx%3Apush%2Cpull&service=registry: unexpected status code 400 Bad Request: {"message":"Invalid Argument for permission"}

fix by using v1.9.1-debug.

rajathar commented 1 year ago

Hi Team, Is this issue fixed in the latest version ?

sopelt commented 10 months ago

I have seen the same symptoms on v1.19.2-debug while v1.9.1-debug works.

michaelkebe commented 7 months ago

I have seen these symptoms on v1.16.0, too. Most Dockerfiles worked, but some not.

INFO[0325] Pushing image to repository.XXX:8445/XXX/tauchausguss-temperaturen:213ef1ba78ed8aafac773e8b202d6b3b108ee015 
error pushing image: failed to push to destination repository.XXX:8445/XXX/project-name:213ef1ba78ed8aafac773e8b202d6b3b108ee015: PATCH https://repository.hkm.de:8445/v2/XXX/project-name/blobs/uploads/2a79c191-68a6-4881-9f64-e59063fe8db7: UNKNOWN: unknown

Upgrading to v1.22.0 fixed it.

spranta-devops commented 1 week ago

I can confirm that v1.22.0 has fixed it. I had the same issue with GitLab-Runners and Harbor running on Kubernetes.

If you need a test Dockerfile with a large layer (uncompressable random large file):

FROM alpine:latest
RUN set -eux \
  && dd if=/dev/urandom of=large_docker_image_test.img bs=10M count=100 \
  ;

My test results: