无法在JBoss openshift中的JAVA_OPTS中设置选项 [英] Not able to set options in JAVA_OPTS in JBoss openshift

查看:114
本文介绍了无法在JBoss openshift中的JAVA_OPTS中设置选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更改服务器的运行时区.所以我想在JAVA_OPTS中添加时区选项. (-Duser.timezone = GMT). 我试图在openshift的JBoss盒中编辑'/var/lib/openshift/548c33cce0b8cd44d3000083/jbossas/bin/standalone.conf',但是由于权限被拒绝而失败.

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.

我已经提到了 https:/中提到的一种解决方案/forums.openshift.com/how-to-pass-jvm-options-to-jboss-7as . 那就是在action_hooks文件夹的'pre_start_jbossas'文件中添加"export JAVA_OPTS =" $ JAVA_OPTS -Duser.timezone = GMT并将其推送. 我做了同样的事情,它工作正常.服务器启动时,时区选项已正确添加到java_opts中.

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.

问题是,在重新启动盒式磁带时,Java_Opts中不存在timezone选项.请提供一些解决方案.

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

推荐答案

请改用JAVA_OPTS_EXT.记住要在行尾加上前导空格,例如:

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

export JAVA_OPTS_EXT=" -Duser.timezone=GMT "

这篇关于无法在JBoss openshift中的JAVA_OPTS中设置选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