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

pushing to Quay fails #698

Closed
warmuuh opened this issue Jul 24, 2018 · 8 comments
Closed

pushing to Quay fails #698

warmuuh opened this issue Jul 24, 2018 · 8 comments
Milestone

Comments

@warmuuh
Copy link

warmuuh commented Jul 24, 2018

Description of the issue:

if pushing an image to Quay v2.9.1, it responds with

HttpResponseException: 415 Unsupported Media Type
{"errors":[{"code":"MANIFEST_INVALID","detail":{"message":"manifest schema version not supported"},"message":"manifest invalid"}]}

Expected behavior:

push of image should be successful

Steps to reproduce:

running mvn compile jib:build on a project with jib-plugin

Environment:

Apache Maven 3.5.3
Java version: 1.8.0_171, vendor: Oracle Corporation
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Docker version 18.03.1-ce (using windows hyper-v)
Quay v2.9.1 

jib-maven-plugin Configuration

			<plugin>
				<groupId>com.google.cloud.tools</groupId>
				<artifactId>jib-maven-plugin</artifactId>
				<version>0.9.7</version>
				<configuration>
					<to>
						<image>{quay-registry}/{userId}/{project}</image>
					</to>
				</configuration>
			</plugin>

Log output:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.google.cloud.tools:jib-maven-plugin:0.9.7:build (default-cli) on project wall-e: Build image failed
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Build image failed
    at com.google.cloud.tools.jib.maven.BuildImageMojo.execute (BuildImageMojo.java:165)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: com.google.api.client.http.HttpResponseException: 415 Unsupported Media Type
{"errors":[{"code":"MANIFEST_INVALID","detail":{"message":"manifest schema version not supported"},"message":"manifest invalid"}]}

    at com.google.api.client.http.HttpRequest.execute (HttpRequest.java:1070)
    at com.google.cloud.tools.jib.http.Connection.send (Connection.java:130)
    at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.call (RegistryEndpointCaller.java:173)
    at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.call (RegistryEndpointCaller.java:141)
    at com.google.cloud.tools.jib.registry.RegistryClient.callRegistryEndpoint (RegistryClient.java:338)
    at com.google.cloud.tools.jib.registry.RegistryClient.pushManifest (RegistryClient.java:234)
    at com.google.cloud.tools.jib.builder.steps.PushImageStep.afterAllPushed (PushImageStep.java:137)
    at com.google.common.util.concurrent.CombinedFuture$CallableInterruptibleTask.runInterruptibly (CombinedFuture.java:181)
    at com.google.common.util.concurrent.InterruptibleTask.run (InterruptibleTask.java:57)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
    at java.lang.Thread.run (Thread.java:748)

Additional Information:

@chanseokoh
Copy link
Member

code":"MANIFEST_INVALID",
"detail":{
    "message":"manifest schema version not supported"
},
"message":"manifest invalid"

I am suspecting your Quay only supports schema 1 and not schema 2. Is there a way to configure your registry to also accept schema 2?

Related: #534

@chanseokoh
Copy link
Member

chanseokoh commented Jul 24, 2018

Seems like Quay still doesn't support schema 2: moby/buildkit#409 (comment)

@warmuuh can you try creating and pushing an OCI image? You just put <format>OCI</format> as in the example below:
https://github.com/GoogleContainerTools/jib/tree/master/jib-maven-plugin#example

@briandealwis
Copy link
Member

There are no such options on Quay.io.

@briandealwis
Copy link
Member

Odd, but I get a different error when trying to build to quay.io: none of my layer pushes succeed.

Tried to push BLOB for quay.io/briandealwis/foo with digest sha256:8f125ded1b483229a567e48eece98cc8867c2bee55fb73e9cd65ceecc448b7c7 but failed because: unknown: Invalid request | If this is a bug, please file an issue at https://github.com/GoogleContainerTools/jib/issues/new: 400 BAD REQUEST
[ERROR] {"errors":[{"code":"INVALID_REQUEST","detail":{},"message":"Invalid request"}]}

@briandealwis
Copy link
Member

briandealwis commented Jul 24, 2018

Ah @warmuuh must be running against Quay Enterprise. My INVALID_REQUEST error above is because we're not fully implementing the Cross Repository Blob Mount request which specifies that the POST request should have both a mount and a from. I'll open a new issue to track that.

Otherwise this is a duplicate of #601. Will retitle slightly. (And unfortunately using OCI doesn't work against quay.io.)

@briandealwis
Copy link
Member

Duplicate of #601

@warmuuh
Copy link
Author

warmuuh commented Jul 25, 2018

yes, i am using quay enterprise. after changing to OCI, i get the same error

 {"errors":[{"code":"MANIFEST_INVALID","detail":{"message":"manifest schema version not supported"},"message":"manifest invalid"}]}

please close, if this is a duplicate

@coollog
Copy link
Contributor

coollog commented Aug 8, 2018

Closing in favor of #601

@coollog coollog closed this as completed Aug 8, 2018
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

4 participants