Bug 1332464 - jconsole failed to connect to service:jmx:http-remoting-jmx://localhost:8706/
Summary: jconsole failed to connect to service:jmx:http-remoting-jmx://localhost:8706/
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Infra
Version: 3.6.5.1
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.0.0-rc
: 4.0.0
Assignee: Ondra Machacek
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-03 09:22 UTC by Fabrice Bacchella
Modified: 2016-08-17 14:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-17 14:36:35 UTC
oVirt Team: Infra
Embargoed:
oourfali: ovirt-4.0.0?
rule-engine: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)

Description Fabrice Bacchella 2016-05-03 09:22:56 UTC
I tried to connect to the jmx interface. A custom jmx transport is needed, so I downloaded WildFly's latest version and launch the provided jconsole.sh. But the connection fails with the message in server.log:

2016-05-03 11:17:17,995 WARN  [org.jboss.remotingjmx.protocol.v2.ServerCommon] (pool-1-thread-1) Unexpected internal error: java.lang.NullPointerException
        at java.util.regex.Matcher.getTextLength(Matcher.java:1234) [rt.jar:1.7.0_101]
        at java.util.regex.Matcher.reset(Matcher.java:308) [rt.jar:1.7.0_101]
        at java.util.regex.Matcher.<init>(Matcher.java:228) [rt.jar:1.7.0_101]
        at java.util.regex.Pattern.matcher(Pattern.java:1088) [rt.jar:1.7.0_101]
        at org.jboss.as.jmx.BlockingNotificationMBeanServer.isInExposedModelControllerDomains(BlockingNotificationMBeanServer.java:319) [wildfly-jmx-8.2.1.Final.jar:8.2.1.Final]
        at org.jboss.as.jmx.BlockingNotificationMBeanServer.addNotificationListener(BlockingNotificationMBeanServer.java:183) [wildfly-jmx-8.2.1.Final.jar:8.2.1.Final]
        at org.jboss.remotingjmx.protocol.v2.ServerProxy$RemoteNotificationManager.addNotificationListener(ServerProxy.java:208)
        at org.jboss.remotingjmx.protocol.v2.ServerProxy$RemoteNotificationManager.access$3200(ServerProxy.java:201)
        at org.jboss.remotingjmx.protocol.v2.ServerProxy$AddNotificationListenerHandler.handle(ServerProxy.java:430)
        at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1$1.run(ServerCommon.java:153)
        at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:75) [wildfly-jmx-8.2.1.Final.jar:8.2.1.Final]
        at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:70) [wildfly-jmx-8.2.1.Final.jar:8.2.1.Final]
        at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_101]
        at javax.security.auth.Subject.doAs(Subject.java:415) [rt.jar:1.7.0_101]
        at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:94) [wildfly-controller-8.2.1.Final.jar:8.2.1.Final]
        at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor.handleEvent(ServerInterceptorFactory.java:70) [wildfly-jmx-8.2.1.Final.jar:8.2.1.Final]
        at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1.run(ServerCommon.java:149)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_101]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_101]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_101]

Comment 1 Fabrice Bacchella 2016-05-03 09:50:10 UTC
The provided /usr/share/ovirt-engine-wildfly/bin/jconsole.sh don't work either, but return no messages or log any where.
If I launch it as root, it can connect directly to the pid, but just generate a stack in console.log and then fails the connection.

Comment 2 Yaniv Lavi 2016-05-09 10:53:18 UTC
Moving to first RC, since things should not be targeted to second one at this point.

Comment 3 Martin Perina 2016-05-26 14:58:06 UTC
Ondro, could you please try to investigate status of using jconsole in WildFly 10 used in oVirt 4.0?

Comment 4 Ondra Machacek 2016-05-27 07:41:14 UTC
When connecting to PID, do you run jconsole as same user as user which owns the process you are trying to attach?

Comment 5 Ondra Machacek 2016-05-27 09:09:29 UTC
service:jmx:http-remoting-jmx://localhost:8706/ works fine for me with Wildfly10 and Java 8.

Comment 6 Fabrice Bacchella 2016-05-29 19:33:48 UTC
When you have a identity problem using jconsole with usual connectors, connection is simply denied. I don't get a full stack exception. But I will try again with latest 3.6.6

Comment 7 Fabrice Bacchella 2016-07-01 12:53:58 UTC
Ok, works for me on a 3.6.6 with an URL service:jmx:remote+http://host:port (http-remoting-jmx is deprecated) and a code with dependency in the pom.xml :

        <dependency>
            <groupId>org.jboss.remotingjmx</groupId>
            <artifactId>remoting-jmx</artifactId>
            <version>2.0.1.Final</version>
        </dependency>

Comment 8 Fabrice Bacchella 2016-07-01 14:02:07 UTC
More informations, If i connect with custom java code, from a remote workstation, that just does

    connection.getMBeanCount();

it succeeds.

It I connect from the same workstation, using jconsole with $JAVA_HOME/bin/jconsole -J-Djava.class.path=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/jconsole.jar:jmxcli.jar

I still get the same error stack.

The remote workstation is a mac os 10.11 and the jvm used is:

    $ echo $JAVA_HOME
    /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home

I have still not migrated to ovirt 4.0, I think I will wait 4.1.

Comment 9 Pavel Stehlik 2016-08-17 11:29:24 UTC
Closed due to capacity, if still reproduce, please reopen.


Note You need to log in before you can comment on or make changes to this bug.