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

Check if the Docker registry access token is still valid. If it has expired, then re-generate a new access token from the Docker hub. Edit the Registry information registered with gopaddle. Update the new token and 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

Update the Build Environment capacity for the container under the Release -> Distribution -> Build Configuration details. Retry building the container once again on the same Kubernetes cluster.

🔔 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

Update the Build Environment capacity with additional memory/cpu for the container under the Release -> Distribution -> Build Configuration details. Rebuild the container with increased capacity.

🔔 Event: failed on ErrImagePull

🔍 Reason for failure - 1

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 - 1

Rebuild the container until the build succeeds.

🔍 Reason for failure - 2

Can happen when the bild process could not pull the build base image.

💡 Solution - 2

Make sure the build base image exists in the docker hub and the docker registry containing the private build base image is registered in gopaddle.

Did this answer your question?