Dreamer
Dreamer

Reputation: 7549

Jboss CLI: Expected [INT] but was STRING

I am making CLI script to add two attributes(max-post-size, max-save-post-size) to http connector so it should looks like:

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

my command is:

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

But it gives me

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

So I am really confused how to declare integer in CLI, I try max-post-size=[5120000000], max-save-post-size=[1024000000] but it doesn't work

Upvotes: 1

Views: 2602

Answers (1)

Beryllium
Beryllium

Reputation: 12998

Given

[standalone@localhost:9999 connector=http] cd /subsystem=web/connector=http

The type of the attribute is INT:

[standalone@localhost:9999 connector=http] ls -l
ATTRIBUTE VALUE TYPE
[...]
max-post-size 2120000000 INT
[...]

If the value is < 2,147,483,647, it works:

[standalone@localhost:9999 connector=http] /subsystem=web/connector=http:write-attribute(name=max-post-size, value=2120000000)
{
"outcome" => "success",
"response-headers" => {
"operation-requires-reload" => true,
"process-state" => "reload-required"
}
}

If the value is greater, it fails:

[standalone@localhost:9999 connector=http] /subsystem=web/connector=http:write-attribute(name=max-post-size, value=3120000000)
{
"outcome" => "failed",
"failure-description" => "JBAS014688: Wrong type for max-post-size. Expected [INT] but was STRING",
"rolled-back" => true,
"response-headers" => {"process-state" => "reload-required"}
}

So the error message is misleading.

Upvotes: 3

Related Questions