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

No progress after "Container entrypoint set to" with jib-maven-plugin 3.4.3 #4267

Open
LeovR opened this issue Jun 6, 2024 · 11 comments
Open

Comments

@LeovR
Copy link

LeovR commented Jun 6, 2024

Environment:

  • Jib version: 3.4.3
  • Build tool: Maven 3.9.6
  • OS: Windows 10

Description of the issue:
After upgrading to jib-maven-plugin 3.4.3 the progress stops after "Container entrypoint set to". With jib-maven-plugin 3.4.2 the build succeeds.

Expected behavior:
The build succeeds.

Steps to reproduce:

  1. skaffold run

jib-maven-plugin Configuration:

            <plugin>
                <groupId>com.google.cloud.tools</groupId>
                <artifactId>jib-maven-plugin</artifactId>
                <version>3.4.3</version>
                <configuration>
                    <skip>false</skip>
                    <containerizingMode>packaged</containerizingMode>
                    <container>
                        <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
                        <mainClass>${start-class}</mainClass>
                    </container>
                    <from>
                        <image>eclipse-temurin:21</image>
                    </from>
                    <to>
                        <image>${docker-registry}/application</image>
                        <tags>
                            <tag>${project.version}</tag>
                            <tag>latest</tag>
                            <tag>${env.CI_COMMIT_SHA}</tag>
                        </tags>
                    </to>
                    <allowInsecureRegistries>true</allowInsecureRegistries>
                </configuration>
                <executions>
                    <execution>
                        <phase>deploy</phase>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Log output:

[DEBUG] TIMING	Pulling base image manifest
[INFO] Getting manifest for base image eclipse-temurin:21...
[DEBUG] TIMING	trying mirrors
[DEBUG] TIMED	trying mirrors : 0.0 ms
[DEBUG] TIMING	Preparing application layer builders
[DEBUG] TIMED	Preparing application layer builders : 12.164 ms
[INFO] Building dependencies layer...
[INFO] Building project dependencies layer...
[INFO] Building extra files layer...
[DEBUG] TIMING	Building dependencies layer
[DEBUG] TIMING	Building project dependencies layer
[INFO] Building jvm arg files layer...
[DEBUG] TIMING	Building extra files layer
[DEBUG] TIMING	Building jvm arg files layer
[DEBUG] TIMED	Building jvm arg files layer : 46.44 ms
[DEBUG] TIMED	Building project dependencies layer : 46.752 ms
[DEBUG] TIMED	Building dependencies layer : 60.951 ms
[DEBUG] Building extra files layer built sha256:dfff3e035b17cc725566e639f61f51e44e1bdd662d7a8f6b4c6e55f07ef92d29
[DEBUG] TIMED	Building extra files layer : 107.42 ms
[INFO] Using base image with digest: sha256:ac1545309de7e27001a80d91df2d42865c0bacaec75e016cb4482255d7691187
[DEBUG] Searching for architecture=amd64, os=linux in the base image manifest list
[DEBUG] TIMED	Pulling base image manifest : 1069.014 ms
[DEBUG] TIMING	Pulling base image layer sha256:1ae78fb28ee8ad64497b830c9c46950ab9448341cbdb14f4710d143671487c61
[DEBUG] TIMING	Pulling base image layer sha256:e071b974f417bebf03dcba8690670bce9d7d83d647b1775d42f720b2813da09d
[DEBUG] TIMING	Pulling base image layer sha256:2ec76a50fe7c8d5db9ec25590b9217e14e3920513c6e7b5be55db72a16b55f7c
[DEBUG] TIMING	Pulling base image layer sha256:3c930bd25dd53355206fb22462e8fbde127b1d43483ca67962d2bf2bb4a534c0
[DEBUG] TIMING	Pulling base image layer sha256:eb2b2709c988772d4f722fa842b200b424f5873a64a9b4c5cfaeb86a6293a3b1
[DEBUG] TIMED	Pulling base image layer sha256:eb2b2709c988772d4f722fa842b200b424f5873a64a9b4c5cfaeb86a6293a3b1 : 0.684 ms
[DEBUG] TIMED	Pulling base image layer sha256:3c930bd25dd53355206fb22462e8fbde127b1d43483ca67962d2bf2bb4a534c0 : 1.226 ms
[DEBUG] TIMED	Pulling base image layer sha256:e071b974f417bebf03dcba8690670bce9d7d83d647b1775d42f720b2813da09d : 1.226 ms
[DEBUG] TIMED	Pulling base image layer sha256:2ec76a50fe7c8d5db9ec25590b9217e14e3920513c6e7b5be55db72a16b55f7c : 1.226 ms
[DEBUG] TIMED	Pulling base image layer sha256:1ae78fb28ee8ad64497b830c9c46950ab9448341cbdb14f4710d143671487c61 : 1.226 ms
[DEBUG] TIMING	Building container configuration
[INFO] 
[INFO] Container entrypoint set to [java, -cp, @/app/jib-classpath-file, com.example.Application]
[DEBUG] TIMED	Building container configuration : 1.0 ms

