Discussion:
[rabbitmq-discuss] rabbitmqadmin syntax for parameters
Prabodh Upreti
2014-01-27 18:27:07 UTC
Permalink
Hello

I am trying to run the following command on my centos box

./rabbitmqadmin declare queue name="xyz" durable=true
'arguments={"x-message-ttl":"86400000"}'

and keep getting

Argument "arguments" not recognised

I am running on 2.8.6

Is there a different way I need to pass the arguments? Java client api is
working fine.

thanks in advance.

regards




--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/rabbitmqadmin-syntax-for-parameters-tp32901.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
Simon MacMullen
2014-01-28 08:40:33 UTC
Permalink
Post by Prabodh Upreti
I am running on 2.8.6
Is there a different way I need to pass the arguments? Java client api is
working fine.
rabbitmqadmin didn't support passing arguments until 3.1.0.

You should be able to download the latest version of rabbitmqadmin from

http://hg.rabbitmq.com/rabbitmq-management/raw-file/stable/bin/rabbitmqadmin

which should still work with the 2.8.6 management plugin.

Cheers, Simon
Prabodh Upreti
2014-01-28 23:05:35 UTC
Permalink
I keep getting

*** Could not connect: [Errno 111] Connection refused

Could it be trying to connect to a different port. thx.



--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/rabbitmqadmin-syntax-for-parameters-tp32901p32924.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
Michael Klishin
2014-01-29 05:09:44 UTC
Permalink
2014-01-29 Prabodh Upreti <prabodh.upreti at vce.com>
Post by Prabodh Upreti
I keep getting
*** Could not connect: [Errno 111] Connection refused
Could it be trying to connect to a different port. thx.
Default management API port in 3.x is 15672, not 55672.

You can configure the port in ~/.rabbitmqadmin.conf:

[host_normal]
hostname = localhost
port = 15672
username = guest
password = guest
--
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140129/d3f0d82e/attachment.html>
Prabodh Upreti
2014-01-29 17:49:41 UTC
Permalink
Thank you.

I am trying that.

I am getting "connection reset by peer" and in the log I see

=INFO REPORT==== 29-Jan-2014::12:35:05 ===
accepting AMQP connection <0.7853.0> (x.x.x.x:35458 -> x.x.x.x:5672)

=ERROR REPORT==== 29-Jan-2014::12:35:05 ===
closing AMQP connection <0.7853.0> (x.x.x.x:35458 -> x.x.x.x:5672):
{bad_header,<<"GET /api">>}


Could I be missing somethig? thx.



--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/rabbitmqadmin-syntax-for-parameters-tp32901p32951.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
Michael Klishin
2014-01-29 18:41:52 UTC
Permalink
2014-01-29 Prabodh Upreti <prabodh.upreti at vce.com>
Post by Prabodh Upreti
=ERROR REPORT==== 29-Jan-2014::12:35:05 ===
{bad_header,<<"GET /api">>}
Could I be missing somethig? thx.
You point rabbitmqadmin at AMQP port, while it uses HTTP API.
--
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140129/df393dd5/attachment.html>
Prabodh Upreti
2014-01-29 19:35:24 UTC
Permalink
Thank you. that was it. Now I am able to run the rabbitmqadmin for other
commands except

rabbitmqadmin -c rabbitmqadmin.conf -N host_normal declare queue name="AAA"
durable=true 'arguments={"x-message-ttl":"86400000"}'

I keep getting

ERROR: Argument "arguments" not recognised

is there something wrong with that syntax. thx.





--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/rabbitmqadmin-syntax-for-parameters-tp32901p32953.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
Prabodh Upreti
2014-01-29 20:39:29 UTC
Permalink
now I am getting

*** 406 PRECONDITION_FAILED - invalid arg 'x-message-ttl' for queue 'AAA' in
vhost '/': {unacceptable_type,longstr}


thx.



--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/rabbitmqadmin-syntax-for-parameters-tp32901p32954.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
Simon MacMullen
2014-01-29 21:00:24 UTC
Permalink
Post by Prabodh Upreti
rabbitmqadmin -c rabbitmqadmin.conf -N host_normal declare queue name="AAA"
durable=true 'arguments={"x-message-ttl":"86400000"}'
*** 406 PRECONDITION_FAILED - invalid arg 'x-message-ttl' for queue 'AAA' in
vhost '/': {unacceptable_type,longstr}
You want

$ rabbitmqadmin -c rabbitmqadmin.conf -N host_normal declare queue
name="AAA" durable=true 'arguments={"x-message-ttl":86400000}'

since 86400000 is not a string.

Cheers, Simon

Loading...