JMX client hangs when closing connection to unresponsive server
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)
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.