Why is my app create failing?
You cannot create an app. When you run the ibmcloud ce app create
command in the CLI or deploy an app in the console, the application create does not complete successfully and displays a failed
or revision failed
error message.
If you cannot create an app, determine whether one of the following cases is true.
-
The name of your app is not unique within the project. You receive an error message that contains
Application 'myapp' already exists within project 'myproj', please select a unique name.
-
The name of your app is not valid. You receive an error message that contains
An application name must consist of lowercase alphanumeric characters, '-' and must start with an alphabetic character and end with an alphanumeric character.
-
If the image that you referenced does not exist, the app create does not complete and an error occurs. You receive an error message that contains
Unable to pull the image
. -
If you do not have the permissions to access the referenced image, the app create does not complete and an error occurs. You receive an error message that contains
Unable to pull the image
. -
The memory or CPU setting is not valid. You receive an error message that contains
memory parameter must be between .25 G and 32 G
orcpu parameter must be between .0125 and 8.0
.For more information about Code Engine limits for apps, see Application limits and defaults for Code Engine. -
The resource quota for apps or app revisions is reached and the app (or app revision) is not created. Code Engine has quotas for apps and revisions of the apps within a project. For more information about Code Engine limits, see Project quotas.
-
If the image for your app is located in Docker Hub and you receive a similar error message that indicates you have reached your Docker pull rate limit.
429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit ”
Try one of these solutions.
-
To determine whether the name of your app is unique within the project, use the
ibmcloud ce app list
command to list all defined apps and check whether an app with the same name exists. If an app with the same name exists, use theibmcloud ce app delete --name APP_NAME
to delete the old app. The name of the app must be unique within your project. -
To confirm that the name of your app is valid, check that the name of your app consists of lowercase alphanumeric characters, '-', and that the name starts and ends with an alphabetic character.
-
To confirm that the image for your app exists, review the error message for information about the failure.
a. To deploy applications in Code Engine, you need to first create a container image that has all the runtime artifacts your application needs to run, such as runtime libraries. You can use many different methods to create the image, including building your app from source code by using the build container images feature available in Code Engine. Your image can be downloaded from either a public or private image registry. For more information about accessing private registries, see Adding access to a private container registry.
b. If you use the
app create
command in the Code Engine CLI, specify the name of the image that is used for your application by using the formatREGISTRY/NAMESPACE/REPOSITORY:TAG
whereREGISTRY
andTAG
are optional. IfREGISTRY
is not specified, the default isdocker.io
. IfTAG
is not specified, the default islatest
. For more information about the format to use to specify the repository for your image, see theibmcloud ce app create
command. -
To confirm that you can access the referenced image, verify the location of your image and confirm that you have permissions to access the image.
If the image is located in a container image registry, such as Docker Hub or IBM Cloud Container Registry, check that you added registry access to Code Engine and that you are using the correct registry secret. For more information about working with images in a container image registry, see adding access to a private container registry.
-
If you specify the
--memory
or--cpu
option with theapp create
command, confirm that you are using valid values. In the following command, the values that are specified for--memory
and--cpu
are not valid; for example,ibmcloud ce app create --name myapp --image icr.io/codeengine/codeengine --memory 50Gi --cpu 20
Example output
Creating application 'myapp'... FAILED memory parameter must be between 128Mi and 32Gi cpu parameter must be between .01 and 8.0
To fix the errors, set the
--memory
option between 128 Mi and 32 Gi, and set the--cpu
option between 0.01 and 8.0 vCPU. -
If you receive an error message that indicates the resource quota is exceeded, delete apps or app revisions before you can deploy additional apps or app revisions.
-
To manage your apps, use the
ibmcloud ce app list
command to display a list of all your apps in the current project. Use theibmcloud ce app delete
command to remove apps as needed. -
To manage your app revisions, use the
ibmcloud ce revision list
command to display all your app revisions.
-
-
To address the Docker Hub rate limit problem, you can take the following actions.
-
Authenticate with Docker Hub to increase the rate limit. Be aware of Docker rate limits.
-
Pull the image from Docker Hub and publish the image in a different registry, such as IBM Cloud® Container Registry. Then, pull your image from the new location.
-
If these solutions do not solve your issue, for further debugging, try retrieving the logs or the system event information for your app. For more information, see How do I get logs for my apps and How do I get system event information for my apps.
For more about working with apps, see Deploying apps.