[jboss-jira] [JBoss JIRA] (REMJMX-52) Background org.xnio.nio.WorkerThread prevents JVM shutdown (using jboss-client.jar for remote JMX access)
Taras Tielkes (JIRA)
jira-events at lists.jboss.org
Wed Aug 22 05:40:14 EDT 2012
[ https://issues.jboss.org/browse/REMJMX-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712936#comment-12712936 ]
Taras Tielkes commented on REMJMX-52:
-------------------------------------
Hi Stuart, I just noticed issue REMJMX-34, which sounds quite similar.
However, that one has been marked as fixed for 1.0.2 (which I assume related to the org.jboss.remotingjmx:remoting-jmx artifact). However, the jboss-client.jar in JBoss 7.1.1.Final already comes with that version packaged in.
However, at the end of yesterday I fetched a nightly build from [https://community.jboss.org/thread/167590], and took the jboss-client.jar from that one (which seems to contain org.jboss.remotingjmx:remoting-jmx version 1.0.4.Final). This seemed to resolve the issue I was observing.
So now I'm a bit confused. _Is_ this a different issue than REMJMX-34? If so, what's the actual problem and fix?
Also, is there a way to obtain a nightly build of 1.0.5.CR1?
> Background org.xnio.nio.WorkerThread prevents JVM shutdown (using jboss-client.jar for remote JMX access)
> ---------------------------------------------------------------------------------------------------------
>
> Key: REMJMX-52
> URL: https://issues.jboss.org/browse/REMJMX-52
> Project: Remoting JMX
> Issue Type: Bug
> Environment: Windows XP x64, using Java 7
> Linux x64, using Java 7
> Reporter: Taras Tielkes
> Assignee: Stuart Douglas
> Fix For: 1.0.5.CR1
>
> Attachments: jboss-client-xnio-hanging-stackdump-linux.txt, jboss-client-xnio-hanging-stackdump.txt
>
>
> I'm using the "jboss-client.jar" provided in the "bin/client" directory of the 7.1.1.Final distribution.
> I'm using the code shown below to connect to various JBoss 7.1.1 instances.
> This works when the machines are reachable.
> However, when they are not, the underlying "xnio" libraries do not clean up properly.
> Observed results: client JVM running my JMX code does not exit, since the background threads from xnio are non-deamon.
> I've attached stackdumps from both Windows and Linux x64 demonstrating the problem.
> Here's a link to a report from Red Hat engineer Rob Stryker on the "jboss-as7-dev" mailing list, essentially confirming the problems I report with such a trivial, minimal JMX client.
> [http://lists.jboss.org/pipermail/jboss-as7-dev/2012-March/005679.html]
> ----------------------------------------------
> {code}import java.io.IOException;
> import java.net.MalformedURLException;
> import java.util.HashMap;
> import javax.management.MBeanServerConnection;
> import javax.management.remote.JMXConnector;
> import javax.management.remote.JMXConnectorFactory;
> import javax.management.remote.JMXServiceURL;
> public class Demo {
> public static void main(String[] args) throws IOException {
> JMXConnector jmxConnector = null;
> String host = "some.unreachable.host";
> String port = "9999";
> String urlString = "service:jmx:remoting-jmx://" + host + ":" + port;
> try {
> JMXServiceURL serviceURL = new JMXServiceURL(urlString);
> HashMap<String, String[]> env = new HashMap<String, String[]>();
> String[] creds = new String[2];
> creds[0] = "username";
> creds[1] = "password";
> env.put(JMXConnector.CREDENTIALS, creds);
> jmxConnector = JMXConnectorFactory.connect(serviceURL, env);
> MBeanServerConnection connection = jmxConnector.getMBeanServerConnection();
> System.out.println("Successfully Got Connection " + connection.getMBeanCount());
> jmxConnector.close();
> } catch (MalformedURLException e) {
> e.printStackTrace();
> } catch (IOException e) {
> e.printStackTrace();
> } finally {
> if (jmxConnector != null) {
> jmxConnector.close();
> }
> }
> System.exit(0);
> }
> }{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list