dynamic shovels fail in Rabbitmq - rabbitmq

I am trying to create dynamic shovels in my RabbitMQ instance both via code and using the UI. In both the cases, I am able to create the shovel. However , it's failing later on and is not able to move messages as desired.
Via Postman
PUT -- http://rabbitinstance011:15672/api/parameters/shovel/dev_test/test01
{"value": {"src-protocol": "amqp091", "src-uri": "amqp://naxi#example.com#/dev_test",
"src-queue": "dlq1", "dest-protocol": "amqp091",
"dest-uri": "amqp://naxi#example.com#/dev_test",
"dest-queue": "q1", "src-delete-after": "queue-length"}}
Response : 201
On the UI -> admin -> Shovel Status
{failed_to_connect_using_provided_uris,
[{rabbit_amqp091_shovel,make_conn_and_chan,2,
[{file,"src/rabbit_amqp091_shovel.erl"},{line,324}]},
{rabbit_amqp091_shovel,connect_source,1,
[{file,"src/rabbit_amqp091_shovel.erl"},{line,78}]},
{rabbit_shovel_worker,handle_cast,2,
[{file,"src/rabbit_shovel_worker.erl"},{line,64}]},
{gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1050}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}
I receive the same errors when I try to do all of this using code as well as from the UI instead of postman.
Not sure where I am going wrong.

It was very simple. Had to create a new user without '#' in the username.

Related

Update secret parameter in Jenkins Job

I have a lot of free-style jobs in my Jenkins instance. I create them with Jenkins API (generate XML-file with configuration and post them by "http://my-jenkins-instance:8080/createItem?name=JobName").
There is one problem - I can not generate value in secret fields. For example, I want such a config:
Inject passwords to the build as environment variables -> Job passwords.
And I need to set 123 to Password field.
I can not do this through XML because it appears decoded in XML. Something like this: {AQAAABAAAANwHq0hsSF6...}
I want to set the value to this parameter
So my questions are:
Can I get the decoded value of a plain password through some API? So I could send 123 and get {AQAAABAAAANwHq0hsSF6...} back.
If not, can I set secret value some other way? I can only think of using Selenium but it is too slow (comparing to API).
I have found the solution.
I can set the value as a plain text: <value>123</value>, create or update a job. Then I need to disable and enable the job.

Sony Soundbar HT-ZF9 API setActiveTerminal showing Error 12 ; other APi's are working

I want to control the soundbar by LAN.
I can turn on and off the soundbar with postman and the given Sony Api's.
When i Want to change the input, in Postman appears error 12.
I don't understand why, because other API's like getInformation are working fine. (network, url, port, connection, and library should be also ok)
From the Api getInformation, I could read the information with the name of the inputs.
But then I paste them to setActiveTerminal, Error 12 occurs.
Does anyone know, where is the problem??
Here, the used code:
http://169.254.75.11:10000/sony/avContent
{
"method":"setActiveTerminal",
"id":55,
"params":[
{
"active": "active",
"uri": "extInput:hdmi?port=1"
}
],
"version":"1.0"
}
The setActiveTerminal is for activating or deactivating output ports extOutput or "zone" that it is called on the STR-DN1080. Since the ZF9 don't have multi zone capabilities the use of this method is very limited.
I'm guessing you want to set the input port and that is done via setPlayContent (with out the output parameter in the json for ZF9) see
Sony Audio Control API - Can't Change Input on AV Receiver for more info.

How to get Error Message from previous connector Logic App

Is it possible to get and insert the previous connector's error message in a connector that gets triggered on failed after, to log the error message?
I did a seach and tested something like: #{body('XML_Validation')['message']}.
If so, is it also possible to get the Error code for the failed connector?
-----UPDATE-----
Ok so the previous test of #{body('XML_Validation')['message']} works on some connectors but not XML-Validation.
Is it still possible to extract the error message / exception somehow?
this is what i watch to get as a message to implement in another logic app:
Every action following the trigger-event can run under specific conditions. Defined like this in the code view:
"runAfter": {
"PreviousAction": [
"Succeeded"
]
}
You could set the "runAfter" to run on "Failed" and capture the message this way.
Have a look at: https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-exception-handling
Building on Steven's comment from the accepted answer, in my case I used the following:
#actions('Add_registrant_to_GoToWebinar')['outputs']['statusCode']
It allows to get the statusCode from the raw output of the connector, because this connector does not expose it.

How can I get the status of a rabbitmq-shovel by the http api

Using "rabbitmqctl eval 'rabbit_shovel_status:status().'" I can get the shovels status in my rabbitmq server.
I activated the modules 'rabbitmq_shovel' and 'rabbitmq_shovel_management'.
I created some dynamic shovels with the HTTP API, the problem I have is that, I want to be able to GET the status of the shovels using the HTTP API, but I can't find a way to do that.
Is there any way to do this using the HTTP API? Or should I use 'rabbitmqctl eval ...'?
I don't want to use the rabbitmqctl, as I want to expose this data in my own API, so my application should be able to access it, without having to make an 'exec'.
Yes you can using:
http://localhost:15672/api/shovels
you have to install:
rabbitmq_shovel_management
The result is a json like:
[
{
"node":"rabbit#gabrieleMacBook",
"timestamp":"2015-06-02 15:34:27",
"name":"test",
"vhost":"/",
"type":"dynamic",
"state":"running",
"definition":{
"src-queue":"test",
"dest-queue":"test2"
},
"src_uri":"amqp://xxxxxxx",
"dest_uri":"amqp://xxxxxxx"
}
]
If you are using C#, you can use HareDu like this:
var result = await _services.GetService<IBrokerObjectFactory>()
.GetAllShovels();
https://github.com/ahives/HareDu2/blob/master/docs/shovel-get.md

Flurry Event API not returning event parameter values

I have been trying to use the EventMerics API to return detailed event parameter data.
I have setup a test application and have uploaded event data with parameters, I can see the data in the web interface.
However the API doesn't seem to return the parameter data as stated by the documentation.
The following call
http://api.flurry.com/eventMetrics/Event?apiAccessCode=xxx&apiKey=xxx&startDate=2012-08-27&endDate=2012-08-27&eventName=heatmap%20-%20iPhone-Title-all
returns:
<eventMetrics type="Event" startDate="2012-08-27" eventName="heatmap - iPhone-Title-all" endDate="2012-08-27" version="1.0" generatedDate="8/27/12 10:45 PM">
<day uniqueUsers="2" totalSessions="12" totalCount="14" date="2012-08-27"/>
<parameters/>
</eventMetrics>
....
The parameters section is empty, I am expecting the following parameter values:
{touchXY : 299,465,2012-08-27 16:40:15 +0100}
{touchXY : 301,461,2012-08-27 16:29:03 +0100}
{touchXY : 192,312,2012-08-27 16:22:54 +0100}
{touchXY : 254,461,2012-08-27 16:23:04 +0100}
Has anyone got parameter values to return via the Flurry REST API?
the API call used by you is correct. I would recommend you to write to support#flurry.com to investigate why this is not happening.
(Disclaimer: I work in the Support team at Flurry)
The event name in the request is case sensitive so you should check the way it's written on the site. I changed mine from "editor" to "Editor" and the problem resolved.