Pivotal Knowledge Base

Follow

SSO deploy-service-broker errand fails and green identity service broker app crashes as not enough memory

Environment

  • Spring Cloud Services 1.3.3
  • Pivotal Cloud Foundry 1.9
  • Pivotal SSO Tile

Symptom

The deploy-service-broker errand in the SSO tile fails with the following:

{"0":{"state":"CRASHED","stats":{"name":"green-identity-service-broker","uris":["green-p-identity.test-cf-prod.intranet.rws.nl"],"host":null,"port":null,"uptime":0,"mem_quota":536870912,"disk_quota":1073741824,"fds_quota":16384,"usage":{"time":"2017-07-25T07:17:22.104637935Z","cpu":0,"mem":0,"disk":0}}}}
0 of 1 instances running, 1 crashed
FAILED
Start unsuccessful

TIP: use 'cf logs green-identity-service-broker --recent' for more information

Error Message

The following is seen in the green-identity-service-broker app logs:

2017-07-25T12:10:43.34+0100 [CELL/0] OUT Starting health monitoring of container
   2017-07-25T12:10:43.42+0100 [APP/PROC/WEB/0] ERR Cannot calculate JVM memory configuration: There is insufficient memory remaining for heap. Memory limit 512M is less than allocated memory 679010K (-XX:ReservedCodeCacheSize=240M, -XX:MaxDirectMemorySize=10M, -XX:MaxMetaspaceSize=97839K, -XX:CompressedClassSpaceSize=17970K, -Xss1M * 300 threads)
   2017-07-25T12:10:43.43+0100 [APP/PROC/WEB/0] OUT Exit status 1
   2017-07-25T12:10:43.44+0100 [CELL/0] OUT Exit status 0
   2017-07-25T12:10:43.46+0100 [CELL/0] OUT Destroying container
   2017-07-25T12:10:43.48+0100 [API/0] OUT Process has crashed with type: "web"

Cause 

When the green-identity-service-broker app is staged, it fetches the first java build pack in the list and uses that to build the droplet. In this example, the customer had downloaded a newer version (v4.2) of the java build pack and positioned it above the supported java_buildpack_offline version (v3.17) in ERT (1.10.15).

This issue is caused by increased memory usage in Java Buildpack 4.0 and above, see: Insufficient memory when using Java Buildpack 4.0

Resolution

1. Get the current build pack list 

     cf buildpacks

2. Re-position the supported java_buildpack_offline version above the version you downloaded

     cf update-buildpack java_buildpack_offline -i 

3. Re-run the deploy-service-broker errand and confirm if it passes now.

Note: This may affect any application that doesn't specify the custom build pack with the -b option.

If you wish to use the latest Java buildpack, manually scale SSO using the instructions in this article SSO memory error when deploying to Pivotal Cloud Foundry 1.12

This issue is also fixed in versions 1.4.4+ or 1.5.1+ of Pivotal SSO tile. The size of identity application is increased to meet the higher demands of memory calculator in Java Buildpack 4.0.

Comments

Powered by Zendesk