Hi,
I would like to move messages from error queue to parent queue in Redhat
Active MQ.
I want to automate Jolokia REST Url
moveMessages(int,java.lang.String,java.lang.String,boolean) concept through
ansible uri module but getting below mentioned error. I use POST and PUT
method but getting error.
Please do let me know how to execute this url through ansible script.
// uri.yml
---
- hosts: all
gather_facts: True
tasks:
- name: move messages from error queue to main queue
uri:
url:
"http://abc.net:9161/console/jolokia/exec/org.apache.activemq.artemis:broker=%22BROKER1-MASTER%22,component=addresses,address=%22business_select_enrollment_qa_error%22,subcomponent=queues,routing-type=%22anycast%22,queue=%22business_select_enrollment_qa_error%22/moveMessages(int,java.lang.String,java.lang.String,boolean)"
method: POST
HEADER_Content-Type: "application/json"
user: "P"
password: "P"
force_basic_auth: yes
status_code: 204
register: webpage
- debug:
var: webpage.stdout_lines
ignore_errors: yes
// Error
SSH password:
PLAY [all]
*********************************************************************12:18:19
TASK [Gathering Facts]
*********************************************************12:18:19
ok: [abc.net]
TASK [uri for dead letter queue]
***********************************************12:18:24
[DEPRECATION WARNING]: Supplying headers via HEADER_* is deprecated.
********lease use `headers` to supply headers for the request. This feature
will be removed in version 2.9. Deprecation warnings can be disabled by
setting
deprecation_warnings=False in ansible.cfg.
fatal: [abc.net]: FAILED! => {"access_control_allow_origin": "*",
"cache_control": "no-cache", "changed": false, "connection": "close",
"content":
"{\"error_type\":\"java.lang.IllegalArgumentException\",\"error\":\"java.lang.IllegalArgumentException
: Invalid JSON request
java.io.InputStreamReader@16b8f4da\",\"status\":400}", "content_type":
"text/plain;charset=utf-8", "cookies": {}, "date": "Mon, 20 Aug 2018
16:18:25 GMT", "expires": "Mon, 20 Aug 2018 15:18:25 GMT", "json":
{"error": "java.lang.IllegalArgumentException : Invalid JSON request
java.io.InputStreamReader@16b8f4da", "error_type":
"java.lang.IllegalArgumentException", "status": 400}, "msg": "Status code
was 200 and not [204]: OK (unknown bytes)", "pragma": "no-cache",
"redirected": false, "server": "Jetty(9.4.z-SNA********SHOT)", "status":
200, "url":
"http://abc.net:9161/console/jolokia/exec/org.apache.activemq.artemis:broker=%22BROKER1-MASTER%22,component=addresses,address=%22business_select_enrollment…
PLAY RECAP
*********************************************************************12:18:25
abc.net : ok=1 changed=0 unreachable=0 failed=1
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/5af16792-8cc3-4821-87a0-d2800ee8ec7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.