The output for jib-maven-plugin 3.4.2

[DEBUG] TIMING	Pulling base image manifest
[INFO] Getting manifest for base image eclipse-temurin:21...
[DEBUG] TIMING	trying mirrors
[DEBUG] TIMED	trying mirrors : 0.0 ms
[DEBUG] TIMING	Preparing application layer builders
[DEBUG] TIMED	Preparing application layer builders : 11.583 ms
[INFO] Building dependencies layer...
[INFO] Building project dependencies layer...
[DEBUG] TIMING	Building dependencies layer
[DEBUG] TIMING	Building project dependencies layer
[INFO] Building extra files layer...
[DEBUG] TIMING	Building extra files layer
[INFO] Building jvm arg files layer...
[DEBUG] TIMING	Building jvm arg files layer
[DEBUG] TIMED	Building jvm arg files layer : 51.587 ms
[DEBUG] TIMED	Building dependencies layer : 66.647 ms
[DEBUG] TIMED	Building project dependencies layer : 67.966 ms
[DEBUG] Building extra files layer built sha256:dfff3e035b17cc725566e639f61f51e44e1bdd662d7a8f6b4c6e55f07ef92d29
[DEBUG] TIMED	Building extra files layer : 105.634 ms
[INFO] Using base image with digest: sha256:ac1545309de7e27001a80d91df2d42865c0bacaec75e016cb4482255d7691187
[DEBUG] Searching for architecture=amd64, os=linux in the base image manifest list
[DEBUG] TIMED	Pulling base image manifest : 876.057 ms
[DEBUG] TIMING	Pulling base image layer sha256:3c930bd25dd53355206fb22462e8fbde127b1d43483ca67962d2bf2bb4a534c0
[DEBUG] TIMING	Pulling base image layer sha256:2ec76a50fe7c8d5db9ec25590b9217e14e3920513c6e7b5be55db72a16b55f7c
[DEBUG] TIMING	Pulling base image layer sha256:e071b974f417bebf03dcba8690670bce9d7d83d647b1775d42f720b2813da09d
[DEBUG] TIMING	Pulling base image layer sha256:1ae78fb28ee8ad64497b830c9c46950ab9448341cbdb14f4710d143671487c61
[DEBUG] TIMING	Pulling base image layer sha256:eb2b2709c988772d4f722fa842b200b424f5873a64a9b4c5cfaeb86a6293a3b1
[DEBUG] TIMED	Pulling base image layer sha256:1ae78fb28ee8ad64497b830c9c46950ab9448341cbdb14f4710d143671487c61 : 0.53 ms
[DEBUG] TIMED	Pulling base image layer sha256:eb2b2709c988772d4f722fa842b200b424f5873a64a9b4c5cfaeb86a6293a3b1 : 0.53 ms
[DEBUG] TIMED	Pulling base image layer sha256:3c930bd25dd53355206fb22462e8fbde127b1d43483ca67962d2bf2bb4a534c0 : 0.53 ms
[DEBUG] TIMED	Pulling base image layer sha256:2ec76a50fe7c8d5db9ec25590b9217e14e3920513c6e7b5be55db72a16b55f7c : 0.53 ms
[DEBUG] TIMED	Pulling base image layer sha256:e071b974f417bebf03dcba8690670bce9d7d83d647b1775d42f720b2813da09d : 0.53 ms
[DEBUG] TIMING	Building container configuration
[INFO] 
[INFO] Container entrypoint set to [java, -cp, @/app/jib-classpath-file, com.example.Application]
[DEBUG] TIMED	Building container configuration : 1.002 ms
[DEBUG] TIMING	Loading to Docker daemon
[INFO] Loading to Docker daemon...
[DEBUG] Loaded image: xxx:20240605-3829.598137-2-gfa19a177-dirty
The image xxx:local already exists, renaming the old one with ID sha256:cccec99bcdeeaf6a5f7c958a62761ec9a62f75c60fa6947a5df08e7548344317 to empty string
Loaded image: xxx:local

