Not able to set options in JAVA_OPTS in JBoss openshift

倾然丶 夕夏残阳落幕 提交于 2019-12-18 09:51:29

问题


I want to change the server running timezone. So I want to add timezone option in JAVA_OPTS. (-Duser.timezone=GMT). I have tried to edit '/var/lib/openshift/548c33cce0b8cd44d3000083/jbossas/bin/standalone.conf' in JBoss cartridge of openshift, but failed because of Permission denied.

I have referred one solution mentioned in https://forums.openshift.com/how-to-pass-jvm-options-to-jboss-7as. That is to add "export JAVA_OPTS="$JAVA_OPTS -Duser.timezone=GMT" in 'pre_start_jbossas' file in action_hooks folder and push it. I did the same and it is working fine. The timezone options is correctly added in java_opts at the time of server start up.

Problem here is, at the time of cartridge restart, the timezone option is not present in Java_Opts. Please provide some solution.


回答1:


Use JAVA_OPTS_EXT instead. Remember to put trailing and leading spaces, like:

export JAVA_OPTS_EXT=" -Duser.timezone=GMT "


来源:https://stackoverflow.com/questions/27509140/not-able-to-set-options-in-java-opts-in-jboss-openshift

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!