zhouhuaian / bot-test-repo

0 stars 0 forks source link

WFLYCTL0201: Unknown attribute 'server-state' using HTTP management API #86

Open zhouhuaian opened 6 months ago

zhouhuaian commented 6 months ago

Unable to get server-state using http management API

{noformat} [mchoma@localhost bin]$ curl --digest -L -D - http://localhost:9990/management --header "Content-Type: application/json" -d '{"operation":"read-attribute", "address" : [[{ "host" : "master" },{ "server" : "server-one" }]], "name" : "server-state","json.pretty":1}' -u admin:admin HTTP/1.1 401 Unauthorized Connection: keep-alive WWW-Authenticate: Digest realm="ManagementRealm",domain="/management",nonce="sI2Bu4kJcGgNMTQ1NTYxMDE3OTU2MVc91LWa8HnWzIKZ5I8UIlo=",opaque="00000000000000000000000000000000",algorithm=MD5,qop="auth" Content-Length: 77 Content-Type: text/html Date: Tue, 16 Feb 2016 08:09:39 GMT

HTTP/1.1 500 Internal Server Error Connection: keep-alive Authentication-Info: nextnonce="sI2Bu4kJcGgNMTQ1NTYxMDE3OTU2MVc91LWa8HnWzIKZ5I8UIlo=",qop="auth",rspauth="8e575a86f8dae40426abd49bbc8f8b8a",cnonce="YmNiNmM4YjA0NmZlYjQ5MzAwMDAyNjIxMDAwODNhODE=",nc=00000001 Content-Type: application/json; charset=utf-8 Content-Length: 131 Date: Tue, 16 Feb 2016 08:09:39 GMT

{ "outcome" : "failed", "failure-description" : "WFLYCTL0201: Unknown attribute 'server-state'", "rolled-back" : true

{noformat}

Running analogous CLI command works OK.

{noformat} [domain@127.0.0.1:9999 /] /host=slave/server=main-three:read-attribute(name=server-state) { "outcome" => "success", "result" => "running" } {noformat}

Can't get server status neither with {noformat}
curl --digest -L -D - http://localhost:9990/management --header "Content-Type: application/json" -d '{"operation":"read-attribute", "address" : [[{ "host" : "master" },{ "server-config" : "server-one" }]], "name" : "status","json.pretty":1}' -u admin:admin ... "WFLYCTL0201: Unknown attribute 'status'" {noformat}

Issue can be seen in EAP 6, as well.