JBoss CLI的特殊字符 [英] Special characters with JBoss CLI
问题描述
我处于JBoss 6.4.8版本的域模式下。
我想通过CLI添加这4个系统属性:
I am in domain mode with JBoss 6.4.8 version. I want to add these 4 system properties by CLI :
1- /host=myserver/server-config=node/system-property=javax.net.ssl.keyStorePassword:add(boot-time=false,value=${VAULT::vault_block::attribute_name::1})
2- /host=myserver/server-config=node/system-property=javax.net.ssl.trustStorePassword:add(boot-time=false,value=${VAULT::vault_block::attribute_name::1})
不起作用
"outcome" => "failed",
"result" => undefined,
"failure-description" => "JBAS010839: Operation failed or was rolled back on all servers.",
"rolled-back" => true
如您所见,有 $
,:和 {}
字符,这是我的问题吗?
As you can see there is $
, : and {}
characters, is it my problem ?
过去,我遇到了 $
,我用 \ $
来解决,但在这里不起作用!
In the past, i encountered this problem with the $
and i solve it by \$
but here it doesn't work !
你能帮我吗?
非常感谢
Ludo
推荐答案
注意,如果最近添加了保管库配置,则无法解析保管库引用,在设置保管库之前需要重新启动或重新加载配置
Notice, vault references are not resolved if vault configuration was recently added, a restart or reload of the configuration is required before you set a vault reference.
未配置JBoss-cli解析参数值时(<在 jboss-cli.xml $ c $中将code>解析参数值
设置为 false
c>-默认情况下-):
When JBoss-cli is NOT configured to resolve parameter values (resolve-parameter-values
set to false
in jboss-cli.xml
-by default-):
a)使用<$ c $时使用 \ $
转义c>-command cli参数(又名非交互模式)
a) Escape with \$
when using the --command
cli parameter (aka non-interactive mode)
/path/to/jboss-cli.sh -c --command="/host=myserver/server-config=node/system-property=javax.net.ssl.keyStorePassword:add(boot-time=false,value=\${VAULT::vault_block::attribute_name::1})"
b)使用交互模式时,请使用直接引用
b) Use direct reference when using interactive mode
/host=myserver/server-config=node/system-property=javax.net.ssl.keyStorePassword:add(boot-time=false,value=${VAULT::vault_block::attribute_name::1})
参数值
当JBoss-cli配置为解析参数值时( resolve-parameter-values
设置为<$ jboss-cli.xml
中的c $ c> true ):
When resolving parameter values
When JBoss-cli is configured to resolve parameter values (resolve-parameter-values
set to true
in jboss-cli.xml
):
c)使用-command
cli参数时,使用 \ $ \ $
转义(这可以防止bash中的参数扩展)
c) Escape with \$\$
when using the --command
cli parameter (this prevents parameter expansion in bash )
/path/to/jboss-cli.sh -c --command="/host=myserver/server-config=node/system-property=javax.net.ssl.keyStorePassword:add(boot-time=false,value=\$\${VAULT::vault_block::attribute_name::1})"
d)使用<$ c $转义c> $$ 使用-file
cli参数
d) Escape with $$
when using the --file
cli parameter
/path/to/jboss-cli.sh -c --file="/path/to/commands.cli"
commands.cli
内容:
/host=myserver/server-config=node/system-property=javax.net.ssl.keyStorePassword:add(boot-time=false,value=$${VAULT::vault_block::attribute_name::1})"
或互动模式
/host=myserver/server-config=node/system-property=javax.net.ssl.keyStorePassword:add(boot-time=false,value=$${VAULT::vault_block::attribute_name::1})
这篇关于JBoss CLI的特殊字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!