client unexpectedly closed TCP connection

12,631 views
Skip to first unread message

aoz...@gomedya.com

unread,
Dec 20, 2016, 12:45:38 PM12/20/16
to rabbitmq-users
sounds selfish but my rabbit problem continues. problem seems to be as follows. I insert data into fan out exchange. at a certain time every day insert rate goes from 300/sec to 20000/sec in a second and I start losing data on a non durable non persistent environment. I see the following in rabbit logs for each listening queue. After about 10-20 seconds, data flow resumes by itself, with all data lost during the peak period. My question is how can I “prepare” rabbit for this kind of spike. What would cause “client unexpectedly closed TCP connection” and how can I stop it happening in my case? Thanks.

=WARNING REPORT==== 19-Dec-2016::06:59:01 ===
closing AMQP connection <0.23017.0> (172.17.0.1:34216 -> 172.17.0.2:5672):
client unexpectedly closed TCP connection

Michael Klishin

unread,
Dec 20, 2016, 12:51:11 PM12/20/16
to rabbitm...@googlegroups.com, aoz...@gomedya.com
The message says that a client (or intermediary) closed TCP connection without
closing AMQP 0-9-1 connection. That’s as much as we know.

It can be attributed to application bugs (unhandled exceptions that lead to connection closure),
client library bugs, network configuration issues, and so on.

Clients must not assume that publishers are handled as soon as they are sent, even with TCP.
Use publisher confirms: http://www.rabbitmq.com/confirms.html and add more logging and error
handling around publishes in your code and possibly in your client library.

Capturing a Wireshark/tcpdump dump (https://www.rabbitmq.com/amqp-wireshark.html) can
provide a lot of additional information.
> --
> 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-user...@googlegroups.com.
> To post to this group, send an email to rabbitm...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
MK

Staff Software Engineer, Pivotal/RabbitMQ


vinod hy

unread,
Jul 12, 2017, 5:46:21 AM7/12/17
to rabbitmq-users, aoz...@gomedya.com
Even i am facing the issue.

"rabbitmq client unexpectedly closed TCP connection" 

I see the trace in the rabbitmq logs when i start the rabbitmq service.

rabbitmq-service.bat start

Please help me on what is the issue here

Michael Klishin

unread,
Jul 12, 2017, 5:56:14 AM7/12/17
to rabbitm...@googlegroups.com
There is no single reason for clients closing TCP connection
without closing AMQP 0-9-1 connection first.

Sometimes it indicates a client termination (intended or unexpected),
sometimes it's a proxy/load balancer timeout that closes TCP connection,
or a genuine TCP connectivity loss.

Take a traffic capture if you can reproduce the issue in your environment (https://www.rabbitmq.com/amqp-wireshark.html), it will provide a lot of useful information.

http://www.rabbitmq.com/heartbeats.html explains how heartbeats can act as a workaround problem with proxy
and load balancer timeouts.


--
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.
Reply all
Reply to author
Forward
0 new messages