JMX client hangs when closing connection to unresponsive server

Solution Unverified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Issue

When Standalone JMX Clinet try to close a connection to server, the close operation may be stuck with the unresponsive server or network issue.
Then the following stacktrace can be seen in client thread dump.

"main" #1 prio=5 os_prio=0 tid=0x00007fad0c009000 nid=0xec2 in Object.wait() [0x00007fad13260000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x0000000770a862b8> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:502)
	at org.jboss.remoting3.spi.AbstractHandleableCloseable.close(AbstractHandleableCloseable.java:177)
	- locked <0x0000000770a862b8> (a java.lang.Object)
	at org.jboss.remotingjmx.RemotingConnector.safeClose(RemotingConnector.java:310)
	at org.jboss.remotingjmx.RemotingConnector.close(RemotingConnector.java:293)
	at com.example.Client.main(App.java:35)

Resolution

  • Run your client application with $JBOSS_HOME/bin/client/jboss-client.jar bundled EAP 6.4.17 (which incorporates the newer version of remoting3 3.3.10.Final).

  • If using maven to run your client application runtime, specify the bom version EAP 6.4.17.GA. For example:

    <dependencyManagement>
      <dependencies>
        ...
        <dependency>
          <groupId>org.jboss.bom</groupId>
          <artifactId>eap6-supported-artifacts</artifactId>
          <version>6.4.17.GA</version>
          <type>pom</type>
          <scope>import</scope>
        </dependency>
        ...
      </dependencies>
    </dependencyManagement>
    

    Please refer to the section "2.3. USE THE MAVEN REPOSITORY" (specifically "2.3.5. Manage Project Dependencies") in This content is not included.EAP 6.4 Develpment Guide for details about using the maven repository.

Root Cause

  • The AbstractHandleableCloseable#close will keep to wait for a event from a unresponsive socket for a long time. If an eof event from the socket, the client will be finished.

  • This issue was resolved as This content is not included.BZ-1454564. EAP 6.4.17 is including this fix.

Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.