[rabbitmq-discuss] 答复: [SOS] About MQ server connection reset issues

Tim Watson tim at rabbitmq.com
Tue Mar 26 12:15:11 GMT 2013


Hi

On 26 Mar 2013, at 11:37, Li, Chenglin wrote:
> We found this is a network issue, if network is stable, all is fine. But in
> user's environment, we can not make sure network is stable, in this case,
> how to handle? Try another times, or other? 
> 

Depends what behaviour you want. If you use AMQP heartbeats then the connections won't appear idle to intermediate network infrastructure (such as load balancers and firewalls). You'll need to handle reconnection manually (unless you have a framework that helps with this - spring might be of some use here). Consumers can delay issuing ACKs until they've fully processed messages if that helps.

Cheers,
Tim

> 
> Thanks,
> Jack
> 
> 
> -----邮件原件-----
> 发件人: rabbitmq-discuss-bounces at lists.rabbitmq.com
> [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] 代表 Tim Watson
> 发送时间: 2013年3月25日 23:05
> 收件人: Discussions about RabbitMQ
> 主题: Re: [rabbitmq-discuss] [SOS] About MQ server connection reset issues
> 
> Hi,
> 
> On 25 Mar 2013, at 14:28, Li, Chenglin wrote:
>> We use rabbitmq as message delivery channel to mobile client. And in our
> DEV environment, all works fine, but in our QA environment, we deploy LVS as
> load balance and cluster, and after server run for some time(about 2-3
> hours), the server will throw below error log, can someone give us some
> ideas for this issue? Thanks in advance.
>> 
> 
> Looking at this - "the server will throw below error log" is incorrect. That
> error log comes from the client, not the server.
> 
>> com.rabbitmq.client.ShutdownSignalException: connection error; reason: 
>> java.net.SocketException: Connection reset
> 
> ... and the cause is pretty clear. The connection has been closed. Could
> this be a network disruption perhaps? Does your load balancer by any chance
> have some threshold after which connections it deems to be 'idle' are
> bounced or something like that?
> 
> 
> Cheers,
> Tim
> 
>>         at
> com.rabbitmq.client.QueueingConsumer.handle(QueueingConsumer.java:198)
>>         at
> com.rabbitmq.client.QueueingConsumer.nextDelivery(QueueingConsumer.java:214)
>>         at
> com.gnet.ms.util.thread.task.impl.ActionExchangeTask.execute(ActionExchangeT
> ask.java:65)
>>         at com.gnet.ms.util.thread.WorkThread.run(WorkThread.java:43)
>> Caused by: java.net.SocketException: Connection reset
>>         at java.net.SocketInputStream.read(SocketInputStream.java:185)
>>         at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
>>         at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
>>         at
> java.io.DataInputStream.readUnsignedByte(DataInputStream.java:288)
>>         at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:95)
>>         at
> com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.jav
> a:131)
>>         at 
>> com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java
>> :501) 
>> /*********************************************************************
>> ************/
>> 
>> 
>> Thanks,
>> Jack
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> 
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> 
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



More information about the rabbitmq-discuss mailing list