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.

jib:build Remaining allocation units less than 0

See original GitHub issue

Description of the issue: The jib-maven-plugin failed with this error message: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.google.cloud.tools:jib-maven-plugin:1.0.1:build (default-cli) on project backend: Remaining allocation units less than 0 for 'pull container configuration sha256:0ea51d9f12788eb9ab2fad601aeda6fd2d444fde75b1cfb853994913ed88243d': -1

I use Nexus 3 as a local Docker repository for my images, and as a proxy to Docker Hub. In front of Nexus, I have a Traefik, which setup itself from Docker labels.

The docker labels of the Nexus repository:

  • traefik.docker.network=public
  • traefik.frontend.entryPoints=http,https
  • traefik.app.port=8081
  • traefik.app.frontend.rule=Host:nexus.192.168.100.101.nip.io
  • traefik.registry_pull.port=5055
  • traefik.registry_pull.frontend.rule=Host:nexus.192.168.100.101.nip.io;PathPrefix:/v2;Method: GET
  • traefik.registry_pull.priority=30
  • traefik.registry_push_1.port=5050
  • traefik.registry_push_1.frontend.rule=Host:nexus.192.168.100.101.nip.io; PathPrefix:/v2
  • traefik.registry_push_1.priority=20
  • traefik.registry_push_2.port=5050
  • traefik.registry_push_2.frontend.rule=Host:nexus.192.168.100.101.nip.io; PathPrefix:^/(v1|v2)/[^/]+/?[^/]+/blobs/;Method: POST, PUT, PATCH, DELETE, HEAD
  • traefik.registry_push_2.priority=40

With this configuration, the docker pull nexus.192.168.100.101.nip.io/alpine:latest and others work as expected, but jib cannot pull docker layers. If a publish the port 5050, 5055, and configure jib to pull and push from/to these ports, then jib works as expected.

Environment: Build from Jenkins Pipeline with Docker Maven container (maven:3-jdk-11-slim)

jib-maven-plugin Configuration (relevant section):

<plugin>
	<groupId>com.google.cloud.tools</groupId>
	<artifactId>jib-maven-plugin</artifactId>
	<version>1.0.1</version>
	<configuration>
		<allowInsecureRegistries>true</allowInsecureRegistries>
		<from>
			<!--suppress UnresolvedMavenProperty -->
			<image>${nexus.location}/adoptopenjdk/openjdk11:alpine</image>
		</from>
		<to>
			<!--suppress UnresolvedMavenProperty -->
			<image>${nexus.location}/mekh/phonebook-backend:${project.version}</image>
		</to>
		<container>
			<ports>
				<port>8080</port>
			</ports>
		</container>
	</configuration>
</plugin>

Additional Information: The jib-maven-plugin:1.0.0 can use HTTP, but the jib-maven-plugin:1.0.1 works with only HTTPS connection.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
chanseokohcommented, Mar 5, 2019

@mecseid v1.0.2 released that will prevent crashing when enabling compression. v1.0.2 also fixes the regression that may fail to try HTTP.

1reaction
chanseokohcommented, May 2, 2019

I think we know why compression is causing this issue. This shouldn’t be specific to Traefik. The root cause of the inaccurate/incomplete progress usage is probably #1522.

Anyways, #1521 will make Jib proceed normally with inaccurate/incomplete progress usage, so I expect #1521 will unblock you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introducing Jib — build Java Docker images better
Reproducible - Jib supports building container images declaratively from your Maven and Gradle build metadata, and as such can be configured to ...
Read more >
Running Jenkins jobs in AWS ECS with slave agents
To run Jenkins slave containers in ECS we'll use the Fargate launch type. This means AWS takes care of provisioning resources required to...
Read more >
Introducing Jib — Build Java Docker images better
We wrap up all these services and deploy them as a unit. We deploy them to a couple servers behind a load balancer....
Read more >
fabric8io/fabric8-maven-plugin
This plugin focus on two tasks: Building Docker images and creating Kubernetes and OpenShift resource descriptors. It can be configured very ...
Read more >
Spring Cloud Stream Applications Reference Guide
mvnw jib:build \ -Djib.to.image=myregistry/myimage:latest ... The table below lists all available shortcuts along with the Debezium ...
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