java-buildpack: Java application can't start with the current master

Some applications silently fails to start with a914fd6 release of the build pack without providing any meaningful information.

Bellow I’m trying to deploy the same application with two different versions of the buildpack (a914fd6 and v3.14) and three different settings for memory limit.

v3.14 behavior

Starting app v3.14-128M
-----> Downloaded app package (32M)
Cloning into '/tmp/buildpacks/java-buildpack'...
Note: checking out '26cf03bdf49c93f01793d0f2753e41a3e7061bc9'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
  git checkout -b new_branch_name
-----> Java Buildpack Version: v3.14 | https://github.com/rakutentech/java-buildpack#26cf03b
-----> Downloading Open Jdk JRE 1.8.0_121 from https://java-buildpack.cloudfoundry.org/openjdk/trusty/x86_64/openjdk-1.8.0_121.tar.gz (0.5s)
       Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.1s)
-----> Downloading Open JDK Like Memory Calculator 2.0.2_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/trusty/x86_64/memory-calculator-2.0.2_RELEASE.tar.gz (0.0s)
       Cannot balance memory: Memory allocation failed for configuration: [metaspace:64M.. stack:228K..], : memory exceeded
[Buildpack]                      ERROR Compile failed with exception RuntimeError
Staging failed: Buildpack compilation step failed

FAILED
Error restarting application: BuildpackCompileFailed

TIP: use 'cf logs v3.14-128M --recent' for more information
Starting app v3.14-256M
-----> Downloaded app package (32M)
Cloning into '/tmp/buildpacks/java-buildpack'...
Note: checking out '26cf03bdf49c93f01793d0f2753e41a3e7061bc9'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
  git checkout -b new_branch_name
-----> Java Buildpack Version: v3.14 | https://github.com/rakutentech/java-buildpack#26cf03b
-----> Downloading Open Jdk JRE 1.8.0_121 from https://java-buildpack.cloudfoundry.org/openjdk/trusty/x86_64/openjdk-1.8.0_121.tar.gz (0.5s)
       Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.1s)
-----> Downloading Open JDK Like Memory Calculator 2.0.2_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/trusty/x86_64/memory-calculator-2.0.2_RELEASE.tar.gz (0.1s)
       Memory Settings: -Xss228K -Xmx104169K -XX:MaxMetaspaceSize=64M -Xms104169K -XX:MetaspaceSize=64M
-----> Downloading Container Certificate Trust Store 2.0.0_RELEASE from https://java-buildpack.cloudfoundry.org/container-certificate-trust-store/container-certificate-trust-store-2.0.0_RELEASE.jar (0.0s)
       Adding certificates to .java-buildpack/container_certificate_trust_store/truststore.jks (0.3s)
-----> Downloading Spring Auto Reconfiguration 1.10.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.10.0_RELEASE.jar (0.1s)
-----> Uploading droplet (78M)

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
Starting app v3.14-512M
-----> Downloaded app package (32M)
Cloning into '/tmp/buildpacks/java-buildpack'...
Note: checking out '26cf03bdf49c93f01793d0f2753e41a3e7061bc9'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
  git checkout -b new_branch_name
-----> Java Buildpack Version: v3.14 | https://github.com/rakutentech/java-buildpack#26cf03b
-----> Downloading Open Jdk JRE 1.8.0_121 from https://java-buildpack.cloudfoundry.org/openjdk/trusty/x86_64/openjdk-1.8.0_121.tar.gz (0.5s)
       Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.0s)
-----> Downloading Open JDK Like Memory Calculator 2.0.2_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/trusty/x86_64/memory-calculator-2.0.2_RELEASE.tar.gz (0.0s)
       Memory Settings: -XX:MaxMetaspaceSize=64M -Xss228K -Xms317161K -XX:MetaspaceSize=64M -Xmx317161K
-----> Downloading Container Certificate Trust Store 2.0.0_RELEASE from https://java-buildpack.cloudfoundry.org/container-certificate-trust-store/container-certificate-trust-store-2.0.0_RELEASE.jar (0.0s)
       Adding certificates to .java-buildpack/container_certificate_trust_store/truststore.jks (0.3s)
-----> Downloading Spring Auto Reconfiguration 1.10.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.10.0_RELEASE.jar (0.0s)
-----> Uploading droplet (78M)

0 of 1 instances running, 1 starting
1 of 1 instances running

App started


OK

App v3.14-512M was started using this command `CALCULATED_MEMORY=$($PWD/.java-buildpack/open_jdk_jre/bin/java-buildpack-memory-calculator-2.0.2_RELEASE -memorySizes=metaspace:64m..,stack:228k.. -memoryWeights=heap:65,metaspace:10,native:15,stack:10 -memoryInitials=heap:100%,metaspace:100% -stackThreads=300 -totMemory=$MEMORY_LIMIT) && JAVA_OPTS="-Djava.io.tmpdir=$TMPDIR -XX:OnOutOfMemoryError=$PWD/.java-buildpack/open_jdk_jre/bin/killjava.sh $CALCULATED_MEMORY -Djavax.net.ssl.trustStore=$PWD/.java-buildpack/container_certificate_trust_store/truststore.jks -Djavax.net.ssl.trustStorePassword=java-buildpack-trust-store-password" && SERVER_PORT=$PORT eval exec $PWD/.java-buildpack/open_jdk_jre/bin/java $JAVA_OPTS -cp $PWD/. org.springframework.boot.loader.JarLauncher`

Showing health and status for app v3.14-512M
OK

requested state: started
instances: 1/1
usage: 512M x 1 instances
urls: api-jggkf.rpaas.net
last uploaded: Tue Mar 7 09:09:58 UTC 2017
buildpack: https://github.com/rakutentech/java-buildpack#v3.14

     state     since                    cpu      memory         disk           details
#0   running   2017-03-07 06:10:38 PM   376.2%   436M of 512M   158.2M of 1G

a914fd6 behavior

Starting app master-128M
-----> Downloaded app package (32M)
Cloning into '/tmp/buildpacks/java-buildpack'...
-----> Java Buildpack Version: a914fd6 | https://github.com/rakutentech/java-buildpack#a914fd6
-----> Downloading Open Jdk JRE 1.8.0_121 from https://java-buildpack.cloudfoundry.org/openjdk/trusty/x86_64/openjdk-1.8.0_121.tar.gz (0.5s)
       Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (0.9s)
-----> Downloading Open JDK Like Memory Calculator 3.2.0_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/trusty/x86_64/memory-calculator-3.2.0_RELEASE.tar.gz (0.0s)
       Loaded Classes: 17882, Threads: 300, JAVA_OPTS: ''
-----> Downloading Container Certificate Trust Store 2.0.0_RELEASE from https://java-buildpack.cloudfoundry.org/container-certificate-trust-store/container-certificate-trust-store-2.0.0_RELEASE.jar (0.0s)
       Adding certificates to .java-buildpack/container_certificate_trust_store/truststore.jks (0.3s)
-----> Downloading Spring Auto Reconfiguration 1.10.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.10.0_RELEASE.jar (0.1s)
-----> Uploading droplet (78M)

0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
Starting app master-256M
-----> Downloaded app package (32M)
Cloning into '/tmp/buildpacks/java-buildpack'...
-----> Java Buildpack Version: a914fd6 | https://github.com/rakutentech/java-buildpack#a914fd6
-----> Downloading Open Jdk JRE 1.8.0_121 from https://java-buildpack.cloudfoundry.org/openjdk/trusty/x86_64/openjdk-1.8.0_121.tar.gz (0.5s)
       Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.0s)
-----> Downloading Open JDK Like Memory Calculator 3.2.0_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/trusty/x86_64/memory-calculator-3.2.0_RELEASE.tar.gz (0.0s)
       Loaded Classes: 17882, Threads: 300, JAVA_OPTS: ''
-----> Downloading Container Certificate Trust Store 2.0.0_RELEASE from https://java-buildpack.cloudfoundry.org/container-certificate-trust-store/container-certificate-trust-store-2.0.0_RELEASE.jar (0.0s)
       Adding certificates to .java-buildpack/container_certificate_trust_store/truststore.jks (0.3s)
-----> Downloading Spring Auto Reconfiguration 1.10.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.10.0_RELEASE.jar (0.1s)
-----> Uploading droplet (78M)

0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
Starting app master-512M
-----> Downloaded app package (32M)
Cloning into '/tmp/buildpacks/java-buildpack'...
-----> Java Buildpack Version: a914fd6 | https://github.com/rakutentech/java-buildpack#a914fd6
-----> Downloading Open Jdk JRE 1.8.0_121 from https://java-buildpack.cloudfoundry.org/openjdk/trusty/x86_64/openjdk-1.8.0_121.tar.gz (0.5s)
       Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.0s)
-----> Downloading Open JDK Like Memory Calculator 3.2.0_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/trusty/x86_64/memory-calculator-3.2.0_RELEASE.tar.gz (0.0s)
       Loaded Classes: 17882, Threads: 300, JAVA_OPTS: ''
-----> Downloading Container Certificate Trust Store 2.0.0_RELEASE from https://java-buildpack.cloudfoundry.org/container-certificate-trust-store/container-certificate-trust-store-2.0.0_RELEASE.jar (0.0s)
       Adding certificates to .java-buildpack/container_certificate_trust_store/truststore.jks (0.3s)
-----> Downloading Spring Auto Reconfiguration 1.10.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.10.0_RELEASE.jar (0.0s)
-----> Uploading droplet (78M)

0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 2
  • Comments: 21 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Is there any easy way to know the calculated settings so that we knew where to start adjustment from for our “Hello world”? In past we had the following message in logs Memory Settings: -Xss228K -Xmx104169K -XX:MaxMetaspaceSize=64M -Xms104169K -XX:MetaspaceSize=64M but it is not there anymore.