Deploy Autoscaller app errand fails with Error occurred during CDS dumping
search cancel

Deploy Autoscaller app errand fails with Error occurred during CDS dumping

book

Article ID: 406220

calendar_today

Updated On:

Products

VMware Tanzu Application Service

Issue/Introduction

 

When running the deploy-autoscaler bosh errand the following error is observed when pushing the autoscaler_api app. 

 

-----> Performing CDS Training Run
Command 'cd /tmp/app/autoscale-api-new && /tmp/app/.java-buildpack/open_jdk_jre/bin/java $JAVA_OPTS -Dspring.aot.enabled=true -Dspring.context.exit=onRefresh -XX:ArchiveClassesAtExit=application.jsa -Djava.security.properties=/tmp/app/.java-buildpack/java_security/java.security -jar autoscale-api-new.jar' has failed
STDOUT: Error occurred during CDS dumping
CDS dumping does not support native JVMTI agent, name: /var/vcap/data/dynatrace/oneagent/agent/bin/1.307.61.20250226-155505/linux-x86-64/liboneagentjava.so
STDERR:
[Buildpack] ERROR Finalize failed with exception RuntimeError
Failed to compile droplet: Failed to run finalize script: exit status 1
Exit status 223
BuildpackCompileFailed - App staging failed in the buildpack compile phase
FAILED

 

Cause

a recent feature called Boot Efficiency was added to JAVA Buildpack and enabled in the autoscaler app manifest.  When Dynatrace One Agent Deep Monitoring is enabled it will cause apps with the following environment variable set in the manifest to crash.

JBP_CONFIG_SPRING_BOOT_EFFICIENCY: '{ "aot_enabled": true, "cds_enabled": true }'

Resolution

A permanent fix will be available in a future release of Tanzu Platform Cloud Foundry.   The fix will disable Spring Boot Efficiency settings until dynatrace one agent compatibility is resolved. For now you can use the following workarounds

 

Workaround 1

Using Apps Manager go to the System org and autoscaling space.  Fine the autoscaler_api app and edit the user provided environment variables section.  Remove the key "JBP_CONFIG_SPRING_BOOT_EFFICIENCY" and restart the app.  This will get the autoscaler_api up and running but the errand will not be successful if run again.  Proceed to workaround 2 to all the errand to run successfully. 

Workaround 2

Note:  This will allow errand to run through successful in this run and future runs, however if there are any updates to Tanzu Platform Cloud Foundry tile such as a stemcell update these changes will be overwritten and the problem will return. Unless you are performing a certificate rotation or an upgrade to autoscaler itself you can leave the errand disabled after you get it to run successfully. Then re-enable the errand when a fix is available. 

ssh into bosh deployed vm "clock_global/1" in the "cf" deployment. in some cases errand will run on "clock_global/0" so be sure to update all clock_global vms if you are not sure which is the correct one. 

Comment out the "JBP_CONFIG_SPRING_BOOT_EFFICIENCY" in the autoscaler_api app manifest in two places

/var/vcap/packages/autoscaling_api/manifest.yml

and

/var/vcap/jobs/deploy-autoscaler/config/api_manifest.yml

 

---
applications:
- name: "autoscale-api"
  stack: cflinuxfs4
  memory: 1G
  path: /var/vcap/packages/autoscaling_api/pcf-autoscaler-api-2.0.0.jar
  timeout: 120
  env:
     .
     .
    JBP_CONFIG_SPRING_AUTO_RECONFIGURATION: '{enabled: false}'
    #JBP_CONFIG_SPRING_BOOT_EFFICIENCY: '{ "aot_enabled": true, "cds_enabled": true }'
    LOG_VERBOSE: "false"
    .
    .

Workaround 3

Disable Dynatrace Deep Monitoring for the autoscaler app until a fix is available.  This workaround will allow autoscaler deploy errand to succeed without applying the other two workarounds above. 

https://docs.dynatrace.com/docs/observe/infrastructure-monitoring/process-groups/configuration/pg-monitoring