Application Configuration Service for VMware Tanzu (ACS) is one of the commercial VMware Tanzu components. It enables the management of Kubernetes-native ConfigMap
resources that are populated from properties defined in one or more Git repositories.
Application Configuration Service is offered in two versions: Gen1 and Gen2. The Gen1 version mainly serves existing customers for backward compatibility purposes and is supported only until April 30, 2024. New service instances should use Gen2. The Gen2 version uses flux as the backend to communicate with Git repositories and provides better performance compared to Gen1.
You can check the generation information via Azure Portal
The below article will introduce the troubleshooting guide for both generations.
1. Make sure your Application Configuration Service setting is correct.
There are several checkpoints in the Application Configuration Service settings.
To verify the above things, you may take a look at Application Configuration Service's logs through Azure Log analysis. The log will hint reason if it is not able to access to your Git repository.
// Both works for Application Configuration Service Gen1 and Gen2
AppPlatformSystemLogs
| where LogType == "ApplicationConfigurationService"
| project TimeGenerated , ServiceName , Log , _ResourceId
| limit 100
If you are using Application Configuration Service Gen2, it is also worth a while to take a look at `Flux` logs.
// Only available in Application Configuration Service Gen2
AppPlatformSystemLogs
| where LogType == "Flux"
| project TimeGenerated , ServiceName , Log , _ResourceId
| limit 100
2. Make sure the app is bonded to ACS.
To explicitly use Application Configuration Service feature in an app, you have to bind the app through Azure Portal or Azure command line. It is unbound by default.
# Azure Command line to bind app
az spring application-configuration-service bind --app <app-name>
3. Make sure the deployment is configured with the corrected pattern.
A pattern is a combination of {application}/{profile}. To explicitly tell Azure Spring Apps which pattern your deployment wants to use, you can do that through Azure Portal or Azure command line.
// Bind config file pattern to your deployment
az spring app deploy \
--name <app-name> \
--artifact-path <path-to-your-JAR-file> \
--config-file-pattern <config-file-pattern>
4. Restart the app
You have to restart the application after the bind operation. Note that restart is not mandatory if you do an app deploy instead.
The refresh strategies provides some code examples about the end to end workflow to refresh your Java Spring Boot application configuration after you update the configuration file in the Git repository. The refresh frequency is 60 seconds in Azure Spring Apps but please allow another 60 seconds to reflect the change to the configmap.
If you still hit any issue, you can also follow the below troubleshooting guide.
1. Make sure the Application Configuration Service setting still uses the correct credentials.
Credentials may be expired and not been updated in Application Configuration Service settings. You can verify it through the same step in Case 1 via logs in Azure Log analysis.
2. Restart the app
Another possible reason that the refresh doesn't work in your app is that the Spring context is not refreshed. It could be a code issue in the app. You may restart the app to check the result.
Hope the troubleshooting guide is helpful to you!
To help you get started, we have monthly FREE grants on all tiers – 50 vCPU Hours and 100 memory GB Hours per tier.
Additional Resources
To learn more about Spring Cloud Azure, we invite you to visit the following links:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.