1

我正在制作 CLI 脚本来添加两个属性(max-post-size、max-save-post-size),http connector 所以它应该看起来像:

<connector name="http" protocol="HTTP/1.1" scheme="http" max-post-size="5120000000" max-save-post-size="1024000000" socket-binding="http"/>

我的命令是:

/subsystem=web/connector=https:add(socket-binding=http,scheme=http,protocol="HTTP/1.1",max-post-size=5120000000, max-save-post-size=1024000000)

但它给了我

"failure-description" => "JBAS014688: Wrong type for max-post-size. Expected [INT] but was STRING",

所以我真的很困惑如何在 CLI 中声明整数,我尝试了max-post-size=[5120000000]max-save-post-size=[1024000000]但它不起作用

4

1 回答 1

3

给定

[独立@localhost:9999 连接器=http] cd /subsystem=web/connector=http

属性的类型是INT

[standalone@localhost:9999 connector=http] ls -l
属性值类型
[...]
max-post-size 2120000000 INT
[...]

如果该值 < 2,147,483,647,则有效:

[standalone@localhost:9999 connector=http] /subsystem=web/connector=http:write-attribute(name=max-post-size, value=2120000000)
{
“结果”=>“成功”,
“响应标题” => {
“操作需要重新加载” => true,
“进程状态” => “重新加载需要”
}
}

如果值更大,则失败:

[standalone@localhost:9999 connector=http] /subsystem=web/connector=http:write-attribute(name=max-post-size, value=3120000000)
{
“结果”=>“失败”,
“失败描述” => “JBAS014688:最大后置大小的类型错误。预期 [INT] 但为 STRING”,
“回滚”=> 真,
“响应标头”=> {“进程状态”=>“重新加载-需要”}
}

所以错误信息具有误导性。

于 2013-08-24T07:25:03.877 回答