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.

BuildStepsExecutionException when running jibDockerBuild

See original GitHub issue

Environment:

  • Jib version: 3.2.1 (jib-gradle)
  • Build tool: gradle 7.5
  • OS: Windows 10 x64
  • JDK: temurin-jdk-17.0.4+8

Description of the issue:

When running the following command ./gradlew jibDockerBuild, it throws the following error

BuildStepsExecutionException: unable to move: %APPDATA%\Local\Google\Jib\Cache\tmp\12345 to %APPDATA%\Local\Google\Jib\Cache\layers\54321; such failures are often caused by interference from antivirus (#3127), or rarely if the operation is not supported by the file system (for example: special non-local file system)

Expected behavior:

Running the command should build a local image using the local Docker Daemon

Steps to reproduce:

  1. run ./gradlew jibDockerBuild

jib-gradle-plugin Configuration:

jib {
  from {
    image = 'eclipse-temurin:17.0.4_8-jdk'
  }
  to {
    image = 'my-image/built-with-jib'
    tags = ['tag2', 'latest']
  }
  container {
    jvmFlags = ['-Xms512m', '-Xdebug']
    ports = ['8080']
  }
}

Log output:

Additional Information:

The error message points me to this https://github.com/GoogleContainerTools/jib/issues/1635#issuecomment-484199610 where it did mentioned about anti-virus affecting it. My research also brings me to #3127 and #1438, similarly, my machine is installed with mcafee endpoint security 10.7 but I have no control over it.

I have tried to run with the following command ./gradlew jibDockerBuild -Djib.applicationCache=D:\cache -Djib.seralize=true based on some suggestion I saw over the different issues, but it does not seem to work as well.

Note: I should probably also mention that it used to work when I last ran it a few months back. I did a trace, but I don’t see any major upgrade in between this period for gradle/jib but I’m not sure about anti-virus though.

I am unable to provide a full log as I’m working on an air-gapped environment. Let me know if anything else is required, and I will try to provide

Thanks

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
chanseokohcommented, Aug 25, 2022

Jib creates new directory every time?

The base image cache is to cache images. Note that an image is basically comprised of layers (tar files in reality) and some metadata files. So, whenever it needs to download and save new images or layers, those will be created under the cache directory with some hierarchy. Directories and files will continue to be created, as you keep downloading new images.

Jib default base image cache directory is %APPDATA%\Local\Google\Jib\?

Basically, %LOCALAPPDATA%\Google\Jib\Cache, by default.

** The default base image cache is in the following locations on each platform: … Windows: [cache root]\Google\Jib\Cache, where [cache root] is %XDG_CACHE_HOME% (%LOCALAPPDATA% if not set)

0reactions
bwgjosephcommented, Sep 6, 2022

If you remember, the exception message already shows the path in question.

Yup, I added the directories as mentioned, but the exclusion didn’t work. So was wondering if it could have other directory that I did not include. But if those are the only ones, then it might be something wrong with the exclusion feature from the AV, and I will treat it as such.

Otherwise, I think we can close this issue, and thank you so much for your assistance. Appreciate it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

com.google.cloud.tools.jib.plugins.common ... - GitHub
When I run the jibDockerBuild command, I get the following exception: com.goog... ... BuildStepsExecutionException: Connection reset #2335.
Read more >
jib gradle plugin + static docker client: cannot build image due ...
It is solved when I run cmd as admin and cd to project dir and do gradlew jibDockerBuild . Image built and loaded...
Read more >
google/jib - Gitter
gradlew build jibDockerBuild for a Spring Boot app written in Kotlin, targeting Java ... BuildStepsExecutionException: Cannot run program "docker": error=2, ...
Read more >
Building Java containers with Jib - Google Cloud
This tutorial shows how to use Jib to build an optimal Java container and deploy to Cloud Run. ... mvn compile jib:dockerBuild
Read more >
Plugin dependency conflict with jib and srcclr - Gradle Forums
I'm running into a problem trying to use both the jib and srcclr gradle plugins in ... Execution failed for task ':service:jibDockerBuild'.
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