<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re: JBM clients hangs when creating connections/sessions
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/danezu">Daniel Dumitrescu</a> in <i>JBoss Messaging</i> - <a href="https://community.jboss.org/message/726573#726573">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi Mathias </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The issue reappeared again this morning. Later investigations led me to the conclusion that the&#160; class which does the blocking seems to be the MessageSucker, when it tries to move messages between the nodes.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p> I have the following thread dump: </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>"Thread-28596" daemon prio=10 tid=0x00007f96e3736800 nid=0x3b1c in Object.wait() [0x0000000050c28000..0x0000000050c28ba0]</p><p>&#160;&#160; java.lang.Thread.State: WAITING (on object monitor)</p><p>&#160;&#160;&#160; at java.lang.Object.wait(Native Method)</p><p>&#160;&#160;&#160; at java.lang.Object.wait(Object.java:485)</p><p>&#160;&#160;&#160; at org.jboss.messaging.util.Future.getResult(Future.java:51)</p><p>&#160;&#160;&#160; - locked &lt;0x00007f982519ef50&gt; (a org.jboss.messaging.util.Future)</p><p>&#160;&#160;&#160; at org.jboss.jms.client.container.ClientConsumer.waitForOnMessageToComplete(ClientConsumer.java:779)</p><p>&#160;&#160;&#160; at org.jboss.jms.client.container.ClientConsumer.close(ClientConsumer.java:442)</p><p>&#160;&#160;&#160; at org.jboss.jms.client.container.ConsumerAspect.handleClosing(ConsumerAspect.java:150)</p><p>&#160;&#160;&#160; at org.jboss.aop.advice.org.jboss.jms.client.container.ConsumerAspect55.invoke(ConsumerAspect55.java)</p><p>&#160;&#160;&#160; at org.jboss.jms.client.delegate.ClientConsumerDelegate$closing_2473194355759371067.invokeNext(ClientConsumerDelegate$closing_2473194355759371067.java)</p><p>&#160;&#160;&#160; at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:92)</p><p>&#160;&#160;&#160; at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)</p><p>&#160;&#160;&#160; at org.jboss.jms.client.delegate.ClientConsumerDelegate$closing_2473194355759371067.invokeNext(ClientConsumerDelegate$closing_2473194355759371067.java)</p><p>&#160;&#160;&#160; at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)</p><p>&#160;&#160;&#160; at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)</p><p>&#160;&#160;&#160; at org.jboss.jms.client.delegate.ClientConsumerDelegate$closing_2473194355759371067.invokeNext(ClientConsumerDelegate$closing_2473194355759371067.java)</p><p>&#160;&#160;&#160; at org.jboss.jms.client.delegate.ClientConsumerDelegate.closing(ClientConsumerDelegate.java)</p><p>&#160;&#160;&#160; at org.jboss.messaging.core.impl.clusterconnection.MessageSucker.suspend(MessageSucker.java:217)</p><p>&#160;&#160;&#160; - locked &lt;<em>0x00007f972efdd2a8</em>&gt; (a org.jboss.messaging.core.impl.clusterconnection.MessageSucker)</p><p>&#160;&#160;&#160; at org.jboss.messaging.core.impl.clusterconnection.ClusterConnectionManager$ConnectionInfo.cleanupConnection(ClusterConnectionManager.java:804)</p><p>&#160;&#160;&#160; - locked &lt;<em>0x00007f972efdd988</em>&gt; (a org.jboss.messaging.core.impl.clusterconnection.ClusterConnectionManager$ConnectionInfo)</p><p>&#160;&#160;&#160; at org.jboss.messaging.core.impl.clusterconnection.ClusterConnectionManager$ConnectionInfo.onException(ClusterConnectionManager.java:785)</p><p>&#160;&#160;&#160; at org.jboss.jms.client.remoting.ConsolidatedRemotingConnectionListener.handleConnectionException(ConsolidatedRemotingConnectionListener.java:120)</p><p>&#160;&#160;&#160; at org.jboss.remoting.ConnectionValidator$1.run(ConnectionValidator.java:498)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>which it correlates to the following warn inside <strong>server.log</strong>:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>2012-03-27 00:47:24,258 WARN&#160; [org.jboss.messaging.core.impl.clusterconnection.ClusterConnectionManager] Connection failure detected. Clean up and retry connection. maxRetry: -1 retryInterval: 5000</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>It seems that the MessageSucker had problems to release the locks after a connection failure between nodes.... and from here a whole cascade of events triggered, because all the other connections that tried to access the targeted queue (which is clustered) are waiting for the instance of it to be released by MessageSucker.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Daniel</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/726573#726573">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Messaging at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>