Following the steps of the tutorial deploying an Azure Spring Apps service in East US results in failed application deployment for the Catalog, Payment and Identity services.
See below logs for the partial Payment service deployment logs:
`Paketo Syft Buildpack 1.10.0
https://github.com/paketo-buildpacks/syft
Reusing cached download from buildpack
Writing env.build/SYFT_CHECK_FOR_APP_UPDATE.default
Paketo Gradle Buildpack 6.4.2
https://github.com/paketo-buildpacks/gradle
Build Configuration:
$BP_GRADLE_BUILD_ARGUMENTS --no-daemon assemble the arguments to pass to Gradle
$BP_GRADLE_BUILD_FILE the location of the main build config file, relative to the application root
$BP_GRADLE_BUILT_ARTIFACT build/libs/*.[jw]ar the built application artifact explicitly. Supersedes $BP_GRADLE_BUILT_MODULE
$BP_GRADLE_BUILT_MODULE the module to find application artifact in
Creating cache directory /home/cnb/.gradle
Compiled Application: Contributing to layer
Executing gradlew --no-daemon assemble
Downloading https://services.gradle.org/distributions/gradle-7.4.1-bin.zip
...........10%...........20%...........30%...........40%...........50%...........60%...........70%...........80%...........90%...........100%
Welcome to Gradle 7.4.1!
Here are the highlights of this release:
- Aggregated test and JaCoCo reports
- Marking additional test source directories as tests in IntelliJ
- Support for Adoptium JDKs in Java toolchains
For more details see https://docs.gradle.org/7.4.1/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.4.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
Task :compileJava
Task :processResources
Task :classes
Task :bootJarMainClassName
Task :bootJar
Task :jar
Task :assemble
BUILD SUCCESSFUL in 1m 1s
5 actionable tasks: 5 executed
Removing source code
Restoring multiple artifacts
Paketo Executable JAR Buildpack 6.2.0
https://github.com/paketo-buildpacks/executable-jar
Process types:
executable-jar: java -jar /workspace/acme-payment-0.0.1-SNAPSHOT.jar (direct)
task: java -jar /workspace/acme-payment-0.0.1-SNAPSHOT.jar (direct)
web: java -jar /workspace/acme-payment-0.0.1-SNAPSHOT.jar (direct)
Paketo Azure Application Insights Buildpack 5.4.2
https://github.com/paketo-buildpacks/azure-application-insights
Azure Application Insights Java Agent 3.2.11: Contributing to layer
Reusing cached download from buildpack
Copying to /layers/paketo-buildpacks_azure-application-insights/azure-application-insights-java
Writing env.launch/JAVA_TOOL_OPTIONS.append
Writing env.launch/JAVA_TOOL_OPTIONS.delim
Launch Helper: Contributing to layer
Creating /layers/paketo-buildpacks_azure-application-insights/helper/exec.d/properties
Adding layer 'paketo-buildpacks/ca-certificates:helper'
Adding layer 'paketo-buildpacks/microsoft-openjdk:helper'
Adding layer 'paketo-buildpacks/microsoft-openjdk:java-security-properties'
Adding layer 'paketo-buildpacks/microsoft-openjdk:jdk'
Adding layer 'paketo-buildpacks/azure-application-insights:azure-application-insights-java'
Adding layer 'paketo-buildpacks/azure-application-insights:helper'
Adding layer 'launch.sbom'
Adding 1/1 app layer(s)
Adding layer 'launcher'
Adding layer 'config'
Adding layer 'process-types'
Adding label 'io.buildpacks.lifecycle.metadata'
Adding label 'io.buildpacks.build.metadata'
Adding label 'io.buildpacks.project.metadata'
Setting default process type 'web'
Saving acr4b04ad7888ce4ea5b.azurecr.io/build-service-result-image-cab1d346fdbd45a391af896367d177be-default-payment-service:result-1...
*** Images (sha256:96a12590c49bcbe93f4a357e895c71c26985e2b44821cec37cd44a08aafa59cb):
acr4b04ad7888ce4ea5b.azurecr.io/build-service-result-image-cab1d346fdbd45a391af896367d177be-default-payment-service:result-1
Adding cache layer 'paketo-buildpacks/microsoft-openjdk:jdk'
Adding cache layer 'paketo-buildpacks/syft:syft'
Adding cache layer 'paketo-buildpacks/gradle:application'
Adding cache layer 'paketo-buildpacks/gradle:cache'
Adding cache layer 'cache.sbom'
[5/5] Updating deployment in app "payment-service" (this operation can take a while to complete)
112404: Failed to wait for deployment instances to be ready. Please check the application log (see https://aka.ms/azure-spring-cloud-doc-log ), and try again later.`
When checking the application logs with az spring app logs -n $PAYMENT_SERVICE_APP
the following is available:
2022-06-01 14:35:15.541 INFO 1 --- [ main] c.v.acme.payment.PaymentApplication : Starting PaymentApplication using Java 11.0.14 on payment-service-default-15-d64965f75-xp84s with PID 1 (/workspace/acme-payment-0.0.1-SNAPSHOT.jar started by cnb in /workspace) 2022-06-01 14:35:17.031 INFO 1 --- [ main] c.v.acme.payment.PaymentApplication : No active profile set, falling back to 1 default profile: "default" 2022-06-01 14:35:23.054 INFO 1 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=fa1fe375-0a10-380c-9ee8-2ea19f46f0cf 2022-06-01 14:35:23.245 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2022-06-01 14:35:23.247 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactorDeferringLoadBalancerFilterConfig' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactorDeferringLoadBalancerFilterConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2022-06-01 14:35:23.248 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'reactorDeferringLoadBalancerExchangeFilterFunction' of type [org.springframework.cloud.client.loadbalancer.reactive.DeferringLoadBalancerExchangeFilterFunction] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) Terminating due to java.lang.OutOfMemoryError: Metaspace
When the JVM option is added with -XX:MaxMetaspaceSize=148644K
to override the default calculated value of 74322K the issue is resolved and the application is able to start successfully.