<font face="arial" size="2"><p style="margin:0;padding:0;font-family: arial; font-size: 10pt;">Thanks Maze,</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt;">We have tracked it down to a wait() while declaring an exchange that never completes...</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt;">com.rabbitmq.client.impl.AMQChannel</p>
<p style="margin:0;padding:0;">
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;">private AMQCommand privateRpc(Method m)</span></p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;"> throws IOException, ShutdownSignalException</span></p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;"> {</span></p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;"> SimpleBlockingRpcContinuation k = new SimpleBlockingRpcContinuation();</span></p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;"> rpc(m, k);</span></p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;"> // At this point, the request method has been sent, and we</span></p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;"> // should wait for the reply to arrive.</span></p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;"> //</span></p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;"> // Calling getReply() on the continuation puts us to sleep</span></p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;"> // until the connection's reader-thread throws the reply over</span></p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;"> // the fence.</span></p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;"> return k.getReply();</span></p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;"> }</span></p>
<p style="margin:0;padding:0;"> </p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;">This k.getReply(); jumps through a number of basically empty methods and eventually terminates with another endless wait() that (only on 3G and intermittently) never fulfills. The exchange gets declared but the return is "lost"..</span></p>
<p style="margin:0;padding:0;"> </p>
<p style="margin:0;padding:0;">We are looking at modifying the client .jar to call a wait with a timeout... I'll keep you updated</p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;"><br /></span></p>
</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt;">-----Original Message-----<br />From: "Matthias Reik" <matthias.reik@gmail.com><br />Sent: Friday, August 24, 2012 11:34am<br />To: "Discussions about RabbitMQ" <rabbitmq-discuss@lists.rabbitmq.com><br />Subject: Re: [rabbitmq-discuss] Intermittent Problem - 2.8.5 java client hangs on declare exchange<br /><br /></p>
<div id="SafeStyles1345831662" style="font-family: arial; font-size: 10pt;">
<p style="margin:0;padding:0;">We had a similar issue (I think we where running 2.6.1 or so)... the exchange/queue declare did eventually happen (after quite a long time).<br />The same code run just fine on another computer (so we suspected that it was unrelated to RabbitMQ. After having investigated the issue<br /> for quite a while it turned out to be due to the IPv6 stack timing out (the routing was set up the wrong way.<br /><br />Just mentioning it, because it might be a similar issue...<br /><br />Cheers<br />Maze<br /><br /></p>
<div class="gmail_quote">On Fri, Aug 24, 2012 at 4:55 PM, Matthias Radestock <span dir="ltr"><<a href="mailto:matthias@rabbitmq.com" target="_blank">matthias@rabbitmq.com</a>></span> wrote:<br />
<blockquote class="gmail_quote" style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;">Matthew,
<div class="im"><br /><br /> On 24/08/12 15:44, <a href="mailto:m.luchak@smartasking.com" target="_blank">m.luchak@smartasking.com</a> wrote:<br />
<blockquote class="gmail_quote" style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;">what in theory would happen if the server closed the AMQP<br /> connection {inet_error,etimedout} and the client was connecting? In<br /> theory would this cause the client to hang?<br /></blockquote>
</div>
It shouldn't, i.e. the client should see the socket close. etimedout is the kind of error that is indicative of network problems though, and in some cases these can take quite a while to be noticed by the parties. Configuring the clients to enable AMQP heartbeats is one way of addressing that problem.<br /><br /> Regards,<br /><br /> Matthias.
<div class="HOEnZb">
<div class="h5"><br /> ______________________________<span style="text-decoration: underline;"> </span>_________________<br /> rabbitmq-discuss mailing list<br /><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<span style="text-decoration: underline;"> </span>rabbitmq.com</a><br /><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a></div>
</div>
</blockquote>
</div>
</div></font>