java.lang.IllegalArgumentException: Expecting 64-char full image ID, but got sha256:2f469c13a10a9950c6c5ed4d5cccd6f7b13e2a7516a62103d98e98a838e60d1a

Jenkins JIRA | Sarah Ryan | 10 months ago
  1. 0

    Docker v1.10.0 introduced a new format for image IDs whereby they now have a prefix of {{sha256:}} before the hash. See https://github.com/docker/docker/pull/17924 under *Summary of UI Changes*: {quote} Full-length image IDs have a sha256: prefix. This prefix is hidden for truncated image IDs for convenience. {quote} This is causing my jobs that rely on building and pushing Docker images to fail. It builds the image fine, but when it goes to push it to the repository it apparently first validates the image ID by making sure it's a string with a length of 64. The length check is now failing, since the full image ID now contains the {{sha256:}} prefix. The relevant file and line where this check is occurring is [/src/main/java/org/jenkinsci/plugins/docker/commons/fingerprint/DockerFingerprints.java#L64|https://github.com/jenkinsci/docker-commons-plugin/blob/master/src/main/java/org/jenkinsci/plugins/docker/commons/fingerprint/DockerFingerprints.java#L64] The error in my build log is: {code} ... Successfully built 8d6d5e96d600 [api-dev] $ docker inspect 8d6d5e96d600 ERROR: Build step failed with exception java.lang.IllegalArgumentException: Expecting 64-char full image ID, but got sha256:2f469c13a10a9950c6c5ed4d5cccd6f7b13e2a7516a62103d98e98a838e60d1a at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.getFingerprintHash(DockerFingerprints.java:65) at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.forDockerInstance(DockerFingerprints.java:141) at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.forImage(DockerFingerprints.java:108) at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.forImage(DockerFingerprints.java:93) at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.addFromFacet(DockerFingerprints.java:253) at com.cloudbees.dockerpublish.DockerBuilder$Perform.processFingerprints(DockerBuilder.java:467) at com.cloudbees.dockerpublish.DockerBuilder$Perform.buildAndTag(DockerBuilder.java:339) at com.cloudbees.dockerpublish.DockerBuilder$Perform.exec(DockerBuilder.java:274) at com.cloudbees.dockerpublish.DockerBuilder$Perform.access$100(DockerBuilder.java:254) at com.cloudbees.dockerpublish.DockerBuilder.perform(DockerBuilder.java:225) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Build step 'Docker Build and Publish' marked build as failure Finished: FAILURE {code} I'm not sure what the usefulness of the length check is, but it should either be removed or updated to account for the new prefix in the full image ID.

    Jenkins JIRA | 10 months ago | Sarah Ryan
    java.lang.IllegalArgumentException: Expecting 64-char full image ID, but got sha256:2f469c13a10a9950c6c5ed4d5cccd6f7b13e2a7516a62103d98e98a838e60d1a
  2. 0

    Docker v1.10.0 introduced a new format for image IDs whereby they now have a prefix of {{sha256:}} before the hash. See https://github.com/docker/docker/pull/17924 under *Summary of UI Changes*: {quote} Full-length image IDs have a sha256: prefix. This prefix is hidden for truncated image IDs for convenience. {quote} This is causing my jobs that rely on building and pushing Docker images to fail. It builds the image fine, but when it goes to push it to the repository it apparently first validates the image ID by making sure it's a string with a length of 64. The length check is now failing, since the full image ID now contains the {{sha256:}} prefix. The relevant file and line where this check is occurring is [/src/main/java/org/jenkinsci/plugins/docker/commons/fingerprint/DockerFingerprints.java#L64|https://github.com/jenkinsci/docker-commons-plugin/blob/master/src/main/java/org/jenkinsci/plugins/docker/commons/fingerprint/DockerFingerprints.java#L64] The error in my build log is: {code} ... Successfully built 8d6d5e96d600 [api-dev] $ docker inspect 8d6d5e96d600 ERROR: Build step failed with exception java.lang.IllegalArgumentException: Expecting 64-char full image ID, but got sha256:2f469c13a10a9950c6c5ed4d5cccd6f7b13e2a7516a62103d98e98a838e60d1a at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.getFingerprintHash(DockerFingerprints.java:65) at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.forDockerInstance(DockerFingerprints.java:141) at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.forImage(DockerFingerprints.java:108) at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.forImage(DockerFingerprints.java:93) at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.addFromFacet(DockerFingerprints.java:253) at com.cloudbees.dockerpublish.DockerBuilder$Perform.processFingerprints(DockerBuilder.java:467) at com.cloudbees.dockerpublish.DockerBuilder$Perform.buildAndTag(DockerBuilder.java:339) at com.cloudbees.dockerpublish.DockerBuilder$Perform.exec(DockerBuilder.java:274) at com.cloudbees.dockerpublish.DockerBuilder$Perform.access$100(DockerBuilder.java:254) at com.cloudbees.dockerpublish.DockerBuilder.perform(DockerBuilder.java:225) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Build step 'Docker Build and Publish' marked build as failure Finished: FAILURE {code} I'm not sure what the usefulness of the length check is, but it should either be removed or updated to account for the new prefix in the full image ID.

    Jenkins JIRA | 10 months ago | Sarah Ryan
    java.lang.IllegalArgumentException: Expecting 64-char full image ID, but got sha256:2f469c13a10a9950c6c5ed4d5cccd6f7b13e2a7516a62103d98e98a838e60d1a
  3. 0

    [JIRA] [docker-commons-plugin] (JENKINS-32792) Unable to push Docker images due to failing image ID length check

    Google Groups | 10 months ago | sarah@theartoflogic.com (JIRA)
    java.lang.IllegalArgumentException: Expecting 64-<span class="code-object" style="color: #910091">char</span> full image ID, but got sha256:2f469c13a10a9950c6c5ed4d5cccd6f7b13e2a7516a62103d98e98a838e60d1a
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JIRA] [docker-build-publish-plugin] (JENKINS-33278) Expecting 64-char full image ID

    Google Groups | 9 months ago | martinachtman@gmail.com (JIRA)
    java.lang.IllegalArgumentException: Expecting 64-<span class="code-object" style="color: #910091">char</span> full image ID, but got
  6. 0

    After upgrading docker-engine from 1.9.1 to 1.10.2 we encountered the same Docker ID problem as in issue [https://issues.jenkins-ci.org/browse/JENKINS-32792] even tough we've upgraded docker-commons to version 1.3.1: Output from docker inspect: {code:java} $ docker inspect --type=image --format='{{json .Id}}' 598d0def97f1 "sha256:598d0def97f180366008bcddbf0a4ed5267b35d0a876c0f867fc38c7adb041e3" Error msg: Status: Image is up to date for mongo:latest ---> 598d0def97f1 Successfully built 598d0def97f1 [database] $ docker inspect 598d0def97f1 ERROR: Build step failed with exception java.lang.IllegalArgumentException: Expecting 64-char full image ID, but got at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.getFingerprintHash(DockerFingerprints.java:71) at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.forDockerInstance(DockerFingerprints.java:147) at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.forImage(DockerFingerprints.java:114) at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.forImage(DockerFingerprints.java:99) at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.addFromFacet(DockerFingerprints.java:259) at com.cloudbees.dockerpublish.DockerBuilder$Perform.processFingerprints(DockerBuilder.java:490) at com.cloudbees.dockerpublish.DockerBuilder$Perform.buildAndTag(DockerBuilder.java:364) at com.cloudbees.dockerpublish.DockerBuilder$Perform.exec(DockerBuilder.java:294) at com.cloudbees.dockerpublish.DockerBuilder$Perform.access$100(DockerBuilder.java:274) at com.cloudbees.dockerpublish.DockerBuilder.perform(DockerBuilder.java:245) at org.jenkinsci.plugins.conditionalbuildstep.BuilderChain.perform(BuilderChain.java:71) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154) at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105) at org.jenkinsci.plugins.conditionalbuildstep.ConditionalBuilder.perform(ConditionalBuilder.java:133) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) {code}

    Jenkins JIRA | 9 months ago | Martin Achtman
    java.lang.IllegalArgumentException: Expecting 64-char full image ID, but got

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Expecting 64-char full image ID, but got sha256:2f469c13a10a9950c6c5ed4d5cccd6f7b13e2a7516a62103d98e98a838e60d1a

      at org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.getFingerprintHash()
    2. org.jenkinsci.plugins
      DockerFingerprints.addFromFacet
      1. org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.getFingerprintHash(DockerFingerprints.java:65)
      2. org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.forDockerInstance(DockerFingerprints.java:141)
      3. org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.forImage(DockerFingerprints.java:108)
      4. org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.forImage(DockerFingerprints.java:93)
      5. org.jenkinsci.plugins.docker.commons.fingerprint.DockerFingerprints.addFromFacet(DockerFingerprints.java:253)
      5 frames
    3. com.cloudbees.dockerpublish
      DockerBuilder.perform
      1. com.cloudbees.dockerpublish.DockerBuilder$Perform.processFingerprints(DockerBuilder.java:467)
      2. com.cloudbees.dockerpublish.DockerBuilder$Perform.buildAndTag(DockerBuilder.java:339)
      3. com.cloudbees.dockerpublish.DockerBuilder$Perform.exec(DockerBuilder.java:274)
      4. com.cloudbees.dockerpublish.DockerBuilder$Perform.access$100(DockerBuilder.java:254)
      5. com.cloudbees.dockerpublish.DockerBuilder.perform(DockerBuilder.java:225)
      5 frames
    4. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      3. hudson.model.Build$BuildExecution.build(Build.java:205)
      4. hudson.model.Build$BuildExecution.doRun(Build.java:162)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      6. hudson.model.Run.execute(Run.java:1738)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      8. hudson.model.ResourceController.execute(ResourceController.java:98)
      9. hudson.model.Executor.run(Executor.java:410)
      9 frames