Get some error when publish message to another server

341 views
Skip to first unread message

wait.lin...@gmail.com

unread,
Dec 22, 2017, 10:19:57 PM12/22/17
to rabbitmq-users
I install the rabbitmq-server in two server and I publish message to the another one. But when I use the 'rabbitmqadmin publish' to publish message, I get some error one the shell like that 

Traceback (most recent call last):

  File "/usr/local/bin/rabbitmqadmin", line 1063, in <module>

    main()

  File "/usr/local/bin/rabbitmqadmin", line 447, in main

    method()

  File "/usr/local/bin/rabbitmqadmin", line 592, in invoke_publish

    resp = json.loads(self.post(uri, json.dumps(upload)))

  File "/usr/local/bin/rabbitmqadmin", line 483, in post

    return self.http("POST", "%s/api%s" % (self.options.path_prefix, path), body)

  File "/usr/local/bin/rabbitmqadmin", line 539, in http

    resp = conn.getresponse()

  File "/usr/lib/python2.7/httplib.py", line 1136, in getresponse

    response.begin()

  File "/usr/lib/python2.7/httplib.py", line 453, in begin

    version, status, reason = self._read_status()

  File "/usr/lib/python2.7/httplib.py", line 409, in _read_status

    line = self.fp.readline(_MAXLINE + 1)

  File "/usr/lib/python2.7/socket.py", line 480, in readline

    data = self._sock.recv(self._rbufsize)

socket.error: [Errno 104] Connection reset by peer


And the another(receive) server rabbitmq log 

=ERROR REPORT==== 23-Dec-2017::10:57:25 ===

closing AMQP connection <0.16324.0> (47.52.247.55:52670 -> 172.16.211.154:5672):

{bad_header,<<"POST /ap">>}


I want to know what happen with this and how to solve it. Thanks a lot.

Luke Bakken

unread,
Dec 23, 2017, 3:15:41 PM12/23/17
to rabbitmq-users
Hello,

When reporting an issue with a command, please always provide the full command that you are running. In addition, it's always helpful to know what version of RabbitMQ, Erlang, and operating system you are using.

Can you please provide the rabbitmqadmin command you executed? I suspect that the URL specified is using the AMQP port (5672) instead of the HTTP API one (15672)

Thanks,
Luke


On Friday, December 22, 2017 at 7:19:57 PM UTC-8, wait.lin...@gmail.com wrote:
I install the rabbitmq-server in two server and I publish message to the another one. But when I use the 'rabbitmqadmin publish' to publish message, I get some error one the shell like that

wait.lin...@gmail.com

unread,
Dec 25, 2017, 9:56:54 PM12/25/17
to rabbitmq-users
Thanks for require me. I not assign the port and it work now. I think that use the default port not need the '--port=5672'. My system is Ubuntu 16.04, the erlang version is 20.2 and the rabbitmq-server version is 3.7.2.

在 2017年12月24日星期日 UTC+8上午4:15:41,Luke Bakken写道:

Michael Klishin

unread,
Dec 26, 2017, 10:20:48 AM12/26/17
to rabbitm...@googlegroups.com
rabbitmqadmin uses default HTTP API port, 15672, by default [1].

1. https://github.com/rabbitmq/rabbitmq-management/blob/v3.6.x/bin/rabbitmqadmin#L263

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ
Reply all
Reply to author
Forward
0 new messages