Skip to content

Commit 52fd63c

Browse files
edit pass
1 parent 2139a5e commit 52fd63c

File tree

1 file changed

+28
-30
lines changed

1 file changed

+28
-30
lines changed

articles/spring-apps/troubleshoot-build-exit-code.md

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Troubleshoot common build issues in Azure Spring Apps
3-
description: Describes how to troubleshoot common build issues in Azure Spring Apps
3+
description: Learn how to troubleshoot common build issues in Azure Spring Apps.
44
author: yilims
55
ms.service: spring-apps
66
ms.topic: troubleshooting
@@ -15,63 +15,61 @@ ms.author: yili7
1515
1616
**This article applies to:** ❌ Basic/Standard tier ✔️ Enterprise tier
1717

18-
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.
1919

2020
## Build exit codes
2121

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).
2423

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/).
2825

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:
3527

36-
- You are running against the wrong path.
28+
- **20** - All buildpack groups have failed to detect.
3729

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.
3937

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.
4139

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.
4343

4444
- **51** - Buildpack build error.
4545

46-
Consider the following possible causes for 51 exit code:
46+
Consider the following possible causes of an exit code of *51*:
4747

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.
4949

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:
5151

5252
```azurecli
53-
az spring app deploy
53+
az spring app deploy \
5454
--resource-group <your-resource-group-name> \
5555
--service <your-Azure-Spring-Apps-name> \
5656
--name <your-app-name> \
5757
--build-memory 3Gi
5858
```
5959
60-
- Application source code error:
60+
- An application source code error; for example, there's a compilation error in your source code.
6161
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.
6363
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.
6765
6866
- **62** - Failed to write image to Azure Container Registry.
6967
70-
Consider the following possible causes for 62 exit code:
68+
Consider the following possible cause of an exit code of *62*:
7169
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.
7573
7674
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).
7775

0 commit comments

Comments
 (0)