[ 
https://issues.apache.org/jira/browse/ARTEMIS-479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17835804#comment-17835804
 ] 

Justin Bertram commented on ARTEMIS-479:
----------------------------------------

Executing {{createQueue}} via Jolokia on a backup of 2.31.2 using {{curl}} 
returns this result:
{noformat}
$ curl -v -H "Origin: http://localhost"; -u myUser:myPass 
http://localhost:8162/console/jolokia/exec/org.apache.activemq.artemis:broker=\"0.0.0.0\"/createQueue\(java.lang.String,java.lang.String\)/foo/foo
*   Trying 127.0.0.1:8162...
* Connected to localhost (127.0.0.1) port 8162 (#0)
* Server auth using Basic with user 'myUser'
> GET 
> /console/jolokia/exec/org.apache.activemq.artemis:broker="0.0.0.0"/createQueue(java.lang.String,java.lang.String)/foo/foo
>  HTTP/1.1
> Host: localhost:8162
> Authorization: Basic bXlVc2VyOm15UGFzcw==
> User-Agent: curl/7.81.0
> Accept: */*
> Origin: http://localhost
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Wed, 10 Apr 2024 16:05:19 GMT
< Cache-Control: no-cache
< Pragma: no-cache
< X-Frame-Options: DENY
< X-XSS-Protection: 1
< X-Content-Type-Options: nosniff
< Content-Security-Policy: default-src 'self'; script-src 'self' 
'unsafe-inline' 'unsafe-eval' ; style-src 'self' 'unsafe-inline'; font-src 
'self' data:; img-src 'self' data:; connect-src 'self' ; frame-src 'self' ; 
frame-ancestors 'none'
< Strict-Transport-Security: max-age=31536000;includeSubDomains;preload
< Referrer-Policy: strict-origin
< Access-Control-Allow-Origin: http://localhost
< Access-Control-Allow-Credentials: true
< Content-Type: text/plain;charset=utf-8
< Expires: Wed, 10 Apr 2024 15:05:19 GMT
< Transfer-Encoding: chunked
< 
* Connection #0 to host localhost left intact
{"request":{"mbean":"org.apache.activemq.artemis:broker=\"0.0.0.0\"","arguments":["foo","foo"],"type":"exec","operation":"createQueue(java.lang.String,java.lang.String)"},"error_type":"java.lang.IllegalStateException","error":"java.lang.IllegalStateException
 : Journal must be in state=LOADED, was [STARTED]","status":500}{noformat}
The HTTP request technically succeeds there it returns a 200, but the server 
wasn't able to handle the request so the payload contains an explanation of the 
error.

> Create queue on a backup server by management interface returns success
> -----------------------------------------------------------------------
>
>                 Key: ARTEMIS-479
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-479
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 1.2.0
>            Reporter: Kaiming Yang
>            Priority: Major
>
> When using management interface to create queues on a backup server, backup 
> server returns success. After the request a queue will be created and backup 
> service would raise java.lang.IllegalStateException when failover happened.
> Steps to reproduce:
> 1) Create 2 servers with replication ha policy(1 master and 1 slave)
> 2) Create a queue on backup server using following jolokia request:
>     POST http://backup.example.com:8161/jolokia/
>     with body: 
> {"mbean":"org.apache.activemq.artemis:brokerName=\"backup.example.com\",module=Core,serviceType=Server,type=Broker","arguments":["jms.queue.testqueue","jms.queue.testqueue"],"type":"exec","operation":"createQueue(java.lang.String,java.lang.String)"}
> Expected response:
> - Failed with error message "server not started"
> Actual response:
> - Server returns success with status code 200



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to