【问题标题】:RabbitMQ API Queue-Size Call: Bad ResponseRabbitMQ API 队列大小调用:错误响应
【发布时间】:2017-02-16 20:35:38
【问题描述】:

当我使用curl 进行远程调用以使用以下命令获取 RabbitMQ 服务器上的队列大小时:

curl -s -i -u guest:guest http://host:port/api/queues/%2f/queue_name

我找回了AMQP的短信,就这样。

当我运行带有详细标志的 curl 命令时,除了AMQP 文本之外,我还得到:

* additional stuff not fine transfer.c:1037: 0 0 * Increasing bytecount by 8 from hbuflen * SSLv3, TLS alert, Client hello (1): * nread <= 0, server closed connection, bailing * Connection #0 to host rabbitmq-stage left intact AMQP * Closing connection #0 * SSLv3, TLS alert, Client hello (1):

知道为什么响应不是预期的(即包含队列大小的 JSON 字符串)吗?

谢谢!

【问题讨论】:

    标签: curl rabbitmq


    【解决方案1】:

    你使用了错误的端口:

    ➜ sbin curl -u guest:guest http://localhost:5672/api/queues/%2f/myqueue AMQP %

    尝试使用15672 而不是5672,这样:

    curl -u guest:guest http://localhost:15672/api/queues/%2f/myqueue

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-05
      • 2019-05-28
      相关资源
      最近更新 更多