[rabbitmq-discuss] Re : Re: Re : Re: Connection closed after 10 minutes. Cause : end-of-stream
Renaud
rmartele at gmail.com
Mon Aug 8 11:02:57 BST 2011
Thx for the help,
So : yes the two computers ping well each other.
The traceback is here :
RabbitMQ.Client.Exceptions.AlreadyClosedException: The AMQP operation was
interrupted: AMQP close-reason, initiated by Library, code=0, text="End of
stream", classId=0, methodId=0, cause=System.IO.EndOfStreamException: Unable
to read beyond the end of the stream.
at RabbitMQ.Client.Impl.Frame.ReadFrom(NetworkBinaryReader reader)
at RabbitMQ.Client.Impl.SocketFrameHandler_0_9.ReadFrame()
at RabbitMQ.Client.Impl.ConnectionBase.MainLoopIteration()
at RabbitMQ.Client.Impl.ConnectionBase.MainLoop()
at RabbitMQ.Client.Impl.SessionBase.Transmit(Command cmd)
at RabbitMQ.Client.Impl.ModelBase.ModelSend(MethodBase method,
ContentHeaderBase header, Byte[] body)
at RabbitMQ.Client.Framing.Impl.v0_9_1.Model._Private_BasicPublish(String
exchange, String routingKey, Boolean mandatory, Boolean immediate,
IBasicProperties basicProperties, Byte[] body)
at RabbitMQ.Client.Impl.ModelBase.BasicPublish(String exchange, String
routingKey, Boolean mandatory, Boolean immediate, IBasicProperties
basicProperties, Byte[] body)
at RabbitMQ.Client.Impl.ModelBase.BasicPublish(String exchange, String
routingKey, IBasicProperties basicProperties, Byte[] body)
at testDB.RMQ_Agent.sendData(String data, String routingKey,
IBasicProperties props)
Unhandled Exception: System.IO.EndOfStreamException: SharedQueue closed
at RabbitMQ.Util.SharedQueue.Dequeue()
at testDB.RMQ_Agent.receiveData()
at testDB.RMQ_Agent.waitForData()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
And the RabbitMQ server logs are here :
----
***Reset of rabbitmq server, on Computer B***
INFO REPORT==== 29-Jul-2011::11:30:10 ===
Limiting to approx 924 file handles (829 sockets)
INFO REPORT==== 29-Jul-2011::11:30:10 ===
Memory limit set to 2997MB.
INFO REPORT==== 29-Jul-2011::11:30:10 ===
msg_store_transient: using rabbit_msg_store_ets_index to provide index
INFO REPORT==== 29-Jul-2011::11:30:10 ===
started TCP Listener on [::]:5672
INFO REPORT==== 29-Jul-2011::11:30:10 ===
msg_store_persistent: using rabbit_msg_store_ets_index to provide index
----
***Connection of Java client, Computer B***
INFO REPORT==== 29-Jul-2011::11:36:29 ===
accepted TCP connection on [::]:5672 from XXX.XXX.XXX.XXX:51886
INFO REPORT==== 29-Jul-2011::11:36:29 ===
starting TCP connection <0.730.0> from XXX.XXX.XXX.XXX:51886
***Connection of .NET client, Computer A***
INFO REPORT==== 29-Jul-2011::11:36:34 ===
accepted TCP connection on [::]:5672 from YYY.YYY.YYY.YYY:44352
INFO REPORT==== 29-Jul-2011::11:36:34 ===
starting TCP connection <0.746.0> from YYY.YYY.YYY.YYY:44352
***Connection of Java client, Computer C***
INFO REPORT==== 29-Jul-2011::11:36:54 ===
accepted TCP connection on [::]:5672 from ZZZ.ZZZ.ZZZ.ZZZ:39899
INFO REPORT==== 29-Jul-2011::11:36:54 ===
starting TCP connection <0.781.0> from ZZZ.ZZZ.ZZZ.ZZZ:39899
----
***Connection closure of .NET client, Computer A***
WARNING REPORT==== 29-Jul-2011::11:45:24 ===
exception on TCP connection <0.746.0> from YYY.YYY.YYY.YYY:44352
connection_closed_abruptly
INFO REPORT==== 29-Jul-2011::11:45:24 ===
closing TCP connection <0.746.0> from YYY.YYY.YYY.YYY:44352
----
And about the TCP/IP settings, I didn't modify them. These are default
settings.
Recently, I made more tests and results are... strange :
I tried different .NET clients with different charges (1msg/sec, 10msg/sec,
20msg/sec). The connection seems to fail every time but not after 10
minutes. It closed after 8m30, 17m, ... I also tried with 1msg/2sec and it's
running since more then 50 minutes now...
I looked for some limitations of VirtualBox, about TCP connections but it
seems there are not.
About the heartbeat, if I understand well, it's a solution to detect
connection failure, so it would be a good idea if the problem was, actually,
a non stable network/connection. But if that's not the case, is it still
useful?
By the way, here is the code of my .NET client, just the connection part :
//factory is a ConnectionFactory
factory.Protocol = Protocols.FromEnvironment();
factory.HostName = hostName;//variable with IP address of my
RabbitMQ server
factory.VirtualHost = virtualHost;//the string "/"
factory.Port = port;//5672
factory.UserName = userName;//random string "userName"
factory.Password = password;//random string "password"
try
{
conn = factory.CreateConnection();//conn is a IConnection
ch = conn.CreateModel();//ch is a IModel
...
}
After that, I just do some "ch.basicPublish(...)" and "ch.basicConsume(...)"
and it works fine during several minutes...
Someone can see some logic in that?
Thanks for your time, and for any help,
Renaud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110808/c2160ac0/attachment.htm>
More information about the rabbitmq-discuss
mailing list