forked from laiweijian4/doc-exports
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com> Co-authored-by: Dong, Qiu Jian <qiujiandong1@huawei.com> Co-committed-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
2.0 KiB
2.0 KiB
What Can I Do If an Error Is Reported When a Deployed Container Is Started After the JVM Startup Heap Memory Parameter Is Specified for ENTRYPOINT in Dockerfile?
Symptom
After the JVM startup heap memory parameter is specified for ENTRYPOINT in the Dockerfile, an error message "invalid initial heap size" is displayed during the deployed container's startup, as shown in the following figure:
Answer
Check the ENTRYPOINT settings. The following settings are incorrect:
ENTRYPOINT ["java","-Xms2g -Xmx2g","-jar","xxx.jar"]
You can use either of the following methods to solve the problem:
- (Recommended) Write the container startup command in Workloads > Container Settings > Lifecycle > Startup Command, then the container can be started properly.
- Change the format of the ENTRYPOINT startup command to the following:
ENTRYPOINT exec java -Xmx2g -Xms2g -jar xxxx.jar
Parent topic: Container Configuration