Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launcher CNB_PLATFORM_API failed to get platform API version #381

Open
SAURABH110894 opened this issue Nov 16, 2023 · 6 comments
Open

Launcher CNB_PLATFORM_API failed to get platform API version #381

SAURABH110894 opened this issue Nov 16, 2023 · 6 comments

Comments

@SAURABH110894
Copy link

Hi Team,

I'm using CNB Apache-Tomcat Image, It was all running fine before, but now we have updated to Apache Tomcat 9.0.82 and we are getting below error.

ERROR: failed to get platform API version; please set 'CNB_PLATFORM_API' to specify the desired platform API version


> root@4c417129d5ee:/workspace# launcher /cnb/process/web
> Setting Active Processor Count to 2
> Calculating JVM memory based on 9998876K available memory
> For more information on this calculation, see https://paketo.io/docs/reference/java-reference/#memory-calculator
> Calculated JVM Memory Configuration: -XX:MaxDirectMemorySize=10M -Xmx9424697K -XX:MaxMetaspaceSize=62178K -XX:ReservedCodeCacheSize=240M -Xss1M (Total Memory: 9998876K, Thread Count: 250, Loaded Class Count: 8564, Headroom: 0%)
> Enabling Java Native Memory Tracking
> Adding 137 container CA certificates to JVM truststore
> ERROR: failed to get platform API version; please set 'CNB_PLATFORM_API' to specify the desired platform API version

I'm using launcher, running certain command and triggering launcher /cnb/process/web command.

Could you please help me to fix this error.

Regards
Saurabh

@SAURABH110894
Copy link
Author

@natalieparellano , Could you please help us in this issue ?

@SAURABH110894 SAURABH110894 changed the title Launcher CNB_PLATFORM_API failed to get platform API version; please set 'CNB_PLATFORM_API' to specify the desired platform API version Launcher CNB_PLATFORM_API failed to get platform API version Nov 16, 2023
@natalieparellano
Copy link
Member

@SAURABH110894 I believe this error is surfacing because you are calling the launcher with the launcher (/cnb/process/web is a symlink to the launcher). Can you try just /cnb/process/web?

@SAURABH110894
Copy link
Author

@SAURABH110894 I believe this error is surfacing because you are calling the launcher with the launcher (/cnb/process/web is a symlink to the launcher). Can you try just /cnb/process/web?

@natalieparellano Yes I did same,

Below is output.

cnb@b3f95129ae5e:/workspace$ /cnb/process/web
Setting Active Processor Count to 8
Calculating JVM memory based on 7379076K available memory
For more information on this calculation, see https://paketo.io/docs/reference/java-reference/#memory-calculator
Calculated JVM Memory Configuration: -XX:MaxDirectMemorySize=10M -Xmx6804897K -XX:MaxMetaspaceSize=62178K -XX:ReservedCodeCacheSize=240M -Xss1M (Total Memory: 7379076K, Thread Count: 250, Loaded Class Count: 8564, Headroom: 0%)
Enabling Java Native Memory Tracking
Adding 137 container CA certificates to JVM truststore
Using CATALINA_BASE: /layers/paketo-buildpacks_apache-tomcat/catalina-base
Using CATALINA_HOME: /layers/paketo-buildpacks_apache-tomcat/tomcat
Using CATALINA_TMPDIR: /tmp
Using JRE_HOME: /layers/paketo-buildpacks_bellsoft-liberica/jre
Using CLASSPATH: /layers/paketo-buildpacks_apache-tomcat/catalina-base/bin/tomcat-logging-support-3.4.0.RELEASE.jar:/layers/paketo-buildpacks_apache-tomcat/tomcat/bin/bootstrap.jar:/layers/paketo-buildpacks_apache-tomcat/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS: -Dorg.apache.tomcat.util.digester.PROPERTY_SOURCE=org.apache.tomcat.util.digester.EnvironmentPropertySource
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Picked up JAVA_TOOL_OPTIONS: -Djava.security.properties=/layers/paketo-buildpacks_bellsoft-liberica/java-security-properties/java-security.properties -XX:+ExitOnOutOfMemoryError -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED --illegal-access=warn -Dio.netty.tryReflectionSetAccessible=true -Xlog:gc*:file=/tmp/gc.log:time,uptime,level,tags:filecount=100,filesize=10m -Dfile.encoding=UTF-8 -XX:ActiveProcessorCount=8 -XX:MaxDirectMemorySize=10M -Xmx6804897K -XX:MaxMetaspaceSize=62178K -XX:ReservedCodeCacheSize=240M -Xss1M -XX:+UnlockDiagnosticVMOptions -XX:NativeMemoryTracking=summary -XX:+PrintNMTStatistics
OpenJDK 64-Bit Server VM warning: Native Memory Tracking did not setup properly, using wrong launcher?
OpenJDK 64-Bit Server VM warning: PrintNMTStatistics is disabled, because native memory tracking is not enabled
[CONTAINER] org.apache.coyote.http11.Http11NioProtocol INFO Initializing ProtocolHandler ["http-nio-8080"]
[CONTAINER] org.apache.catalina.startup.Catalina INFO Server initialization in [1142] milliseconds
[CONTAINER] org.apache.catalina.core.StandardService INFO Starting service [Catalina]
[CONTAINER] org.apache.catalina.core.StandardEngine INFO Starting Servlet engine: [Apache Tomcat/9.0.82]
[CONTAINER] org.apache.catalina.startup.HostConfig INFO Deploying web application directory [/workspace/ROOT]

`
But Error Came up, This means it's Can't Manage Native Memory Tracking, So CNB features will be Void for us.
Below is the Error Message

OpenJDK 64-Bit Server VM warning: Native Memory Tracking did not setup properly, using wrong launcher?

Please help me to resolve this issue.

@SAURABH110894
Copy link
Author

SAURABH110894 commented Nov 16, 2023

@natalieparellano Looking for your support, I have kept error message on above message.

@natalieparellano
Copy link
Member

@SAURABH110894 I'm afraid I don't have good insight into this error. Though the error message mentions the launcher, there is no indication what about it could be "wrong". Could you reach out to the Paketo team (slack.paketo.io)?

@SAURABH110894
Copy link
Author

Thank you so much for Guidance !!!!

@natalieparellano

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants