jmxterm icon indicating copy to clipboard operation
jmxterm copied to clipboard

Unsupported protocol remote+http and http-remoting-jmx

Open wong604 opened this issue 6 years ago • 10 comments

open service:jmx:remote+http://127.0.0.1:9990 gives: #RuntimeIOException: Runtime IO exception: Unsupported protocol: remote+http same with open service:jmx:http-remoting-jmx://127.0.0.1:9990 which gives: #RuntimeIOException: Runtime IO exception: Unsupported protocol: http-remoting-jmx

added jboss-client.jar to the classpath but no help. Without this, jmxterm cannot manage wildfly java environment.

wong604 avatar Aug 11 '17 17:08 wong604

I have the same issue.

vzabawski avatar Aug 22 '17 14:08 vzabawski

I found that with something like

java -cp .:/opt/wildfly-10.1.0/bin/client/jboss-client.jar:jmxterm-1.0.0-uber.jar  org.codehaus.classworlds.uberjar.boot.Bootstrapper --url service:jmx:remoting-jmx://localhost:9990

it starts to connect. But then it hangs after some message lines until a timeout occurs

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Dec 07, 2017 3:31:18 PM org.xnio.Xnio <clinit>
INFO: XNIO version 3.4.0.Final
Dec 07, 2017 3:31:18 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.4.0.Final
Dec 07, 2017 3:31:18 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 4.0.21.Final
Dec 07, 2017 3:31:18 PM org.jboss.remotingjmx.Util warnDeprecated
WARN: The protocol 'remoting-jmx' is deprecated, instead you should use 'remote'.
********* PAUSED ***************
---------------------------------------------------
constituent[0]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/jmxterm.jar
constituent[1]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/commons-beanutils.jar
constituent[2]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/commons-collections.jar
constituent[3]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/commons-lang.jar
constituent[4]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/commons-logging.jar
constituent[5]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/commons-io.jar
constituent[6]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/caff.jar
constituent[7]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/jcli.jar
constituent[8]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/jline.jar
constituent[9]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/jmxremote_optional-repackaged.jar
---------------------------------------------------
java.io.IOException: Operation failed with status WAITING
        at org.jboss.remotingjmx.RemotingConnector.internalRemotingConnect(RemotingConnector.java:247)
        at org.jboss.remotingjmx.RemotingConnector.internalConnect(RemotingConnector.java:158)
        at org.jboss.remotingjmx.RemotingConnector.connect(RemotingConnector.java:105)
        at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270)
        at org.cyclopsgroup.jmxterm.cc.SessionImpl.doConnect(SessionImpl.java:85)
        at org.cyclopsgroup.jmxterm.cc.SessionImpl.connect(SessionImpl.java:49)
        at org.cyclopsgroup.jmxterm.cc.CommandCenter.connect(CommandCenter.java:110)
        at org.cyclopsgroup.jmxterm.boot.CliMain.execute(CliMain.java:159)
        at org.cyclopsgroup.jmxterm.boot.CliMain.main(CliMain.java:50)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.classworlds.Launcher.launchStandard(Launcher.java:353)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:264)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.classworlds.uberjar.boot.Bootstrapper.bootstrap(Bootstrapper.java:209)
        at org.codehaus.classworlds.uberjar.boot.Bootstrapper.main(Bootstrapper.java:116)       

gjaekel avatar Dec 07 '17 14:12 gjaekel

I found that with something like

java -cp .:/opt/wildfly-10.1.0/bin/client/jboss-client.jar:jmxterm-1.0.0-uber.jar  org.codehaus.classworlds.uberjar.boot.Bootstrapper --url service:jmx:remoting-jmx://localhost:9990

it starts to connect. But then it hangs after some message lines until a timeout occurs

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Dec 07, 2017 3:31:18 PM org.xnio.Xnio <clinit>
INFO: XNIO version 3.4.0.Final
Dec 07, 2017 3:31:18 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.4.0.Final
Dec 07, 2017 3:31:18 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 4.0.21.Final
Dec 07, 2017 3:31:18 PM org.jboss.remotingjmx.Util warnDeprecated
WARN: The protocol 'remoting-jmx' is deprecated, instead you should use 'remote'.
********* PAUSED ***************
---------------------------------------------------
constituent[0]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/jmxterm.jar
constituent[1]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/commons-beanutils.jar
constituent[2]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/commons-collections.jar
constituent[3]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/commons-lang.jar
constituent[4]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/commons-logging.jar
constituent[5]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/commons-io.jar
constituent[6]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/caff.jar
constituent[7]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/jcli.jar
constituent[8]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/jline.jar
constituent[9]: jar:file:/import/share/opt/jmxterm/_src/jmxterm-1.0.0-uber.jar!/WORLDS-INF/lib/jmxremote_optional-repackaged.jar
---------------------------------------------------
java.io.IOException: Operation failed with status WAITING
        at org.jboss.remotingjmx.RemotingConnector.internalRemotingConnect(RemotingConnector.java:247)
        at org.jboss.remotingjmx.RemotingConnector.internalConnect(RemotingConnector.java:158)
        at org.jboss.remotingjmx.RemotingConnector.connect(RemotingConnector.java:105)
        at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270)
        at org.cyclopsgroup.jmxterm.cc.SessionImpl.doConnect(SessionImpl.java:85)
        at org.cyclopsgroup.jmxterm.cc.SessionImpl.connect(SessionImpl.java:49)
        at org.cyclopsgroup.jmxterm.cc.CommandCenter.connect(CommandCenter.java:110)
        at org.cyclopsgroup.jmxterm.boot.CliMain.execute(CliMain.java:159)
        at org.cyclopsgroup.jmxterm.boot.CliMain.main(CliMain.java:50)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.classworlds.Launcher.launchStandard(Launcher.java:353)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:264)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.classworlds.uberjar.boot.Bootstrapper.bootstrap(Bootstrapper.java:209)
        at org.codehaus.classworlds.uberjar.boot.Bootstrapper.main(Bootstrapper.java:116)       

try using port "9999" instead. You will get issues about authentication as in https://developer.jboss.org/thread/195087

jaimecasero avatar Oct 29 '18 14:10 jaimecasero

Few hints for JMX with JBoss:

  1. Different ports and protocols: JBoss EAP 6: service:jmx:remoting-jmx://:9999 JBoss EAP 7: service:jmx:remote+http://:9990

  2. jboss-cli-lient.jar should be used (not jboss-client.jar) and it's backwards compatible so you can use the latest one from WildFly project.

  3. "When using 6.1.0 and up, you only need to copy $JBOSS_HOME/bin/client/jboss-cli-client.jar to your box" https://access.redhat.com/solutions/151343

edit: it's jboss-cli-client, not jboss-client-cli

sm4rk0 avatar Jun 27 '19 12:06 sm4rk0

In the Wildfly 11 archives, jboss-client-cli has these versions in its manifest:

Implementation-Version: 9.0.2.Final Specification-Version: 9.0

While jboss-client has these:

Implementation-Version: 17.0.1.Final Specification-Version: 17.0

Doesn't this mean that jboss-client-cli is outdated?

richlv avatar Aug 09 '19 09:08 richlv

Maybe they have independent versions?

sm4rk0 avatar Aug 09 '19 20:08 sm4rk0

They might, is that documented anywhere? It would be rather confusing, though.

richlv avatar Aug 10 '19 04:08 richlv

I can't find any documentation about it, but here are the evidences that versions are independent: wildfly-cli (the source of jboss-cli-client) is now at 10.0.0.Beta4-SNAPSHOT, while WildFly AS is at 18.0.0.Beta1-SNAPSHOT

sm4rk0 avatar Aug 12 '19 22:08 sm4rk0

That's a very good point, thank you. Looks like they might both be up to date then.

richlv avatar Aug 13 '19 05:08 richlv

et issue

Did this suggestion work? I am facing similar issue while trying to connect to a remote wildfly server. The connection establishes for a while then I get this error. Please help

skumom avatar Mar 23 '22 09:03 skumom