question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MANIFEST_INVALID when pushing manifest to quay.io

See original GitHub issue

Environment: Jenkins

  • Jib version: 2.2.0
  • Build tool: maven 3.6.3
  • OS:: centos7 on slaves and head/master

Description of the issue: The mvn jib:build goal constantly failed with below message. Sometimes a retry will fix it

Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.2.0:build (default-cli) on project workflow-java-sdk-process-cloud: Tried to push image manifest for quay.io/your_image but failed because: Registry may not support pushing OCI Manifest or Docker Image Manifest Version 2, Schema 2 | If this is a bug, please file an issue at https://github.com/GoogleContainerTools/jib/issues/new: 400 BAD REQUEST
[ERROR] {"errors":[{"code":"MANIFEST_INVALID","detail":{"message":"Attempt to create an invalid manifest. Please report this issue."},"message":"manifest invalid"}]}

If retry the same goal in Jenkins, it went back to normal

[INFO] --- jib-maven-plugin:2.2.0:build (default-cli) @ my project ---
[INFO] 
[INFO] Containerizing application to quay.io/my_image:version, quay.io/my_image...
[INFO] Using credentials from Maven settings file for quay.io/my_image:version
[INFO] Getting manifest for base image adoptopenjdk/openjdk11@sha256:f92b946306c1f17be5578a84f61482766c4a47d6c75a2b49a49b7ef321cc750f...
[INFO] Building resources layer...
[INFO] Building dependencies layer...
[INFO] Building classes layer...
[INFO] The base image requires auth. Trying again for adoptopenjdk/openjdk11@sha256:f92b946306c1f17be5578a84f61482766c4a47d6c75a2b49a49b7ef321cc750f...
[INFO] The base image reference is manifest list, searching for linux/amd64
[INFO] Using base image with digest: sha256:63a55a2b49a12a15409c8228e7a23be3347b565d45dc7d05a03f965b495e0a90
[INFO] 
[INFO] Container entrypoint set to [java, -XX:MaxRAMPercentage=75.0, -XX:+UseContainerSupport, -Djava.awt.headless=true, -Djava.security.egd=file:/dev/./urandom, -cp, /app/resources:/app/classes:/app/libs/*, mypackage.MyApplication]
[INFO] 
[INFO] Built and pushed image as quay.io/my_image:version quay.io/my_image

Expected behavior: The error message is misleading and it shouldn’t fail for the first time

Steps to reproduce:

  1. Create a simple spring boot project with maven 3.6.3 and jib plugin 2.2.0
  2. Create a Jenkins job and publish the docker image to quay.io

jib-maven-plugin Configuration:

                <plugin>
                    <groupId>com.google.cloud.tools</groupId>
                    <artifactId>jib-maven-plugin</artifactId>
                    <version>${maven-jib-plugin.version}</version>
                    <configuration>
                        <from>
                            <image>${jib.from.image}</image>
                        </from>
                        <to>
                            <image>${docker.registry}/${docker.image.name}:${version.number}</image>
                            <tags>
                                <tag>latest</tag>
                            </tags>
                        </to>
                        <container>
                            <labels>
                                <quay.expires-after>12w</quay.expires-after>
                            </labels>
                            <jvmFlags>
                                <jvmFlag>-XX:MaxRAMPercentage=75.0</jvmFlag>
                                <jvmFlag>-XX:+UseContainerSupport</jvmFlag>
                                <jvmFlag>-Djava.awt.headless=true</jvmFlag>
                                <jvmFlag>-Djava.security.egd=file:/dev/./urandom</jvmFlag>
                            </jvmFlags>
                            <ports>
                                <port>8080</port>
                            </ports>
                        </container>
                    </configuration>
                </plugin>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:23 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
chris-pccwcommented, May 21, 2020

Sure will do. Thanks for your help @chanseokoh

0reactions
chanseokohcommented, Mar 4, 2021

Marking resolved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

manifest invalid error when pushing image to quay.io #667
Actual behavior. Unable to push image due to error manifest invalid . However, it's good to push same image to hub.docker.io.
Read more >
[RTFACT-9957] docker push throws "manifest invalid - Atlassian
This error seems to happen when we run docker push for the second time for an artifact with the same SHA. This causes...
Read more >
1810768 – Podman pushes a v1 manifest ... - Red Hat Bugzilla
Description of problem: I created a new organization and repository in quay.io. I pushed a local image to that repository, and podman pushed...
Read more >
docker push fails : manifest invalid - Stack Overflow
Ran into the same problem. The issue was that repo does not let you over-write images tags. I changed the tag to a...
Read more >
103bf3671f6e - Quay Container Registry · Quay
Manifest Layers. ENTRYPOINT ["/sysdig-inline-scan.sh"].
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found