You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This article will help you solve various problems that can arise when your Azure Spring Apps deployment is failed during build phase.
18
+
This article describes how to troubleshoot build issues with your Azure Spring Apps deployment.
19
19
20
20
## Build exit codes
21
21
22
-
Azure Spring Apps Enterprise tier leverage [Tanzu Buildpacks](https://docs.vmware.com/en/VMware-Tanzu-Buildpacks/index.html) to transform your application source code into images.
23
-
When deploying your Azure Spring Apps via [Azure CLI](/cli/azure/install-azure-cli), you will see build log in Azure CLI console.
22
+
Azure Spring Apps Enterprise tier uses Tanzu Buildpacks to transform your application source code into images. For more information, see [Tanzu Buildpacks](https://docs.vmware.com/en/VMware-Tanzu-Buildpacks/index.html).
24
23
25
-
If the build is failed, exit code and error message is shown in the CLI console.
26
-
The exit code and error message indicates the reason why the buildpack execution is failed during different [phase](https://buildpacks.io/docs/concepts/components/lifecycle/).
27
-
The following list describes the most common exit codes:
24
+
When you deploy your app in Azure Spring Apps using the [Azure CLI](/cli/azure/install-azure-cli), you'll see a build log in the Azure CLI console. If the build fails, Azure Spring Apps displays an exit code and error message in the CLI console indicating why the buildpack execution failed during different phases of the buildpack [lifecycle](https://buildpacks.io/docs/concepts/components/lifecycle/).
28
25
29
-
-**20** - All buildpacks groups have failed to detect.
30
-
31
-
Consider the following possible causes for 20 exit code:
32
-
- The builder you are using doesn't support the language your project used.
33
-
- If you are using the default builder, check [the language the default builder supports](how-to-enterprise-build-service.md#default-builder-and-tanzu-buildpacks).
34
-
- If you are using the custom builder, check if your custom builder has the Buildpack supports the language your project used.
26
+
The following list describes some common exit codes:
35
27
36
-
-You are running against the wrong path.
28
+
-**20** - All buildpack groups have failed to detect.
37
29
38
-
For example, your Maven project's pom.xml file is not in root path. You can set BP_MAVEN_POM_FILE to specify the project's pom.xml file.
30
+
Consider the following possible causes of an exit code of *20*:
31
+
32
+
- The builder you're using doesn't support the language your project used.
33
+
34
+
If you're using the default builder, check the language the default builder supports. For more information, see the [Default Builder and Tanzu Buildpacks](how-to-enterprise-build-service.md#default-builder-and-tanzu-buildpacks) section of [Use Tanzu Build Service](how-to-enterprise-build-service.md).
35
+
36
+
If you're using the custom builder, check whether your custom builder's buildpack supports the language your project used.
39
37
40
-
-There's something wrong with your application.
38
+
-You're running against the wrong path; for example, your Maven project's *pom.xml* file isn't in the root path.
41
39
42
-
For example, your jar file doesn't have a /META-INF/MANIFEST.MF file which contains a Main-Class entry.
40
+
Set `BP_MAVEN_POM_FILE` to specify the project's *pom.xml* file.
41
+
42
+
- There's something wrong with your application; for example, your *jar* file doesn't have a */META-INF/MANIFEST.MF* file that contains a *Main-Class* entry.
43
43
44
44
-**51** - Buildpack build error.
45
45
46
-
Consider the following possible causes for 51 exit code:
46
+
Consider the following possible causes of an exit code of *51*:
47
47
48
-
-Error message "Build failed in stage build with reason OOMKilled" is shown in Azure CLI console.
48
+
-If Azure Spring Apps displays the error message *Build failed in stage build with reason OOMKilled*in the Azure CLI console, the build failed due to insufficient memory.
49
49
50
-
Build is failed due to insufficient memory, increase memory via setting build environment variable in Azure CLI:
50
+
Use the following command to increase memory using the `build-memory` environment variable in Azure CLI:
51
51
52
52
```azurecli
53
-
az spring app deploy
53
+
az spring app deploy \
54
54
--resource-group <your-resource-group-name> \
55
55
--service <your-Azure-Spring-Apps-name> \
56
56
--name <your-app-name> \
57
57
--build-memory 3Gi
58
58
```
59
59
60
-
- Application source code error:
60
+
- An application source code error; for example, there's a compilation error in your source code.
61
61
62
-
For example, there's compilation error in your source code. You can check the build log to find out the root cause.
62
+
Check the build log to find the root cause.
63
63
64
-
- Download dependency error:
65
-
66
-
For example, maven dependency download is failed due to network issue.
64
+
- A download dependency error; for example, the Maven dependency download failed due to a network issue.
67
65
68
66
- **62** - Failed to write image to Azure Container Registry.
69
67
70
-
Consider the following possible causes for 62 exit code:
68
+
Consider the following possible cause of an exit code of *62*:
71
69
72
-
- Error message "failed to write image to the following tags" is shown in build log.
73
-
74
-
Failed to write image to Azure Container Registry due to network issue, you can retry to fix the issue.
70
+
- If Azure Spring Apps displays the error message *Failed to write image to the following tags* in the build log, the build failed because of a network issue.
71
+
72
+
Retry to fix the issue.
75
73
76
74
If your application is a static file or dynamic front-end application served by a web server, see the [Common build and deployment errors](how-to-enterprise-deploy-static-file.md#common-build-and-deployment-errors) section of [Deploy static files in Azure Spring Apps Enterprise tier](how-to-enterprise-deploy-static-file.md).
0 commit comments