[DEBUG] TIMED	Loading to Docker daemon : 13144.805 ms
[DEBUG] TIMED	Building image to Docker daemon : 14055.52 ms
[INFO] 
[INFO] Built image to Docker daemon as ...

Additional Information:

The build is triggered by skaffold with additional parameter -Djib.to.tags=local.

@beskow
Copy link

beskow commented Jun 14, 2024

We are facing the same problem when upgrading to jib-maven-plugin 3.4.3.

It seems to be a Windows-only problem (it works correctly when running the command in WSL2/Ubuntu)

Staying on 3.4.2 for now.

@bamanuel1
Copy link

Breaking change is addition of the following line.

DockerInfoDetails dockerInfoDetails = dockerClient.info();

This line blocks until docker info -f "{{json .}}" process exits to start reading the inputStream. On windows, it only exits after inputStream is read, resulting in deadlock.

Can be reproduced on windows with following code. Only occurs with -f option.

Process process = new ProcessBuilder("docker", "info", "-f", "json").start();
process.waitFor();

@chanseokoh
Copy link
Member

@mpeddada1 this I believe was introduced in 3.4.3 and looks to be an important regression issue to fix before making the next release.

@mpeddada1 mpeddada1 self-assigned this Jun 27, 2024
@mpeddada1
Copy link
Contributor

@chanseokoh Assigned this to myself.
@beskow My initial hypothesis was that this may have been caused due to some unconventional log warnings we added but this is really helpful information (#4267 (comment))

This line blocks until docker info -f "{{json .}}" process exits to start reading the inputStream. On windows, it only exits after inputStream is read, resulting in deadlock.

@Chris-Frendo
Copy link

We encountered this issue as well. Seems to be working on linux but hanging on windows.

Doing a breakpoint on line 191 in CliDockerClient and calling waitFor() hangs on windows. If you call getInputStream() without calling waitFor() before it, it works as expected.

Downgraded to 3.4.2 in the meantime.

@mpeddada1
Copy link
Contributor

mpeddada1 commented Oct 29, 2024

jib-maven-plugin 3.4.4 has been released (https://github.com/GoogleContainerTools/jib/releases) to address #4265 and #4265. Please let us know if you're running into any further issues!

@awbit
Copy link

awbit commented Oct 31, 2024

@mpeddada1
We are encountering this issue still. It is hanging on windows.

[INFO] Container entrypoint set to [java,....

Downgraded to 3.4.2 solve the issue.

@LeovR
Copy link
Author

LeovR commented Nov 4, 2024

@awbit
I can confirm that it is still not working for me with jib-maven-plugin 3.4.4
@mpeddada1 can you reopen this ticket?

@rxxy
Copy link

rxxy commented Dec 5, 2024

+1, It still hanging on Windows when execute gradle jibDockerBuild command

@matejbizjak
Copy link

It doesn't work for us on Windows either. However, it works if we run the command in WSL.

@ldetmer
Copy link

ldetmer commented Jan 23, 2025

Re-opening will try to prioritize, in the meantime if anyone in the community has a fix we would welcome a community contribution for this one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests