Building a container in gopaddle may fail due to a few reasons. Some of these failures may be due to insufficient capacity allocated for the build environment or available on the Kubernetes nodes. The below list summarizes the failures seen under the Events section in the build page and the corresponding errors in the Build Logs section.

🔔 Event: failed on preparing distribution image

📓 Build Logs error building image: unsupported status code 401; body: Not Authorized

🔍 Reason for failure

This failure happens when a Build Base Image or Runtime Base Image cannot be pulled from the Docker Registry due to unathorized access or the final Distribution Docker Image cannot be pushed to the Distribution Docker Registry due to unauthorized access.

💡 Solution

Ensure that the Docker Registries configured in the Container Build Configuration has been registered with gopaddle with correct access credentials. Say if the a Docker Private Registry is registered with gopaddle, ensure that the Username and the token provided are valid.

🔔 Event: failed on preparing distribution image

📓 Build Logs error checking push permissions -- make sure you entered the correct tag name, and that you are authenticated correctly, and try again: checking push permission for "--------.dkr.ecr.ap-southeast-2.amazonaws.com/------------": DENIED: Your authorization token has expired. Reauthenticate and try again.

🔍 Reason for failure

This failure happens when a Build Base Image or Runtime Base Image cannot be pulled from the Docker Registry due to unathorized access or the final Distribution Docker Image cannot be pushed to the Distribution Docker Registry as the registry access token expired.

💡 Solution

Re-build the container again.

🔔 Event : NotReachable (failed on reaching build)

📓 Build Logs No errors in log

🔍 Reason for failure

This failure can happen when the build job was terminated manually inside the Kubernetes Cluster or if the Cluster is not reachable.

💡 Solution

Ensure the Cluster is in Running state.

🔔 Event : failed on executing prebuild/build script

📓 Build Logs Build Error Logs has the error in executing the pre-build or build script

🔍 Reason for failure

This failure can happen if the pre-build or build script had errors.

💡 Solution

Check the Build Logs for detailed information on the script execution failure.

🔔 Event : 0/4 nodes are available: 1 Insufficient memory, 4 Insufficient cpu.

📓 Build Logs No logs

🔍 Reason for failure

This failure happens when the nodes in the Kubernetes cluster where the build is initiated doesn't have sufficient capacity to schedule the build.

💡 Solution

Retry building the container once again on the same Kubernetes cluster after a few seconds.

🔔 Event: OOMKilled

📓 Build Logs 107 Killed

🔍 Reason for failure

This failure happens when the allocation capacity set in the Build Configuration of a container is not sufficient to complete the build process.

💡 Solution

Under Container Policies, edit or create a new Allocation Policy with increased Memory or CPU request and limit capacity. Edit the container Build Configuration section and include the allocation policy with additional memory/cpu. Rebuild the container with increased capacity.

🔔 Event: failed on ErrImagePull

🔍 Reason for failure

This failure happens when docker login to either the Build Base Image Registry or Runtime Base Image Registry or Distribution Image Registry or gopaddle Build Agent registry fails for the first time, but might succeed after a few retries.

💡 Solution

Rebuild the container until the build succeeds.

Did this answer your question?